Posted by Alexander Kuznetsov on 07/16/06 01:17
Tom,
In such cases I just love to figure out what components add up to those
10 or 12 minutes, for instance:
How much time does it take to just scan the main table?
select count(*) from main_table where col1+col2=17
(the table is scanned and a very minor overhead to calculate
"col1+col2")
How much time does it take to run the inner subquery?
and so on.
IMO it is important. For instance, if it takes 8 minutes just to scan
the main table, then the difference between these 2 approaches is not
10' vs.12'45'', it is in fact closer to 2' vs. 4'45''.
Makes sense?
[Back to original message]
|