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 nendqu$sq1$2@ger.gmane.org
обсуждение исходный текст
Ответ на Re: Why is the comparison between timestamp and date so much slower then between two dates  (Alban Hertroys <haramrae@gmail.com>)
Ответы Re: Re: Why is the comparison between timestamp and date so much slower then between two dates  ("Mike Sofen" <msofen@runbox.com>)
Список pgsql-general
Alban Hertroys schrieb am 13.04.2016 um 16:39:
>>> So my question is: why is comparing a timestamp to a date so much slower?
>
> The reason that the other way around is so much more expensive is that
> the database needs to do that conversion twice for every row in the
> table. When down-converting now(), the DB only needs to do that once
> for all rows.

Why does it do that for each row? The value of now() won't
change while the statement is running, so this conversion could
be done once at the start of the statement.


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

Предыдущее
От: Thomas Kellerer
Дата:
Сообщение: Re: Why is the comparison between timestamp and date so much slower then between two dates
Следующее
От: Moreno Andreo
Дата:
Сообщение: Re: Multimaster