Posted by Matthias Rogel on 4. February 2013
The biggest advantage of being developer and DBA at the same time in my eyes is: tuning lies in one hand.
Peter Scott twittered about bringing a query down from 25 hours to 83 seconds by rewriting a query using MINUS.
Funny, in February 1996 I started a new job and my first task was tuning a query running for several hours – basically
select ... from t where not exists ( select ... from r@remote r where <join t and r> )
which could be tuned down to a few seconds using MINUS, so quite similar to Peter’s job ( Version was 7.0.something at that time as far as I remember ).
In my experience, most performance gains are achieved by rewriting SQL or even by restructuring your entire application logic.