Deferred constraint and delete performance - Mailing list pgsql-performance

From Franck Routier
Subject Deferred constraint and delete performance
Date
Msg-id 1265799331.28404.14.camel@franck-laptop
Whole thread Raw
Responses Re: Deferred constraint and delete performance  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-performance
Hi,

I am trying to improve delete performance on a database with several
foreign keys between relations that have 100M or so rows.

Until now, I have manually disabled the triggers, done the delete, and
re-enabled the triggers.

This works, but I have to do that when I am sure no other user will
access the database...

I am wondering if deferring foreign key constraints (instead of
disableing them) would increase performance, compared to non deferred
constraints (and compared to disableing the constraints, but I guess no
in this case).

Thanks,

Franck




pgsql-performance by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: Re: 512,600ms query becomes 7500ms... but why? Postgres 8.3 query planner quirk?
Next
From: Tom Lane
Date:
Subject: Re: Deferred constraint and delete performance