Glyn Astill <glynast...@yahoo.co.uk> writes: > With enable_sort on this is the plan it chooses:
> HashAggregate (cost=14.72..14.73 rows=1 width=9) > -> Nested Loop (cost=0.00..14.72 rows=1 width=9) > -> Index Scan using credit_index02 on credit (cost=0.00..7.04 > rows=1 width=9) > Index Cond: ((date >= '2009-02-16'::date) AND (date <= > '2009-02-16'::date)) > Filter: (((cancelled)::text = ' '::text) AND ((show = > 450000::numeric) OR (show = 450 > 001::numeric))) > -> Index Scan using mult_ord_index02 on mult_ord (cost=0.00..7.67 > rows=1 width=17) > Index Cond: (mult_ord.transno = credit.transno) > That's what I want, good. Now with enable_sort off this is the plan it > chooses: > Group (cost=0.00..11149194.48 rows=1 width=9) That's just bizarre. Can you put together a self-contained test case for this? Also, what version is it exactly? ("8.3" is the wrong answer.) regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general