Re: NOT IN query takes forever

Поиск
Список
Период
Сортировка
От Stephan Szabo
Тема Re: NOT IN query takes forever
Дата
Msg-id 20040803065928.Y88907@megazone.bigpanda.com
обсуждение исходный текст
Ответ на NOT IN query takes forever  (Marius Andreiana <mandreiana@rdslink.ro>)
Список pgsql-performance
On Tue, 3 Aug 2004, Marius Andreiana wrote:

> I just vacuum analyse'd the database.
>
> Trying to run this query:
> EXPLAIN ANALYSE
> select * FROM trans
> WHERE query_id NOT IN (select query_id FROM query)
>
> but it will remain like that forever (cancelled after 30 min).
>
> My postgresql.conf is the default:
> # - Memory -
>
> shared_buffers = 1000           # min 16, at least max_connections*2,
> 8KB each
> #sort_mem = 1024                # min 64, size in KB
> #vacuum_mem = 8192              # min 1024, size in KB
>
> Should I adjust something?

Probably sort_mem.  It's probably estimating that it can't hash the result
into the 1MB of sort_mem so it's probably falling back to some sort of
nested execution.


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

Предыдущее
От: "Merlin Moncure"
Дата:
Сообщение: Re: NOT IN query takes forever
Следующее
От: "Matthew T. O'Connor"
Дата:
Сообщение: Re: pg_autovacuum parameters