Re: ADD FOREIGN KEY (was Re: [GENERAL] 7.4Beta)

From: Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>
To: Hannu Krosing <hannu(at)tm(dot)ee>
Cc: Andreas Pflug <pgadmin(at)pse-consulting(dot)de>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: ADD FOREIGN KEY (was Re: [GENERAL] 7.4Beta)
Date: 2003-09-29 10:28:44
Message-ID: 3F78095C.5080507@familyhealth.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers


>>So a db designer made a bloody mistake.
>>The problem is there's no easy way to find out what's missing.
>>I'd really like EXPLAIN to display all subsequent triggered queries
>>also, to see the full scans caused by missing indexes.
>
>
> It could probably be doable for EXPLAIN ANALYZE (by actually tracing
> execution), but then you will see really _all_ queries, i.e. for a 1000
> row update you would see 1 UPDATE query and 1000 fk checks ...
>
> OTOH, you probably can get that already from logs with right logging
> parameters.

Actually - it shouldn't be too hard to write a query that returns all
unindexed foreign keys, surely?

Chris

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Shridhar Daithankar 2003-09-29 10:34:57 Re: ADD FOREIGN KEY (was Re: [GENERAL] 7.4Beta)
Previous Message Shridhar Daithankar 2003-09-29 10:19:59 Re: finding memory leaks in extensions

Browse pgsql-hackers by date

  From Date Subject
Next Message Shridhar Daithankar 2003-09-29 10:34:57 Re: ADD FOREIGN KEY (was Re: [GENERAL] 7.4Beta)
Previous Message Hannu Krosing 2003-09-29 09:57:13 Re: ADD FOREIGN KEY (was Re: [GENERAL] 7.4Beta)