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

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Re: Why is the comparison between timestamp and date so much slower then between two dates
Дата
Msg-id 21662.1460642273@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Why is the comparison between timestamp and date so much slower then between two dates  (Thomas Kellerer <spam_eater@gmx.net>)
Ответы Re: Why is the comparison between timestamp and date so much slower then between two dates  (Thomas Kellerer <spam_eater@gmx.net>)
Список pgsql-general
Thomas Kellerer <spam_eater@gmx.net> writes:
> 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.

            regards, tom lane


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

Предыдущее
От: Ritanjali M
Дата:
Сообщение: Cross DB insert with returning id
Следующее
От: Thomas Kellerer
Дата:
Сообщение: Re: Why is the comparison between timestamp and date so much slower then between two dates