On Wed, 2004-07-28 at 23:41, Janning Vygen wrote: > Hi, > > EXPLAIN on delete stamements works, but doesn't show me all the subsequent > deletes or checks which has to be done because of foreign keys > cascading/restricting. > > Is there a solution to show up which tables are checked and which scans the > planner is going to use to check these related tables?
You could try enabling the 'log_statement' and related entries in the postgresql.conf file and possibly the -d option for debugging on the Postmaster. I know I get the referential integrity check queries showing up in the PostgreSQL log (syslog actually) on my server but I'm not exactly sure what I did to cause that :-). Here's an example: LOG: statement: SELECT 1 FROM ONLY "public"."audit_type" x WHERE "audit_type_id" = $1 FOR UPDATE OF x Regards Grant ---------------------------(end of broadcast)--------------------------- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])