Re: Slow subquery on large dataset

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Slow subquery on large dataset
Дата
Msg-id 9923.1077346732@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Slow subquery on large dataset  (bob_bamber@hotmail.com (Bob))
Список pgsql-novice
bob_bamber@hotmail.com (Bob) writes:
> I'm having some performance issues when querying a couple of tables
> containing a large amount of data.

> foo=# SELECT data_id FROM capacity_data WHERE data_id NOT IN (SELECT
> data_id FROM capacities);

Try PG 7.4, or if you're on 7.4, try increasing sort_mem.  IN and NOT IN
have pretty sucky performance in earlier releases.  (If you can't
upgrade for some reason, you could try using EXISTS instead of IN.)

            regards, tom lane

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

Предыдущее
От: "V i s h a l Kashyap @ [Sai Hertz And Control Systems]"
Дата:
Сообщение: Re: HTML email
Следующее
От: joseph speigle
Дата:
Сообщение: Re: Create Rule