Re: [PERFORMANCE] slow small delete on large table

From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: "Ed L(dot)" <pgsql(at)bluepolka(dot)net>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: [PERFORMANCE] slow small delete on large table
Date: 2004-02-24 03:00:17
Message-ID: 20040224030017.GA2872@wolff.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Mon, Feb 23, 2004 at 19:10:57 -0700,
"Ed L." <pgsql(at)bluepolka(dot)net> wrote:
>
> A 7.3.4 question...
>
> I want to "expire" some data after 90 days, but not delete too
> much at once so as not to overwhelm a system with precariously
> balanced disk I/O and on a table with millions of rows. If I
> could say it the way I think for a simple example, it'd be
> like this:

If there aren't foreign keys into the table from which rows are being
deleted, then a delete shouldn't have a big impact on the system.
If you do the expires frequently, then there won't be as many records
to delete at one time. The other response showed you how to avoid the
sequential scan, which is the other part of the problem.

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Christopher Browne 2004-02-24 03:48:29 Re: [PERFORMANCE] slow small delete on large table
Previous Message Christopher Kings-Lynne 2004-02-24 02:34:00 Re: [PERFORMANCE] slow small delete on large table