Deferred constraint and delete performance

From: Franck Routier <franck(dot)routier(at)axege(dot)com>
To: pgsql-performance(at)postgresql(dot)org
Subject: Deferred constraint and delete performance
Date: 2010-02-10 10:55:31
Message-ID: 1265799331.28404.14.camel@franck-laptop
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Tom Lane 2010-02-10 14:56:40 Re: Deferred constraint and delete performance
Previous Message Ing. Marcos L. Ortiz Valmaseda 2010-02-10 09:47:51 Re: [PERFORM] PostgreSQL - case studies