Re: Planner hints in Postgresql
От | Claudio Freire |
---|---|
Тема | Re: Planner hints in Postgresql |
Дата | |
Msg-id | CAGTBQpZ13kbHV3mJppvk0wEJyfUDPSOKhJEG7iaSgYQVnT7xig@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Planner hints in Postgresql (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
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 8:47 PM, Tom Lane <span dir="ltr"><<ahref="mailto:tgl@sss.pgh.pa.us" target="_blank">tgl@sss.pgh.pa.us</a>></span> wrote:<br /><blockquoteclass="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="">ClaudioFreire <<a href="mailto:klaussfreire@gmail.com">klaussfreire@gmail.com</a>> writes:<br /> > On Mon,Mar 17, 2014 at 7:01 PM, Jim Nasby <<a href="mailto:jim@nasby.net">jim@nasby.net</a>> wrote:<br /> >> Evenbetter would be if the planner could estimate how bad a plan will<br /> >> become if we made assumptions that turnout to be wrong.<br /><br /> > That's precisely what risk estimation was about.<br /><br /></div>Yeah. I would liketo see the planner's cost estimates extended to<br /> include some sort of uncertainty estimate, whereupon risk-aversepeople<br /> could ask it to prefer low-uncertainty plans over high-uncertainty ones<br /> (the plans we typicallychoose for ORDER BY ... LIMIT queries being great<br /> examples of the latter). But it's a long way from wishingthat to making<br /> it so. Right now it's not even clear (to me anyway) how we'd measure or<br /> model such uncertainty.<br/></blockquote></div><br /></div><div class="gmail_extra">Well, currently, selectivity estimates based onMCV should be pretty low-uncertainty, whereas certainty of other estimates could be modeled as a random variable if ANALYZEgathered a few statistical moments (for variables that are prone to that kind of statistical analysis).<br /><br /></div><divclass="gmail_extra">That alone could improve things considerably, and statistical info could be propagated alongexpressions to make it possible to model uncertainty in complex expressions as well.<br /><br /></div></div>
В списке pgsql-hackers по дате отправления: