SQL Tuning Tools

Free SQL Tuning Tools

For SQL Query Tuning you are welcome to use our FREE SQL Query Tuning Tool and SQL Query Formatter Tool for Oracle, MySQL, MS Access, DB2 and MSSQL SQL Querys.

More information about SQL Performance Tuning you will find on site SQL Performance Tuning.

SQL Tuning in Quest Toad for Oracle

In example below it is shown how can we tune SQL query in TOAD for Oracle. We will use SQL tuning tool Explain Plan.

1. For this example I created test tables TABLE_MASTER and TABLE_DETAIL.
2. I did not create any Primary Key or Index!
3. I wrote  SQL query in Editor, marked query and pressed CTRL + E.

4. In upper image we can see that overall Cost is 12,969, Bytes:122.610.129 and
Cardinality: 53,147. With red colour is also marked text TABLE ACCESS FULL and that is something what we do not want to see in Explain Plan.
5. Lets do some SQL tuning. Just look in WHERE clause in our SQL statement. We can see join m.id = d.master_id and m.served_pdp_address = ’′. We know that we did not create any Primary Key or Index in previous steps, so we will create them in the next one.
6. Create Primary Key and Index on table TABLE_MASTER

7. Create Index on table TABLE_DETAIL

8. Lets run Explain Plan once again.

9. Do you see the improvement in SQL tuning? Cost is now 74 Bytes: 5.096.163 and Cardinality: 2,209.

You will find more rules for query optimization on page SQL PERFORMANCE TUNING .