Re: fastest SQL?

From: Daniel Fink <daniel.fink_at_optimaldba.com>
Date: Fri, 12 Mar 2010 19:01:56 -0700
Message-ID: <4B9AF214.605_at_optimaldba.com>



Some years ago, I was working on optimizing a load process. After tracing and profiling, I presented my findings to the development team and leaned back with a sense of smug satisfaction...which lasted all of a few seconds.

The development team looked at the top sql I was reporting for optimizing...and told me I was wasting their time. After all, these statements were part of an old release that they had long replaced. So obviously I was totally clueless as to what they were doing.

It was their turn to be smug...until I checked my profile output and trace files...the times, the database...they all checked out...

Turns out...yes, the statements were part of an old release. An old release that they had replaced...but never removed from the code. So the statements were running along, reading data, using up resource and time, only to have the result set never used by the application!

Once they actually removed the old code, the load process screamed along!

Cheers!
Daniel

OptimalDBA http://www.optimaldba.com
Oracle Blog http://optimaldba.blogspot.com

Lost Data? http://www.ora600.be/

Job Miller wrote:
> This whole threads sounds like a trick interview question for a DBA.
>
> Q: You are presented a really slow SQL statement, what do you do, or how do you tune the SQL statement to make it really fast?
>
> You look at the statement/business logic and decide that you don't need to run that statement at all. Jaromir gets my vote.
>
>
>
>
>
>
>
>
>
> --
> http://www.freelists.org/webpage/oracle-l
>
>
>
>

--
http://www.freelists.org/webpage/oracle-l
Received on Fri Mar 12 2010 - 20:01:56 CST

Original text of this message