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