Re: Slow query (planner insisting on using 'external merge' sort type)

Поиск
Список
Период
Сортировка
От Ian Pushee
Тема Re: Slow query (planner insisting on using 'external merge' sort type)
Дата
Msg-id 55842DF1.9040208@intuvisiontech.com
обсуждение исходный текст
Ответ на Re: Slow query (planner insisting on using 'external merge' sort type)  (Andreas Kretschmer <andreas@a-kretschmer.de>)
Ответы Re: Slow query (planner insisting on using 'external merge' sort type)
Список pgsql-performance

On 6/19/2015 10:47 AM, Andreas Kretschmer wrote:
>> Explain Analyze outputs (links as requested):
>> Default plan: http://explain.depesz.com/s/ib3k
>> Forced index (random_page_cost=1.0): http://explain.depesz.com/s/lYaP
>>
>> Software/Hardware: PGSql 9.2.1, Windows 8.1, 8GB RAM
>> All pgsql settings are at their defaults.
> increase work_mem. per session via set work_mem  = 'xxxMB'; or in
> postgresql.conf, reload.
>
>

Hi Andreas,

The number of rows in the events table isn't constrained, so
unfortunately it isn't feasible to set work_mem high enough to allow an
in-memory sort. Forcing the planner to use the index works to produce a
fast query, so I'm wondering if there is a more general way to getting
the planner to take into account that work_mem isn't big enough to fit
the query which will result in a MUCH more costly external merge.

Thanks,
-Ian


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

Предыдущее
От: Ian Pushee
Дата:
Сообщение: Re: Slow query (planner insisting on using 'external merge' sort type)
Следующее
От: Igor Neyman
Дата:
Сообщение: Re: Slow query (planner insisting on using 'external merge' sort type)