From: | "Colin Gillespie" <C(dot)Gillespie(at)newcastle(dot)ac(dot)uk> |
---|---|
To: | "Andrew Hammond" <ahammond(at)ca(dot)afilias(dot)info> |
Cc: | <pgsql-novice(at)postgresql(dot)org> |
Subject: | Re: Slow delete |
Date: | 2004-12-07 17:37:09 |
Message-ID: | 20DA376D0C991745A4D5249F7BCD7A2521B4F7@largo.campus.ncl.ac.uk |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | Neil | 2004-12-08 06:07:14 | Re: message type 0x44 |
Previous Message | Andrew Hammond | 2004-12-07 17:14:35 | Re: Slow delete |