Re: Poor Delete performance - Mailing list pgsql-general

From Tom Lane
Subject Re: Poor Delete performance
Date
Msg-id 27546.984409857@sss.pgh.pa.us
Whole thread Raw
In response to Poor Delete performance  (Bill Huff <bhuff@colltech.com>)
List pgsql-general
Bill Huff <bhuff@colltech.com> writes:
>   It appears that in deleting records from a table with a significant
>   number or rows ( in this case 1.3 million ) it takes about 1 hour per
>   100K rows deleted if deleting more then 400K at a time.  This sounds
>   way to slow to me.

Me too.  What PG version is this?  What's the query exactly, and what
does EXPLAIN show for it?  What is the full table definition ("pg_dump
-s -t tablename dbname" is the most reliable way to present the table)?

>   I have searched the on-line archives for all the postgres lists and
>   checked the FAQ and I can't find anything that gives any insight into
>   increasing delete performance.

DELETE (and UPDATE) are pretty much like SELECT as far as performance
considerations go.  Selecting the tuples to delete/update is the primary
performance issue.  So the docs about performance generally just talk
about SELECT to keep things simple.

            regards, tom lane

pgsql-general by date:

Previous
From: "Marcelo Pereira"
Date:
Subject: Delete Cascade
Next
From: Karel Zak
Date:
Subject: Re: Delete Cascade