Sub-selects taking way too long..

Поиск
Список
Период
Сортировка
От Alexis Maldonado
Тема Sub-selects taking way too long..
Дата
Msg-id 003e01c1e003$2f52be00$14818b0a@ctcd.cc.tx.us
обсуждение исходный текст
Ответ на Hash Join vs Nested Loops in 7.2.1 ...  (Ed Loehr <pggeneral@bluepolka.net>)
Ответы Re: Sub-selects taking way too long..  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
Список 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...


В списке pgsql-general по дате отправления:

Предыдущее
От: Jean-Luc Lachance
Дата:
Сообщение: table alias nor valid for delete
Следующее
От: "David Esposito"
Дата:
Сообщение: Re: vacuuming not working?