Re: Slow delete

From: Andrew Hammond <ahammond(at)ca(dot)afilias(dot)info>
To: Colin Gillespie <C(dot)Gillespie(at)newcastle(dot)ac(dot)uk>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Slow delete
Date: 2004-12-07 17:14:35
Message-ID: 41B5E4FB.7000305@ca.afilias.info
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.

|
| I have checked that the FK have been indexed and that they have been
declared intergers. A full vacuum has also been performed.
|
| Does anyone have any suggestions on how to speed this up?
|
| Thanks
|
| Colin
|
| ---------------------------(end of broadcast)---------------------------
| TIP 4: Don't 'kill -9' the postmaster

- --
Andrew Hammond 416-673-4138 ahammond(at)ca(dot)afilias(dot)info
Database Administrator, Afilias Canada Corp.
CB83 2838 4B67 D40F D086 3568 81FC E7E5 27AF 4A9A
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)

iD8DBQFBteT6gfzn5SevSpoRAkCCAKCV4Zojyw52c9POrjoHsnK0zjQDEgCgoQZw
hdDUThg/ojIojRWrLtiKBZg=
=Xs0l
-----END PGP SIGNATURE-----

In response to

  • Slow delete at 2004-12-07 10:54:41 from Colin Gillespie

Browse pgsql-novice by date

  From Date Subject
Next Message Colin Gillespie 2004-12-07 17:37:09 Re: Slow delete
Previous Message Vishal Kashyap @ [SaiHertz] 2004-12-07 16:16:24 Re: Import .sql file