Re: Will pg_repack improve this query performance?

Поиск
Список
Период
Сортировка
От Josh Kupershmidt
Тема Re: Will pg_repack improve this query performance?
Дата
Msg-id CAK3UJREvAASY4s4PDpkzAdoZkcnX=upDU0ifVzqrz4fA-FoyNg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Will pg_repack improve this query performance?  (Alban Hertroys <haramrae@gmail.com>)
Список pgsql-general
On Wed, Oct 15, 2014 at 5:03 AM, Alban Hertroys <haramrae@gmail.com> wrote:
> A CLUSTER would help putting rows with the same to_id together. Disk access would be less random that way, so it
wouldhelp some. 
>
> According to your query plan, accessing disks (assuming that’s what made the difference) was 154 (7700 ms / 50 ms)
timesslower than accessing memory. I don’t have the numbers for your disks or memory, but that doesn’t look like an
incrediblyunrealistic difference. That begs the question, how random was that disk access and how much can be gained
fromclustering that data? 

Other than grouping tuples in a more favorable order to minimize I/O,
the big benefit of running a CLUSTER or pg_repack is that you
eliminate any accumulated bloat. (And if bloat is your real problem,
ideally you can adjust your autovacuum settings to avoid the problem
in the future.) You may want to check on the bloat of that table and
its indexes with something like this:

https://wiki.postgresql.org/wiki/Show_database_bloat


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

Предыдущее
От: Adrian Klaver
Дата:
Сообщение: Re: COPY data into a table with a SERIAL column?
Следующее
От: Abelard Hoffman
Дата:
Сообщение: Re: Will pg_repack improve this query performance?