When it is not possible to eliminate an SQL statement to improve performance, it might be possible to simplify the statement. Consider the following questions:
- Are all columns required?
- Can a table join be removed?
- Is a join or WHERE restriction necessary for additional SQL statements in a given function?
Column Improvement
An important requirement of simplification is to capture all SQL statements in order for a given executed function. Using a sampling process will not identify all possible improvements. Here is an example of a query simplification:
mysql> SELECT fid, val, val -> FROM table1 -> WHERE fid = X;
This query returned 350,000 rows of data that was cached by the application server during system startup. For this query, …
[Read more]