From: Andres Freund <andres@anarazel.de>
To: pgsql-performance@postgresql.org
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Franck Routier <franck.routier@axege.com>
Subject: Re: Deferred constraint and delete performance
Date: Wed, 10 Feb 2010 18:36:23 +0100
Message-ID: <201002101836.25964.andres@anarazel.de> (raw)
In-Reply-To: <16009.1265813800@sss.pgh.pa.us>
References: <1265799331.28404.14.camel@franck-laptop>
<16009.1265813800@sss.pgh.pa.us>
On Wednesday 10 February 2010 15:56:40 Tom Lane wrote:
> Franck Routier <franck.routier@axege.com> writes:
> > I am wondering if deferring foreign key constraints (instead of
> > disableing them) would increase performance, compared to non deferred
> > constraints
>
> No, it wouldn't make any noticeable difference AFAICS. It would
> postpone the work from end-of-statement to end-of-transaction,
> but not make the work happen any more (or less) efficiently.
It could make a difference if the transaction is rather long and updates the
same row repeatedly because of better cache usage. But I admit thats a bit of
a constructed scenario (where one likely would get into trigger-queue size
problems as well)
Andres
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: andres@anarazel.de, tgl@sss.pgh.pa.us, franck.routier@axege.com
Subject: Re: Deferred constraint and delete performance
In-Reply-To: <201002101836.25964.andres@anarazel.de>
* 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