A SQL Tuning Case Study: Could we K.I.S.S. Please?
By gaurav.verma on Feb 17, 2007
They say, it pays to K.I.S.S (Keep It Simple and Smart). The simplest ideas are the greatest ideas.This philosophy also applies to sql
coding when we tell the oracle SQL engine what to fetch and how
to fetch it (Indirectly). There are great rewards for simplistic thinking.
Lets discuss this principle through a case study in which the user was
trying to fetch very simple data through an over-kill query, involving
RA_* views which were internally using some of the same tables. The SQL
engine was therefore just trying to fetch and filter too much data from
same sources. It was not certainly efficient.
In this case study, we see how its important to understand the "Why" of
a query, rather than the "How" of a query. Many times, just rethinking
the whole approach pays great dividends.
Read the entire case study here...