Skip site navigation (1) Skip section navigation (2)

Re: Source Code Help Needed

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Vikram Kalsi <vikramkalsi(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Source Code Help Needed
Date: 2005-06-03 13:29:27
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
Vikram Kalsi <vikramkalsi(at)gmail(dot)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

In response to

pgsql-hackers by date

Next:From: Tom LaneDate: 2005-06-03 13:50:44
Subject: Re: pg_stats not getting updated....
Previous:From: Himanshu BawejaDate: 2005-06-03 12:25:51
Subject: Re: pg_stats not getting updated....

Privacy Policy | About PostgreSQL
Copyright © 1996-2018 The PostgreSQL Global Development Group