not sure if this is the right place to post...
I am using postgres 8.1. In indxpath.c, it says " Note: if Postgres tried to optimize queries by forming equivalence
Now i have the following two queries on TPC-H, where there is an index built on "o_totalprice".
explain select * from lineitem, orders where o_totalprice=l_extendedprice and l_extendedprice<2000;
explain select * from lineitem, orders where o_totalprice=l_extendedprice and l_extendedprice<2000 and o_totalprice<2000;
The second query uses the index while the first does not. It seems to me that both queries are the same (the "o_totalprice<2000" in the second query can be inferred). Is there something that needs to be tuned or ...?
thanks a lot!