setting for maximum acceptable plan cost?

Поиск
Список
Период
Сортировка
От Jeffrey W. Baker
Тема setting for maximum acceptable plan cost?
Дата
Msg-id 1194036567.11267.19.camel@squeak
обсуждение исходный текст
Ответы Re: setting for maximum acceptable plan cost?
Re: setting for maximum acceptable plan cost?
Список pgsql-general
I was thinking that it might be nice to be able to tell postgres to
refuse to execute any plan with an estimated cost above some threshold.
For example, earlier today I produced this extremely bogus execution
plan with the following top line:

Nested Loop Left Join  (cost=13920.16..2257575559347.46 rows=3691992705807 width=128)

After a call to ANALYZE, the same query gave me:

Merge Left Join  (cost=16382.02..16853.87 rows=126768 width=59)

And runs in 5 seconds.  If I had been able to tell pg to reject any plan
with cost over, say 10E9, that would have saved my server from half an
hour of nested sequential scans.

Should I just use statement_timeout as a proxy for this?

-jwb


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

Предыдущее
От: andy
Дата:
Сообщение: Re: Populating large DB from Perl script
Следующее
От: "Joshua D. Drake"
Дата:
Сообщение: Re: setting for maximum acceptable plan cost?