when is a DELETE FK trigger planned?

From: Andrew Lazarus <andrew(at)pillette(dot)com>
To: pgsql-performance(at)postgresql(dot)org
Subject: when is a DELETE FK trigger planned?
Date: 2008-02-25 20:56:26
Message-ID: 010161370.20080225125626@pillette.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

I have a cascading delete trigger that is obviously using a seqscan.
(Explain analyze shows that trigger as taking over 1000s while all
other triggers are <1s. The value in test delete didn't even appear in
this child table, so an index scan would have been almost instant.)

If I do
DELETE FROM child_table WHERE fkey = value;
I get an index scan. Why doesn't the trigger do that, and how can I
force it to re-plan?

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Stephen Denne 2008-02-25 21:19:06 Re: Weird issue with planner choosing seq scan
Previous Message Joel Stevenson 2008-02-25 20:37:24 Re: LISTEN / NOTIFY performance in 8.3