Enable slow query logging on Amazon RDS

Because you can not access the filesystem on a RDS instance you have to configure slow query logging using the RDS command-line tools. The slow query data will be stored in the slow_query table in the mysql database. (Amazon FAQ)

1. Install the RDS command-line tools : http://aws.amazon.com/developertools/2928

2. Create a new parameter group :
rds-create-db-parameter-group mycustom-parameter-group -f mysql5.1 -d "This is my custom database parameter group"

3. Put your DB instance in that parameter group:
rds-modify-db-instance --db-parameter-group-name mycustom-parameter-group --apply-immediately

4. Enable slow query loggin in your new parameter group:
rds-modify-db-parameter-group mycustom-parameter-group --parameters "name=slow_query_log, value=ON, method=immediate" --parameters "name=long_query_time, value=5, method=immediate" --parameters "name=min_examined_row_limit, value=100, method=immediate"
(long_query_time is set to 5 seconds in this example)

5. Reboot your db instance:
rds-reboot-db-instance

Now you wil be able to view your slow query log in the slow_log table in the mysql database.

How do you clear the slow_log table?

When you want to empty the slow_log table use the following stored procedure:

CALL rds_rotate_slow_log

This stored procedure will the data to slow_log_backup and empty the slow_log table.

BlackBerry HTML5 App development

Some 5/6 months ago I developed the PhoneGap App "Diabetes Dagboek" for iPhone and Android. Because it is all JavaScript, CSS and HTML5, I was also planning to release it for BlackBerry.

There the horror started... I tried and tried, installing SDK's different developer tools, emulators, etc, etc. Of course all in a virtual windows machine on my mac, because BlackBarry wasn't that friendly for us Mac developers. So I gave up because it was not that important and there was enough other work to do.

But it looks like BlackBerry finally woke up and started helping developers to build apps for their platform. Today I prepared for the worse and started working on the BlackBerry App again. Then I stumbled upon their new HTML5 website! Wow. The tools work... even on my mac.

So, Thank you BlackBerry for taking us developers serious. :-)

PhoneGap + iPhone + xuijs .html() failing occassionaly

Today I finally fixed a bug that was chasing me for days. I hope this article will save other people some time.

When loading a view in my PhoneGap + xuijs app I'm displaying data from a database, but 50% of the time the data was not visible on the screen. When I loaded the screen again data was not show on different random places.


More →

CakePHP REST Plugin

Kevin van Zonneveld created a great reusable CakePHP REST plugin. Just what I needed for my next CakePHP project.


More →

October mix

Just created a fresh new October mix!

Audio clip: Adobe Flash Player (version 9 or above) is required to play this audio clip. Download the latest version here. You also need to have JavaScript enabled in your browser.


More →