Re: Index Backward Scan fast / Index Scan slow !

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Index Backward Scan fast / Index Scan slow !
Дата
Msg-id 8579.1081772899@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Index Backward Scan fast / Index Scan slow !  (Pailloncy Jean-Gérard <pailloncy@ifrance.com>)
Ответы Re: Index Backward Scan fast / Index Scan slow !  (Pailloncy Jean-Gérard <pailloncy@ifrance.com>)
Список pgsql-performance
=?ISO-8859-1?Q?Pailloncy_Jean-G=E9rard?= <pailloncy@ifrance.com> writes:
> How to optimize the last query ? (~ 2000 times slower than the first
> one)
> I suppose there is some odd distribution of data in the index ?

Looks to me like a whole lot of dead rows at the left end of the index.
Have you VACUUMed this table lately?  It would be interesting to see
what VACUUM VERBOSE has to say about it.

> Is the solution to reindex data ?

In 7.4 a VACUUM should be sufficient ... or at least, if it isn't
I'd like to know why not before you destroy the evidence by reindexing.

            regards, tom lane

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

Предыдущее
От: Bruno Wolff III
Дата:
Сообщение: Re: Effect of too many columns
Следующее
От: "Shea,Dan [CIS]"
Дата:
Сообщение: Deleting certain duplicates