SQL Tuning Tools

Free SQL Tuning Tools

For Oracle SQL Query Tuning you are welcome to use our free SQL Query Tuning Tool.

To rearrange your SQL query statement into the appropriate standard format use SQL Query Formatter Tool for the following databases: Oracle, MySQL, MS Access, DB2 and MSSQL.

SQL Tuning in Quest Toad for Oracle

The example below shows how we can tune SQL query in TOAD for Oracle database. In TOAD we will use SQL tuning tool “Explain Plan”.

1. First I created two test tables, TABLE_MASTER and TABLE_DETAIL.
2. Note: I did not create any Primary Key or Index!
3. I coded SQL query in Editor as shown bellow, then I marked SQL query using CTRL + A and finaly pressed CTRL + E for explain plan, also shown bellow.

4. In the image above we can see that the overall Cost is 12,969, Bytes:122.610.129 and
Cardinality: 53,147. Also TABLE ACCESS FULL is written in red, which is something that we would like to avoid in Explain Plan.
5. Lets do some SQL tuning. Looking at the WHERE clause inside our SQL statement, we can see join m.id = d.master_id and m.served_pdp_address = ‘’. Now we will create a Primary Key and Index.

Create Primary Key and Index on table TABLE_MASTER

6. Create Index on table TABLE_DETAIL

7. Lets run Explain Plan, once again using keyboard shortcut CTRL + E.

8. Do you see the improvement we made in SQL tuning? The cost is now 74, Bytes: 5.096.163 and Cardinality: 2,209.

You will find more tips and tricks for query optimization on page SQL PERFORMANCE TUNING .