Vikram Kalsi <vikramkalsi@gmail.com> writes:
> ...
> tpcd=# select s_suppkey from supplier where (s_suppkey>125 and
> s_suppkey<128) or (s_suppkey>175 and s_suppkey<185) or (s_suppkey>200 and
> s_suppkey<215);
> ...
> Actually, it seems all
> the pointers in the List "indexinfo" or "infos" are pointing to the same
> object.
Given that query, it's not too surprising that the only relevant index
for all the OR clauses would be the one on s_suppkey ... if you want to
look at *all* the indexes on the relation, you need to scan the parent
RelOptInfo's indexlist.
You didn't say what it was you hoped to accomplish, but perhaps the
technique requires a more complicated query to be of any use?
BTW, best_or_subclause_indexes (and indeed most of orindxpath.c) is
gone in CVS tip; all that code has been rewritten for 8.1.
regards, tom lane