Search Postgresql Archives

Re: Natural key woe

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





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

 

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux