Re: Planner avoidance of index only scans for partial indexes
| От | Tom Lane |
|---|---|
| Тема | Re: Planner avoidance of index only scans for partial indexes |
| Дата | |
| Msg-id | 25141.1345072858@sss.pgh.pa.us обсуждение |
| Ответ на | Planner avoidance of index only scans for partial indexes (Merlin Moncure <mmoncure@gmail.com>) |
| Список | pgsql-hackers |
Merlin Moncure <mmoncure@gmail.com> writes:
> If you create an index like this:
> create index on foo(a,b,v) where d = some_constant;
> there is no way to get an IOS on the index: you have to supply a the
> partial index exclusionary value to get the value of the index and
> that fools the IOS chooser because it doesn't see the value in the
> explicit list of index columns.
Yeah, this is a known limitation that we'll probably try to improve
someday. Per the comment in check_index_only():
/* * Check that all needed attributes of the relation are available from the * index. * * XXX this is
overlyconservative for partial indexes, since we will * consider attributes involved in the index predicate as
requiredeven * though the predicate won't need to be checked at runtime. (The same is * true for attributes used
onlyin index quals, if we are certain that * the index is not lossy.) However, it would be quite expensive to *
determinethat accurately at this point, so for now we take the easy * way out. */
regards, tom lane
В списке pgsql-hackers по дате отправления: