Re: [GENERAL] Why does adding SUM and GROUP BY destroy performance?

2003-09-19 Thread Ang Chin Han
Christopher Browne wrote: In the last exciting episode, [EMAIL PROTECTED] (David Link) wrote: Why does adding SUM and GROUP BY destroy performance? When you use SUM (or other aggregates), there are no short cuts to walking through each and every tuple specified by the WHERE clause. Er... not in

Re: [GENERAL] Why does adding SUM and GROUP BY destroy performance?

2003-09-18 Thread Christopher Browne
In the last exciting episode, [EMAIL PROTECTED] (David Link) wrote: Why does adding SUM and GROUP BY destroy performance? When you use SUM (or other aggregates), there are no short cuts to walking through each and every tuple specified by the WHERE clause. On some systems there are statistics

Re: [GENERAL] Why does adding SUM and GROUP BY destroy performance?

2003-09-18 Thread David Link
Thanks Ron, Thanks Christopher for your excellent feedback. I guess it's back to the drawing board. This is a very late hour business requirement change. And we need quick real-time results. Two things are being considered: 1. loading the non aggregate query entirely into memory (using

[GENERAL] Why does adding SUM and GROUP BY destroy performance?

2003-09-17 Thread David Link
Hi, Why does adding SUM and GROUP BY destroy performance? details follow. Thanks, David Link s1.sql: SELECT t.tid, t.title, COALESCE(s0c100r100.units, 0) as w0c100r100units, (COALESCE(r1c2r100.units, 0) + COALESCE(y0c2r100.units, 0)) as r0c2r100units