Re: [PERFORM] Deferred constraint and delete performance

2010-02-14 Thread Віталій Тимчишин
2010/2/10 Tom Lane > 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

Re: [PERFORM] Deferred constraint and delete performance

2010-02-10 Thread Andres Freund
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.

Re: [PERFORM] Deferred constraint and delete performance

2010-02-10 Thread Tom Lane
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-transac

[PERFORM] Deferred constraint and delete performance

2010-02-10 Thread Franck Routier
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 a