Merlin Moncure <mmonc...@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 overly conservative for partial indexes, since we will
     * consider attributes involved in the index predicate as required even
     * though the predicate won't need to be checked at runtime.  (The same is
     * true for attributes used only in index quals, if we are certain that
     * the index is not lossy.)  However, it would be quite expensive to
     * determine that accurately at this point, so for now we take the easy
     * way out.
     */

                        regards, tom lane


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to