From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | glynastill(at)yahoo(dot)co(dot)uk |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Query palns and tug-of-war with enable_sort |
Date: | 2009-02-18 15:35:27 |
Message-ID: | 7021.1234971327@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Glyn Astill <glynastill(at)yahoo(dot)co(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Martín Marqués | 2009-02-18 15:37:32 | Mammoth replicator |
Previous Message | Aurimas Černius | 2009-02-18 15:01:14 | Re: connecting using libpq breaks printf |