Re: Source Code Help Needed - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Source Code Help Needed
Date
Msg-id 4132.1117805367@sss.pgh.pa.us
Whole thread Raw
In response to Re: Source Code Help Needed  (Vikram Kalsi <vikramkalsi@gmail.com>)
List pgsql-hackers
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


pgsql-hackers by date:

Previous
From: vamsi krishna
Date:
Subject: need help
Next
From: Tom Lane
Date:
Subject: Re: pg_stats not getting updated....