Delete Performance

From: "P(dot)J(dot) \"Josh\" Rovero" <rovero(at)sonalysts(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Delete Performance
Date: 2001-11-16 13:59:03
Message-ID: 3BF51BA7.5070304@sonalysts.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

Tom Lane suggested I look at EXPLAIN output, which showed
that both the catalog (fast delete case) and toasted text
table (slow delete case) were using sequential scans when
deleting any significant number of records.\

But even with sequential scan, the catalog entries are
deleted quickly (30K records in just a couple of seconds),
vice slow deletes (2 per second) for the toasted text.

The catalog entries are about 200 bytes (integers, timestamps,
a couple of short fixed length strings), while the toasted
text table has one short text field, one timestamp, and one
long (2K to 20K bytes) toasted text field.

Both will use index scans when a very small number (< 1%)
of records would be selected. But relative delete performance
stays the same.
--
P. J. "Josh" Rovero Sonalysts, Inc.
Email: rovero(at)sonalysts(dot)com www.sonalysts.com 215 Parkway North
Work: (860)326-3671 or 442-4355 Waterford CT 06385
***********************************************************************

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Francisco Reyes 2001-11-16 15:01:16 Re: pgsql and large tables
Previous Message Eric Crampton 2001-11-16 13:54:06 Poor performance on SCSI machines, good on IDE?

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2001-11-16 13:59:40 Re: [HACKERS] Open Items (was: RE: [HACKERS] Beta going well)
Previous Message mlw 2001-11-16 13:45:27 Super Optimizing Postgres