Re: BUG #1398: Delete takes a long time & explain disagrees with \timing

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Karl Martindale" <karl(at)cyber(dot)com(dot)au>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #1398: Delete takes a long time & explain disagrees with \timing
Date: 2005-01-14 15:11:35
Message-ID: 23535.1105715495@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

"Karl Martindale" <karl(at)cyber(dot)com(dot)au> writes:
> Deletes from this particular table take a long time (~5 min for 6000rows)

This usually occurs when you have another table with a foreign key
reference to this one, and the referencing column either has no index or
isn't of the exact same datatype as the referenced column. The FK
checks then are forced to use sequential scans instead of index probes
:-(

regards, tom lane

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Yves.Carlier 2005-01-14 16:26:50 success in compiler Postgres 8.0.0rc5 on Red Hat ES3.0 (update 4) on Intel EM64T
Previous Message Alvaro Herrera 2005-01-14 14:03:14 Re: Bug Report