eliminating records not in (select id ... so SLOW?

From: Ivan Sergio Borgonovo <mail(at)webthatworks(dot)it>
To: PostgreSQL <pgsql-general(at)postgresql(dot)org>
Subject: eliminating records not in (select id ... so SLOW?
Date: 2008-07-31 21:45:30
Message-ID: 20080731234530.32f0f62e@dawn.webthatworks.it
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I'm doing something like:

delete from table1 where id not in (select id from table2).

both id are indexed.

table1 contains ~1M record table2 contains ~ 600K record and id is
unique.

The box is a 2x dual core Xeon (below 2GHz) with 4Gb ram.
Default debian etch setup.

It has been working for over 2h now.

Is it normal?

--
Ivan Sergio Borgonovo
http://www.webthatworks.it

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Andrew 2008-07-31 21:57:50 hibernate nativequery and uuid
Previous Message Warren Bell 2008-07-31 21:05:58 Re: CAST(integer_field AS character) truncates trailing zeros