Re: Oddity with view (now with test case)

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Oddity with view (now with test case)
Дата
Msg-id 21846.1226457290@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Oddity with view (now with test case)  (Jim 'Decibel!' Nasby <jnasby@cashnetusa.com>)
Список pgsql-performance
"Jim 'Decibel!' Nasby" <jnasby@cashnetusa.com> writes:
> So here's something odd... in both 8.3 and HEAD from a while ago it
> gives a better plan for SELECT * than for SELECT count(*):

The short answer is that the Subquery Scan nodes can be dropped out
when they are no-ops, which is to say producing the same set of columns
their input produces (and not testing any filter conditions, but that's
not relevant here).  SELECT count(*) doesn't want to know about any
columns so the output of the UNION arm doesn't match ...

            regards, tom lane

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

Предыдущее
От: "Scott Marlowe"
Дата:
Сообщение: Re: Using index for IS NULL query
Следующее
От: Matthew Wakeling
Дата:
Сообщение: Re: Using index for IS NULL query