how can i show constraint checks in explain ?

From: Jonathan Vanasco <postgres(at)2xlp(dot)com>
To: pgsql general <pgsql-general(at)postgresql(dot)org>
Subject: how can i show constraint checks in explain ?
Date: 2007-03-17 18:45:22
Message-ID: 4D038984-BFF1-4010-AE8B-699305904AA6@2xlp.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


I've got a DELETE query that takes ~2 seconds to process

The reasoning is simple -- its doing referential checks, to make sure
that I'm not deleting a valid fkey , as several tables fkey on that
one.

The issue i'm running into is obvious: this should not take 2
seconds. anything that fkeys should have that column as an index
already. very likely, one doesn't because I messed up when I
created the dable.

However-- explain doesn't pull in the planner's scanning info in
regards to the fkey constraints. is there any function or argument
that will ?

i'd like to know which tables are getting what must be a sequential
scan and not an index scan, so I can reindex properly.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Dany DeBontridder 2007-03-17 18:49:15 dump strored function
Previous Message Cesar Alvarez 2007-03-17 16:46:48 Re: Store Procedures