Re: Index only scans for expressional indices when querying for the expression
В списке pgsql-general по дате отправления:
| От | Tom Lane |
|---|---|
| Тема | Re: Index only scans for expressional indices when querying for the expression |
| Дата | |
| Msg-id | 3435275.1659620316@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Re: Index only scans for expressional indices when querying for the expression (Danny Shemesh <dany74q@gmail.com>) |
| Ответы |
Re: Index only scans for expressional indices when querying for the expression
|
| Список | pgsql-general |
Danny Shemesh <dany74q@gmail.com> writes:
> That is of course correct, but what I mean is that, I think that if one
> would explicitly query f(x), and never for x directly, it would've been
> theoretically possible to say that the index is covering for every f(x),
> wouldn't it ?
Theoretically, yeah, but we don't support that: an index-only scan
will only be considered if x itself is available from the index.
There are a couple of reasons for that, but the main one is that
detecting whether an index matches the query would be far more expensive
if it had to consider expression subtrees not just the base Vars.
regards, tom lane
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера