Sub-selects taking way too long..

From: "Alexis Maldonado" <amaldona(at)ctcd(dot)cc(dot)tx(dot)us>
To: <pgsql-general(at)postgresql(dot)org>
Subject: Sub-selects taking way too long..
Date: 2002-04-09 20:14:42
Message-ID: 003e01c1e003$2f52be00$14818b0a@ctcd.cc.tx.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Ok.. I know its provably something im doing dumb..
but here it goes..

I have 2 tables that are the same:

"temp_table" and "table"

"temp _table" has 7,761 rows and "table" is empty

the columns for both tables are: ID (primary key sequence), index, column1,
column2

when i run:

Insert Into table
select index, column1, column2
from temp_table
where index NOT IN (select index from table)

it takes 40 MINUTES to execute..
i dont know what im doing wrong here both tables have "index" indexed ..
help...

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message David Esposito 2002-04-09 20:15:26 Re: vacuuming not working?
Previous Message Jean-Luc Lachance 2002-04-09 19:54:58 table alias nor valid for delete