Re: Query palns and tug-of-war with enable_sort

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Query palns and tug-of-war with enable_sort
Дата
Msg-id 7021.1234971327@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Query palns and tug-of-war with enable_sort  (Glyn Astill <glynastill@yahoo.co.uk>)
Ответы Re: Query palns and tug-of-war with enable_sort  (Glyn Astill <glynastill@yahoo.co.uk>)
Список pgsql-general
Glyn Astill <glynastill@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

В списке pgsql-general по дате отправления:

Предыдущее
От: Aurimas Černius
Дата:
Сообщение: Re: connecting using libpq breaks printf
Следующее
От: Martín Marqués
Дата:
Сообщение: Mammoth replicator