From: | Eelke Klein <eelke(at)bolt(dot)nl> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Natural key woe |
Date: | 2014-05-13 13:40:31 |
Message-ID: | CALEkvvy2k6XExA1Fgc_oo8-ze_q0F9idSN8MBEpwUizyaew2_A@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | Adrian Klaver | 2014-05-13 13:41:50 | Re: Question about synchronous replication |
Previous Message | Robin | 2014-05-13 11:30:03 | Re: Natural key woe |