Re: Natural key woe

Поиск
Список
Период
Сортировка
От Eelke Klein
Тема Re: Natural key woe
Дата
Msg-id CALEkvvy2k6XExA1Fgc_oo8-ze_q0F9idSN8MBEpwUizyaew2_A@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Natural key woe  (Robin <robinstc@live.co.uk>)
Список pgsql-general


One other wrinkle to note. After clearing out these rows, running 'VACUUM table2', 'ANALYZE table2' and 'REINDEX table table2', some queries with simple sequence scans were taking a few seconds to run even though there are only a thousand rows in the table. I finally found that running CLUSTER on the table sorted that out, even though we're on an SSD so I would have thought seeking all over the place for a seq. scan wouldn't have made that much difference. It obviously does still make some.

A VACUUM FULL table2 would have made the CLUSTER unnecesary. A normal VACUUM only marks dead rows as free but does not shrink the table. A VACUUM FULL removes all the free space from the table and returns it to the OS.

Eelke Klein

 

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

Предыдущее
От: Robin
Дата:
Сообщение: Re: Natural key woe
Следующее
От: Adrian Klaver
Дата:
Сообщение: Re: Question about synchronous replication