Re: "VACUUM FULL ANALYZE" vs. Autovacuum Contention

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

 



On 07/08/2011 12:46 PM, D C wrote:
That said, it sounds like if we switched to daily "trucates" of each table (they can be purged entirely each day) rather than "delete froms", then there truly would not be any reason to use "vacuum full". Does that sound plausible?


That's exactly right. If you can re-arrange this data to be truncated instead of deleted, this entire problem should go away. There is also a nice optimization you should know about; if you do this:

BEGIN;
TRUNCATE t;
COPY t FROM ...
COMMIT;

In single-node systems (no standby slave), this can work much faster than a normal load. It's able to skip the pg_xlog WAL writes in this situation.

--
Greg Smith   2ndQuadrant US    greg@xxxxxxxxxxxxxxx   Baltimore, MD
Comprehensive and Customized PostgreSQL Training Classes:
http://www.2ndquadrant.us/postgresql-training/


--
Sent via pgsql-performance mailing list (pgsql-performance@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance


[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux