Re: Large table performance and vacuum

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Large table performance and vacuum
Дата
Msg-id 11756.1078524475@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Large table performance and vacuum  (Gavin Scott <gavin@ipalsoftware.com>)
Ответы Re: Large table performance and vacuum  (Mike Mascari <mascarm@mascari.com>)
Список pgsql-general
Gavin Scott <gavin@ipalsoftware.com> writes:
> The problem is the query "SELECT * FROM log ORDER BY hid
> LIMIT 1;", which both EXPLAIN and EXPLAIN ANALYZE show as
> Limit / Index Scan on hid_idx.  This was very fast before we
> started deleting out old log entries the table, but has
> started taking an extremely long time, about 341 seconds.

I'm suspecting that you need to REINDEX hid_idx.  This is an
aspect of the pre-7.4 "index bloat" problem: the left end of the index
now consists of entirely-empty pages, which not only occupy space but
take time to scan through for a query like this.

            regards, tom lane

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

Предыдущее
От: "Joshua D. Drake"
Дата:
Сообщение: Re: Setting up Postgresql on Linux
Следующее
От: Mike Mascari
Дата:
Сообщение: Re: Large table performance and vacuum