View Single Post

   
  #9 (permalink)  
Old 02-29-2008, 07:56 PM
Alexander Kuznetsov
 
Posts: n/a
Default Re: Need help with denormalizing query

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?

Reply With Quote