Re: Deferred constraint and delete performance

From: Andres Freund
Subject: Re: Deferred constraint and delete performance
Date: ,
Msg-id: 201002101836.25964.andres@anarazel.de
(view: Whole thread, Raw)
In response to: 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  (Віталій Тимчишин, )

On Wednesday 10 February 2010 15:56:40 Tom Lane wrote:
> Franck Routier <> 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


pgsql-performance by date:

From: Jon Lewison
Date:
Subject: Re: perf problem with huge table
From: Dave Crooke
Date:
Subject: Re: perf problem with huge table