GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

  GeekInterview.com  >  Tech FAQs  >  PL/SQL

 Print  |  
Question:  What is the systematic way of tuning a query?



December 12, 2007 02:51:39 #1
 dinu78   Member Since: November 2007    Total Comments: 1 

RE: What is the systematic way of tuning a query?
 
1) First identify the current excecution plan by using showplan.

In most cases, creating and then forcing usage of the indexes result in drastic improvement.

1) Ensure that indexes(single or composite) exist for columns referred to in the where clause.

2) Avoid select(*), instead use tablename.columnname.

3) Avoid using in clause, instead use where col=value1 and col=value2 etc.
     

 

Back To Question