Re: Data comparison SQL in PG 8.2.9

Поиск
Список
Период
Сортировка
От Shane Ambler
Тема Re: Data comparison SQL in PG 8.2.9
Дата
Msg-id 496B6AD9.4070009@Sheeky.Biz
обсуждение исходный текст
Ответ на Data comparison SQL in PG 8.2.9  ("Phoenix Kiula" <phoenix.kiula@gmail.com>)
Список pgsql-general
Phoenix Kiula wrote:

>                                 Table "public.users"
>           Column         |            Type             |
> Modifiers
>   -----------------------+-----------------------------+------------------------------
>       modify_date           | timestamp without time zone |
>   ....
>   Indexes:
>       "new_idx_modify_date" btree (modify_date) WITH (fillfactor=75)
>
>
> Any ideas why? I ran an explain analyze and this is the output:

> Another weird thing is that a query that has ">" a certain
> modify_date, even just yesterday as the date condition, takes a LONG
> time and is almost unusable.

Have you tried REINDEX? VACUUM ANALYZE since the update?
Not sure the security fix relating to indexes in 8.2.6 affects you.

Did the suggestion of adding the type cast affect the query?
If so then maybe the planner is now running the type conversion per row
instead of a one off from the constant in the select.



--

Shane Ambler
pgSQL (at) Sheeky (dot) Biz

Get Sheeky @ http://Sheeky.Biz

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

Предыдущее
От: Adrian Klaver
Дата:
Сообщение: Re: How do I 'include' a stored procedure in a SQL script file
Следующее
От: "Dan Armbrust"
Дата:
Сообщение: Re: Slow Vacuum was: vacuum output question