Re: bad estimates

Поиск
Список
Период
Сортировка
Искать
От
Ken Geis
Тема
Re: bad estimates
Дата
Msg-id
3F505465.6010504@speakeasy.org
Ответ на
Re: bad estimates (Bruno Wolff III)
Список
Дерево обсуждения
bad estimates / non-scanning aggregates Ken Geis <kgeis@speakeasy.org>
Re: bad estimates / non-scanning aggregates Bruno Wolff III <bruno@wolff.to>
Re: bad estimates / non-scanning aggregates Ken Geis <kgeis@speakeasy.org>
Re: bad estimates / non-scanning aggregates Bruno Wolff III <bruno@wolff.to>
Re: bad estimates / non-scanning aggregates Ken Geis <kgeis@speakeasy.org>
Re: bad estimates / non-scanning aggregates Bruno Wolff III <bruno@wolff.to>
Re: bad estimates Ken Geis <kgeis@speakeasy.org>
Re: bad estimates Bruno Wolff III <bruno@wolff.to>
Re: bad estimates Ken Geis <kgeis@speakeasy.org>
Re: bad estimates Bruno Wolff III <bruno@wolff.to>
Re: bad estimates Ken Geis <kgeis@speakeasy.org>
Re: bad estimates Ken Geis <kgeis@speakeasy.org>
Re: bad estimates Jeff <threshar@torgo.978.org>
Re: bad estimates Ken Geis <kgeis@speakeasy.org>
Re: bad estimates Bruno Wolff III <bruno@wolff.to>
Re: bad estimates Ken Geis <kgeis@speakeasy.org>
Re: bad estimates Tom Lane <tgl@sss.pgh.pa.us>
Re: bad estimates Ken Geis <kgeis@speakeasy.org>
Re: bad estimates Ken Geis <kgeis@speakeasy.org>
Re: bad estimates Stephan Szabo <sszabo@megazone.bigpanda.com>
Re: bad estimates Ken Geis <kgeis@speakeasy.org>
Re: bad estimates Sean Chittenden <sean@chittenden.org>
Re: bad estimates Ken Geis <kgeis@speakeasy.org>
Re: bad estimates Sean Chittenden <sean@chittenden.org>
Bruno Wolff III wrote:
> I haven't come up with any great ideas for this one. It might be interesting
> to compare the explain analyze output from the distinct on query with
> and without seqscans enabled.

After digging through planner code, I found that bumping up the sort_mem 
will make the planner prefer a full table scan and hashed aggregation. 
The sort memory is where the hash table is stored.  In the end, the 
query runs in 4.5 minutes, which is reasonable.

I had planned to try Manfred's index correlation patch to see if it 
would give better estimates for an index scan.  The index scan method 
took maybe 6.5x as long, but the estimate was that it would take 1400x 
as long.  I think instead of trying out his patch I might actually work 
on my application!


Ken

В списке pgsql-performance по дате отправления
От: Rob Nagler
Дата:
Сообщение: How to force Nested Loop plan?
От: Rod Taylor
Дата:
FAQ