Deferred constraint and delete performance

From: Franck Routier
Subject: Deferred constraint and delete performance
Date: ,
Msg-id: 1265799331.28404.14.camel@franck-laptop
(view: Whole thread, Raw)
Responses: Re: Deferred constraint and delete performance  (Tom Lane)
List: pgsql-performance

Tree view

Deferred constraint and delete performance  (Franck Routier, )
 Re: Deferred constraint and delete performance  (Tom Lane, )
  Re: Deferred constraint and delete performance  (Andres Freund, )
  Re: Deferred constraint and delete 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:

From: Justin Graf
Date:
Subject: Re: How exactly PostgreSQL allocates memory for its needs?
From: Jeff
Date:
Subject: Re: Linux I/O tuning: CFQ vs. deadline