Re: not exits slow compared to not in. (nested loops killing me)

Поиск
Список
Период
Сортировка
От Craig Ringer
Тема Re: not exits slow compared to not in. (nested loops killing me)
Дата
Msg-id 4DED5DB5.4030309@postnewspapers.com.au
обсуждение исходный текст
Ответ на not exits slow compared to not in. (nested loops killing me)  (mark <dvlhntr@gmail.com>)
Ответы Re: not exits slow compared to not in. (nested loops killing me)  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: not exits slow compared to not in. (nested loops killing me)  ("mark" <dvlhntr@gmail.com>)
Список pgsql-performance
On 06/07/2011 04:38 AM, mark wrote:

> NOT EXISTS (with 64MB of work_mem)
> http://explain.depesz.com/s/EuX

Hash Anti Join (cost=443572.19..790776.84 rows=1 width=1560)
(actual time=16337.711..50358.487 rows=2196299 loops=1)

Note the estimated vs actual rows. Either your stats are completely
ridiculous, or the planner is confused.

What are your stats target levels? Have you tried increasing the stats
levels on the table(s) or at least column(s) affected? Or tweaking
default_statistics_target if you want to use a bigger hammer?

Is autovacuum being allowed to do its work and regularly ANALYZE the
database? Does an explicit 'ANALYZE' help?

--
Craig Ringer

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: 8.4/9.0 simple query performance regression
Следующее
От: Tom Lane
Дата:
Сообщение: Re: not exits slow compared to not in. (nested loops killing me)