| От | Tom Lane |
|---|---|
| Тема | Re: PG choosing nested loop for set membership? |
| Дата | |
| Msg-id | 5190.1395852185@sss.pgh.pa.us обсуждение |
| Ответ на | Re: PG choosing nested loop for set membership? (Brian Crowell <brian@fluggo.com>) |
| Ответы |
Re: PG choosing nested loop for set membership?
|
| Список | pgsql-general |
Brian Crowell <brian@fluggo.com> writes:
> Which says to me coalesce has a selectivity.
Well, the point is you're just getting a default selectivity estimate
for the "acc.rule_set_id = coalesce(...anything...)" condition. The
planner is smarter about plain "x = y" join conditions: it looks up
the column stats for x and y and determines the probability of equality.
In principle I guess we could somehow merge the stats of y and z
when looking at a "coalesce(y, z)" expression, but I'm not sure
how that would work exactly.
regards, tom lane
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера