Re: Slow deletes - Mailing list pgsql-general

From Tom Lane
Subject Re: Slow deletes
Date
Msg-id 24836.1029243912@sss.pgh.pa.us
Whole thread Raw
In response to Re: Slow deletes  (Edmund Dengler <edmundd@eSentire.com>)
List pgsql-general
Edmund Dengler <edmundd@eSentire.com> writes:
> Aha, I did have a dependency I missed. I did a pull from a dump:
> CREATE CONSTRAINT TRIGGER "<unnamed>" AFTER DELETE ON "syslog_event"
> FROM "syslog_event_message_event" NOT DEFERRABLE INITIALLY IMMEDIATE
> FOR EACH ROW EXECUTE PROCEDURE
> "RI_FKey_cascade_del" ('<unnamed>', 'syslog_event_message_event',
> 'syslog_event', 'UNSPECIFIED', 'event_id', 'event_id');

> Both columns are the same type (int8).

> => \d syslog_event_message_event
> Table "syslog_event_message_event"
>    Column   |  Type  | Modifiers
> ------------+--------+-----------
>  message_id | bigint | not null
>  event_id   | bigint | not null
> Primary key: syslog_event_message_event_pkey
> Triggers: RI_ConstraintTrigger_13220957

> The table contains no rows (previously deleted, vacuumed, and analyzed).

I can't tell from this which column is the primary key?  (Fortunately
someone improved the \d output so that that will be apparent in 7.3...)

Generally you want to be sure that indexes are available on both the
referenced and referencing columns of a foreign-key relationship...

            regards, tom lane

pgsql-general by date:

Previous
From: Larry Rosenman
Date:
Subject: Re: [HACKERS] Linux Largefile Support In Postgresql RPMS
Next
From: Martijn van Oosterhout
Date:
Subject: Re: [HACKERS] Linux Largefile Support In Postgresql RPMS