Re: Risk Estimation WAS: Planner hints in Postgresql
От | Tom Lane |
---|---|
Тема | Re: Risk Estimation WAS: Planner hints in Postgresql |
Дата | |
Msg-id | 23908.1395168119@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: Risk Estimation WAS: Planner hints in Postgresql (Atri Sharma <atri.jiit@gmail.com>) |
Ответы |
Re: Risk Estimation WAS: Planner hints in Postgresql
|
Список | pgsql-hackers |
Atri Sharma <atri.jiit@gmail.com> writes: > One of the factors that leads to bad estimates is that the histogram of the > values of a column maintained by the planner gets old by time and the data > in the column changes. So, the histogram is no longer a quite accurate view > of the data and it leads to bad selectivity. TBH, this is so far down the list of problems that it'll be a long time before we need to worry about it. It's certainly not the number one priority for any project to model risk in the planner. The thing that I think is probably the number one problem is estimates that depend on an assumption of uniform distribution of sought-after rows among those encountered by a scan. This is usually where bad plans for LIMIT queries are coming from. We could certainly add some sort of fudge factor to those costs, but I'd like to have a more-or-less principled framework for doing so. regards, tom lane
В списке pgsql-hackers по дате отправления: