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