Re: 7.4 - FK constraint performance
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: ow <oneway_111@yahoo.com>
Cc: pgsql-sql@postgresql.org
Date: 2004-02-12T15:54:20Z
Lists: pgsql-hackers, pgsql-sql
ow <oneway_111@yahoo.com> writes: > When I try to delete record, it takes > 3 min. I think it must be using a seqscan for the foreign key check query. Could you try this and show the results? prepare foo(my.dint) as SELECT 1 FROM ONLY "my"."large" x WHERE "small_id" = $1 FOR UPDATE OF x; explain analyze execute foo(239); When I try it I see an indexscan plan, but maybe there's some aspect of your setup that's causing problems. regards, tom lane