Re: Why is the comparison between timestamp and date so much slower then between two dates

Поиск
Список
Период
Сортировка
От Thomas Kellerer
Тема Re: Why is the comparison between timestamp and date so much slower then between two dates
Дата
Msg-id neo8c8$nbu$1@ger.gmane.org
обсуждение исходный текст
Ответ на Re: Re: Why is the comparison between timestamp and date so much slower then between two dates  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
Tom Lane schrieb am 14.04.2016 um 15:57:
>> So the optimizer _should_ be smart enough to do the conversion only
>> once at the beginning of the statement and then use that converted
>> value during the execution of the statement without the need
>> to re-evaluate it for each row.
>
> It's not; especially not in your originally posted case where the
> up-conversion happens on the variable not the pseudo-constant.

Which variable are you referring to?

The original query only uses a simple between condition where the
comparison value is a "constant" (the value of "now()")

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Re: Why is the comparison between timestamp and date so much slower then between two dates
Следующее
От: Adrian Klaver
Дата:
Сообщение: Site down