Re: Query optimizer plans with very small selectivity estimates
В списке pgsql-performance по дате отправления:
| От | Tom Lane |
|---|---|
| Тема | Re: Query optimizer plans with very small selectivity estimates |
| Дата | |
| Msg-id | 2141.1446143047@sss.pgh.pa.us обсуждение |
| Ответ на | Query optimizer plans with very small selectivity estimates (Matthew Bellew <matthewb@labkey.com>) |
| Список | pgsql-performance |
Matthew Bellew <matthewb@labkey.com> writes:
> I made have several users encounter performance problems, which all
> seem to come down to this problem: multiplying selectivity estimates can
> cause tuple estimates to grow very small very quickly, once the estimator
> gets to 1 row, the planner may choose plans that are very good ONLY WHEN
> there is exactly 1 row (maybe even O(N^large)). Unfortunately, these may
> be the worst plans if the estimate is even slightly off (even just
> returning 2 or 3 rows versus 1).
Yeah, this is a well-known problem. There has been prior discussion along
the same lines as you mention (only believe 1-row estimates when it's
provably true that there's at most one row), but it hasn't looked like an
easy change. See the pgsql-hackers archives for previous threads.
regards, tom lane
В списке pgsql-performance по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера