Re: [PERFORM] Cost Issue - How do I force a Hash Join

2006-02-20 Thread Virag Saksena
am_heapobj bo (cost=0.00..4.33 rows=1 width=43) (actual time=0.294..0.300 rows=1 loops=6259) Index Cond: ((bo.heap_id = 0) AND (bo.objaddr = "outer".childaddr)) Total runtime: 9950.192 ms Regards, Virag - Original Message - From: "Tom Lane" <[EMAIL

Re: [PERFORM] Cost Issue - How do I force a Hash Join

2006-02-20 Thread Craig A. James
"Virag Saksena" <[EMAIL PROTECTED]> writes: The individual queries run in 50-300 ms. However the optimizer is choosing a nested loop to join them rather than a Hash join... I have what appears to be the identical problem. This is a straightforward query that should be fairly quick, but takes a

Re: [PERFORM] Cost Issue - How do I force a Hash Join

2006-02-20 Thread Tom Lane
"Virag Saksena" <[EMAIL PROTECTED]> writes: > The individual queries run in 50-300 ms. However the optimizer is = > choosing a nested loop to join them rather than a Hash join > causing the complete query to take 500+ seconds. It expects that it will = > get 1 row out from each of the sources, but

[PERFORM] Cost Issue - How do I force a Hash Join

2006-02-20 Thread Virag Saksena
Hi,     I have query where I do two inline queries (which involves grouping) and then join them with an outer join. The individual queries run in 50-300 ms. However the optimizer is choosing a nested loop to join them rather than a Hash join causing the complete query to take 500+ seconds. I