Re: Planner hints in Postgresql
От | Claudio Freire |
---|---|
Тема | Re: Planner hints in Postgresql |
Дата | |
Msg-id | CAGTBQpaHMyyYCqX8U=X2CBCOipYX27qbbmg9Fyj8AhEN6Cq5Dg@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Planner hints in Postgresql (Jim Nasby <jim@nasby.net>) |
Ответы |
Re: Planner hints in Postgresql
Re: Planner hints in Postgresql |
Список | pgsql-hackers |
<div dir="ltr"><div class="gmail_extra"><br /><div class="gmail_quote">On Mon, Mar 17, 2014 at 7:01 PM, Jim Nasby <span dir="ltr"><<ahref="mailto:jim@nasby.net" target="_blank">jim@nasby.net</a>></span> wrote:<br /><blockquote class="gmail_quote"style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="a3s" id=":1nx" style="overflow:hidden">Evenbetter would be if the planner could estimate how bad a plan will become if we made assumptionsthat turn out to be wrong.<br /></div></blockquote></div><br /></div><div class="gmail_extra">That's preciselywhat risk estimation was about.<br /><br /></div>Something like<br /><div class="gmail_extra"><br /></div><div class="gmail_extra">SELECT* FROM wherever WHEN id > something LIMIT COST 10000;<br /><br /></div><div class="gmail_extra">Wouldforbid a sequential scan *if* the table is big enough to suspect the plan might take that much,or a nested loop *if* the planner cannot *prove* it will be faster than that.<br /><br /></div><div class="gmail_extra">Idon't believe the limit unit is obscure at all (page fetches being a nice measuring stick), but whatis, is what do you do when no plan fits the limits.<br /><br /></div></div>
В списке pgsql-hackers по дате отправления: