Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: sql query (all about indexing)
tkyte_at_us.oracle.com wrote:
> >> You are saying "if (a = b) or ( a = somevalue and b = somevalue )".
> If the query was rewritten as:
>
> select * from t1, t2 where t1.a = t2.b
> UNION ALL
> select * from t1, t2 where t1.a = x and t2.b = x
>
> We could in fact use the three indexes.
It's not clear to me why the previous where clause (quoted at the top there) and this compound select would be affected differently by indexing on the separate columns. Care to expound on that?
Thanks,
Scott
-----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own Received on Wed Apr 07 1999 - 20:11:50 CDT