General Step:

  1. Generate explain plan for the SQL queries
  2. Interpret the explain plan to identify the performance bottlenecks
  3. Act by using right technique to improve the performance

Rule #1: If its linked by it, filtered by it, or sorted by it…index by it.

Technical list:

  1. select column instead of all (avoid full table scanning)
    1. add index & partition (pruning)
  2. pre-join data instead of joining same table repeatedly
  3. minimize the use of distinct
  4. Predicate pushdown (e.g. instead of having)
  5. Use wildcards at the end of a phrase only
  6. avoid using many OR for large dataset
  7. avoid too many join
  8. limit the row being return
  9. sort data when needed
  10. watch the execution plan (and statistic like disk, memory, network, process time, size)