Re: [PERFORM] sub-select makes query take too long - unusable

2009-11-22 Thread Sergey Aleynikov
Hello, SubPlan 2 -> Seq Scan on item_price (cost=0.00..423.30 rows=1 width=8) (actual time=1.914..1.914 rows=0 loops=10669) Filter: ((item_id = $1) AND (zone_id = 'OUsEaRcAA3jQrg42WHUm8A'::bpchar) AND (price_type = 0) AND ((size_name)::text = ($2)::text)) This means that, for ever

[PERFORM] sub-select makes query take too long - unusable

2009-11-21 Thread Mark Dueck
Hi all, (Sorry, I know this is a repeat, but if you're using message threads, the previous one was a reply to an OLD subject.) The query below is fairly fast if the commented sub-select is commented, but once I included that column, it takes over 10 minutes to return results. Can someone shed s

[PERFORM] sub-select makes query take too long - unusable

2009-11-21 Thread Mark Dueck
Hi all, The query below is fairly fast if the commented sub-select is commented, but once I included that column, it takes over 10 minutes to return results. Can someone shed some light on it? I was able to redo the query using left joins instead, and it only marginally increased result time. T