Re: Slow deletion of data from tables - Mailing list pgsql-general

From Tom Lane
Subject Re: Slow deletion of data from tables
Date
Msg-id 2840.1089434480@sss.pgh.pa.us
Whole thread Raw
In response to Re: Slow deletion of data from tables  (Grant McLean <grant@catalyst.net.nz>)
List pgsql-general
Grant McLean <grant@catalyst.net.nz> writes:
> On Fri, 2004-07-02 at 04:35, Rune Froysa wrote:
>> I have one table with columns that are used as foreign-keys from
>> several other tables.  Sometimes deletion from this table takes +5
>> seconds for a single row.

> Do you have indexes on the foreign key columns in the child tables?

Also: if you do have indexes on the referenced columns, they may still
not get used because of datatype mismatches.  It's generally a good idea
to make sure that referenced and referencing columns of a foreign-key
constraint have exactly the same datatype.

            regards, tom lane

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: SUBSTRING for a regular expression
Next
From: Tom Lane
Date:
Subject: Re: Difference in text/char data matching between 7.3.4 & 7.4.2