Performance tuning (database structure)
From Cyclone3 Wiki
Check performance of your database on real datas
dump database or only one table
We are dumping for example table a301_user from production server
mysqldump TOM a301_user > a301.sql
load data into your testing database server
mysql < a301.sql
get real log of SQL queries from production server
Find sql.log file from your domain service or TOM root directory.
cd /www/TOM/!example.tld/_logs/ cat *.sql.log | grep a301_user > a301_log.sql
replay queries
Create short script to grep SQL queries from a301_log.sql and replay it on testing db. check the duration time. after this, tune your database structures with another keys, etc..., replay the sql log again and check the duration times...