Re: Checking = with timestamp field is slow

Поиск
Список
Период
Сортировка
От Michael Glaesemann
Тема Re: Checking = with timestamp field is slow
Дата
Msg-id A64DEAC4-2F02-11D9-BE4A-000A95C88220@myrealbox.com
обсуждение исходный текст
Ответ на Checking = with timestamp field is slow  (Antony Paul <antonypaul24@gmail.com>)
Ответы Re: Checking = with timestamp field is slow
Список pgsql-performance
On Nov 5, 2004, at 4:16 PM, Antony Paul wrote:
> where today::date = '2004-11-05';
>
> This is the only condition in the query. There is a btree index on the
> column today.
> Is there any way to optimise it.

I'm sure others out there have better ideas, but you might want to try

where current_date = date '2004-11-05'

Might not make a difference at all, but perhaps PostgreSQL is coercing
both values to timestamp or some other type as you're only providing a
string to compare to a date. Then again, it might make no difference at
all.

My 1 cent.

Michael Glaesemann
grzm myrealbox com


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

Предыдущее
От: Antony Paul
Дата:
Сообщение: Checking = with timestamp field is slow
Следующее
От: Michael Glaesemann
Дата:
Сообщение: Re: Checking = with timestamp field is slow