4 ms·
"They figure out why the response time for the worst query is bad and then fix it." This can reap huge benefits and doesn't need to be difficult. Just enable t
by qjz 16y ago
"They figure out why the response time for the worst query is bad and then fix it."
This can reap huge benefits and doesn't need to be difficult. Just enable the slow query log in MySQL, use the EXPLAIN command to analyze the results, then add indexes where appropriate. I was able to fix poorly indexed tables in a vendor's application with dramatic results. In one case, a twenty-minute(!) query was reduced to less than a second.
- matwood 16y agoWhile your premise is correct it's not always that simple. More indexes can slow down updates and inserts. A tables overall usage pattern needs to be examined before just adding more indexes. You might have fixed the 20 minute report query while slowing down some other more critical query that loaded or updated data.
- qjz 16y agoYes, this is a good point and I actually noted it in my issue tracker while troubleshooting. I made sure that inserts & updates weren't negatively affected to an unacceptable degree after adding the indexes. The overall win was huge, because it eliminated wait times for a sizable staff and client base.
- ora600 16y agoI believe that Facebook subscribe to this methodology because MySQL makes this easy and other methods of finding issues very difficult. When all you have is a hammer...
- mmavnn 16y agoAlternatively, they might have come across Six Sigma ( http://en.wikipedia.org/wiki/Six_Sigma http://en.wikipedia.org/wiki/Six_Sigma ) and decided it was relevant.