Re: Slow delete - Mailing list pgsql-novice

From Colin Gillespie
Subject Re: Slow delete
Date
Msg-id 20DA376D0C991745A4D5249F7BCD7A2521B4F7@largo.campus.ncl.ac.uk
Whole thread Raw
In response to Slow delete  ("Colin Gillespie" <C.Gillespie@newcastle.ac.uk>)
List pgsql-novice
>
>
>-----BEGIN PGP SIGNED MESSAGE-----
>Hash: SHA1
>
>Colin Gillespie wrote:
>| Dear All,
>|
>| I have four tables linked together with FK. An example is,
>deleting an
>| id in one table, deletes 1,000,000 rows in all the others. However,
>| this operation takes 2-3mins (currently this more or less empties the
>database.)
>| Is this slow?
>
>Depends on what hardware you're using. It sounds like you've
>done the right thing so far. I assume you've run explain on
>the stuff involved to make sure it's actually using those indexes.
We're have a 2.4Ghz Xeon with 2GB RAM. I've ran explain on SELECT
queries and they use the indexes. So I presume that the delete would
also use them.

When I use cluster it takes the time down to a few seconds . Is this the
best way then?

Thanks again

Colin

pgsql-novice by date:

Previous
From: "Douglas"
Date:
Subject: Get comment
Next
From: Neil
Date:
Subject: message type 0x44 - Again