| От | Igor |
|---|---|
| Тема | Very slow query, Help please! |
| Дата | |
| Msg-id | 993781368.20010414083248@osb368.nnov.ru обсуждение |
| Ответ на | Re: anti Christian bias? (Bruce Momjian <pgman@candle.pha.pa.us>) |
| Список | pgsql-general |
Hi !
Help me please to resolv my problem.
I have two tables . One of them is large (say 100000 records)
with unique index on "ID"
and the second table (5000 records ) which i have to insert
into the first table , but the second table have much records,
which have many duplicate values in "ID" . and this is
the query which i used for insertion:
insert into LTable select * from STable
where ID not in (select ID from LTable )
this query takes much time. and moreover - for big tables
i couldn't got result of query for about an hour, it looks
like so that it is die...
May be there is anoter way for insertion ?
Thanks for any suggestion!
Igor
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера