Re: Partial hash index is not used for implied qual.
| От | Tom Lane |
|---|---|
| Тема | Re: Partial hash index is not used for implied qual. |
| Дата | |
| Msg-id | 1106189.1764033798@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Re: Partial hash index is not used for implied qual. (David Rowley <dgrowleyml@gmail.com>) |
| Ответы |
Re: Partial hash index is not used for implied qual.
|
| Список | pgsql-hackers |
David Rowley <dgrowleyml@gmail.com> writes:
> so, that leads me to believe the location you're adjusting is probably
> the best place to fix this issue.
Wouldn't it be better to handle it more like the is_target_rel logic
a few lines further up? I also object to putting the test between
the contain_mutable_functions and predicate_implied_by calls; that's
both confusing and probably wrong. We're only calling
contain_mutable_functions to guard an assumption that
predicate_implied_by makes.
A larger point is that I think leaving such quals in indrestrictinfo
probably distorts our estimates of indexscan costs: we are likely to
think they contribute selectivity when they don't. Maybe that's a
problem to address separately, but it should be looked at. We skated
past the same problem for is_target_rel cases on the grounds that that
consideration affects all indexes on the rel equally; but as proposed,
this will probably result in an improper bias towards a partial hash
index.
regards, tom lane
В списке pgsql-hackers по дате отправления: