Day of Database TuneUps
Feb 21st, 2007 by Jessica
All started from revision of Mysql Slow Queries file…. it appers that even 6 GB of memory is not enought to server the profiles and all site functions … probably will upgrade to 8 GBÂ
MySql is supposed to be good with joins, but after careful review me and DB amin figured that optimizer can not well handle many tables in the correct way…
On TDP Optimizer was constantly trying to prioritize Country table because of #of rows…. We had to replace joins with STRAIGHT_JOIN and tune the indexes on users table to properly select records with limits. Since we constantly show only 100 ordered records our indexes had to include order by field as a second indexed column.
I think Friends page returns all the results mu faster now…