Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: sql query (all about indexing)

Re: sql query (all about indexing)

From: <silveys_at_my-dejanews.com>
Date: Thu, 08 Apr 1999 01:11:50 GMT
Message-ID: <7egvoe$5sf$1@nnrp1.dejanews.com>


  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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US