Re: Index only scans for expressional indices when querying for the expression

Поиск
Список
Период
Сортировка
От Danny Shemesh
Тема Re: Index only scans for expressional indices when querying for the expression
Дата
Msg-id CAFZC=Qo-4c8o4bg9qzCUf65wZucKkjP+ZEJa2R05G__f_Ht8cQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Index only scans for expressional indices when querying for the expression  ("David G. Johnston" <david.g.johnston@gmail.com>)
Ответы Re: Index only scans for expressional indices when querying for the expression  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
Hey David - thanks for the prompt response !

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 ?

Or in other words, if one only ever queries f(x), and the only available index is on f(x), then the index will hold all f(x) values
and would never need to reverse engineer the value of x to answer such a specific query.

Danny

On Thu, Aug 4, 2022 at 3:28 PM David G. Johnston <david.g.johnston@gmail.com> wrote:
On Thursday, August 4, 2022, Danny Shemesh <dany74q@gmail.com> wrote:
I believe the expressional index in itself could've been considered as covering, when querying for the expression explicitly.

This belief is wrong.  When storing f(x) there is no way to recover the value of x.

David J.
 

В списке pgsql-general по дате отправления:

Предыдущее
От: "David G. Johnston"
Дата:
Сообщение: Re: Index only scans for expressional indices when querying for the expression
Следующее
От: Aleš Zelený
Дата:
Сообщение: Re: PostgreSQL 14.4 ERROR: out of memory issues