Strategy: Eliminate Unnecessary SQL
Thursday, February 24, 2011 at 9:48AM
Todd Hoff in MySQL, Strategy

MySQL Expert Ronald Bradford explains how one key way to improve the scalability of a MySQL server, and undoubtedly nearly every other server, is to eliminate unnecessary SQL, saying the most efficient way to improve an SQL statement is to eliminate it:

The MySQL kernel can only physically process a certain number of SQL statements for a given time period (e.g. per second). Regardless of the type of machine you have, there is a physical limit. If you eliminate SQL statements that are unwarranted and unnecessary, you automatically enable more important SQL statements to run. There are numerous other downstream affects, however this is the simple math. To run more SQL, reduce the number of SQL you need to run.

Ronald shows how to use mk-query-digest to look at query execution times and determine which ones can be profitably whacked. 

Related Articles

Article originally appeared on (http://highscalability.com/).
See website for complete article licensing information.