pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Franck Routier <franck.routier@axege.com>
To: pgsql-performance@postgresql.org
Subject: Deferred constraint and delete performance
Date: Wed, 10 Feb 2010 11:55:31 +0100
Message-ID: <1265799331.28404.14.camel@franck-laptop> (raw)

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






view thread (4+ messages)  latest in thread

Message-ID: <1265799331.28404.14.camel@franck-laptop>
Permalink:  ../1265799331.28404.14.camel@franck-laptop/
Also on:    postgresql.org/message-id/1265799331.28404.14.camel@franck-laptop

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: franck.routier@axege.com
  Subject: Re: Deferred constraint and delete performance
  In-Reply-To: <1265799331.28404.14.camel@franck-laptop>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox