question about "delete performance"

From: <yourfriend(at)hf-sanyo(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: question about "delete performance"
Date: 2005-01-24 04:29:12
Message-ID: 20050124043151.9AA6A3A5351@svr1.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I have a table with 500,000 records which has some invalid records, I had wrote a program to check it, by the program I get all OIDs of the redundant records, so I use "delete from tableXXX where oid =XXX1 or oid =XXX2 or oid =XXX3 ... or oid=XXX1000, but it take me a long time to complete this action, then I change the query to " delete from tableXXX where oid in (XXX1,XXX2,XXX3,....X1000) ", but I got same result, does anyone can tell me the reason or postgresql has a bad performance in such situation.

Thanks for help !

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Zhou.daojing on 2005/01/24
Email: yourfriend(at)hf-sanyo(dot)com
Tel: 0551-5338001
Fax: 0551-5319984
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Robert Creager 2005-01-24 05:04:24 Re: question about "delete performance"
Previous Message Tom Lane 2005-01-24 02:50:43 Re: Postgres crashed when adding a sequence column