Re: Strong slowdown on huge tables

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Job <Job(at)colliniconsulting(dot)it>
Cc: "pgsql-performance(at)postgresql(dot)org" <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Strong slowdown on huge tables
Date: 2012-05-29 17:42:42
Message-ID: 14867.1338313362@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Job <Job(at)colliniconsulting(dot)it> writes:
> i use PostgreSQL 8.4.8 on Centos 5.x and i have some table where i load with pg_bulkload webtraffic logs, every day.
> After loading new data, i delete with a query 30-days older logs.

Since the deletion pattern is so predictable, you should consider
setting this table up as a partitioned table, so that you can just drop
the oldest partition instead of having to rely on DELETE+VACUUM to
reclaim space. See
http://www.postgresql.org/docs/8.4/static/ddl-partitioning.html

Alternatively, look into whether including a manual VACUUM in your daily
update script helps any.

regards, tom lane

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Jeff Davis 2012-05-29 20:53:20 Re: Recover rows deleted
Previous Message Tom Lane 2012-05-29 15:52:22 Re: pg_dump and thousands of schemas