To tune an SQL statement, you can format the statement
for better readability, generate a diagram of the access plan of the
statement, and run the Statistics Advisor to generate RUNSTATS commands
for collecting statistics on the tables and indexes that are in the
access plan.