Re: Performance Question Followup No.2 - Mailing list pgsql-general

From Stephan Szabo
Subject Re: Performance Question Followup No.2
Date
Msg-id 20011107092825.B49204-100000@megazone23.bigpanda.com
Whole thread Raw
In response to Performance Question Followup No.2  (Gordan Bobic <gordan@bobich.net>)
Responses Re: Performance Question Followup No.2  (Gordan Bobic <gordan@bobich.net>)
List pgsql-general
On Wed, 7 Nov 2001, Gordan Bobic wrote:

> After just having split the action into two parts (FTI delete + Master
> delete), it would appear that most of the delay does come from the triggers
> executing.
>
> delete from masterfti where masterfti.id = master.id and master.entrytime <
> '31-Oct-2001';
> DELETE 172609
>
> Came back in about 10 seconds.
>
> delete from master where entrytime < '31-Oct-2001';
>
> is still going after 10 minutes even though there are no records in the FTI
> table that are being deleted.
>
> Is there an explanation for this? Anything that I should check? Any
> performance tweaks that would improve this situation?
>
> Sorry to go on about this, but I'm totally puzzled by this.

Have you tried restarting your connection and doing the set for the
sequence scan and then doing the first delete?  The foreign key
stuff caches a query plan the first time IIRC, so if you do the
set after it's run once, it isn't going to change its plan.




pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Performance Question Followup No.2
Next
From: Jean-Michel POURE
Date:
Subject: Re: Sourceforge on Oracle?