by ahodgson@[EMAIL PROTECTED]
(Alan Hodgson)
Jul 4, 2008 at 08:48 AM
On Friday 04 July 2008, tv@[EMAIL PROTECTED]
wrote:
> > My next question is: what is the difference between "select" and
> > "delete"? There is another table that has one foreign key to reference
> > the test (parent) table that I am deleting from and this foreign key
> > does not have an index on it (a 330K row table).
>
Yeah you need to fix that. You're doing 80,000 sequential scans of that
table to do your delete. That's a whole lot of memory access ...
I don't let people here create foreign key relation****ps without matching
indexes - they always cause problems otherwise.
--
Alan
--
Sent via pgsql-performance mailing list (pgsql-performance@[EMAIL PROTECTED]
)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance