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: How can I optimize a query on two indexed columns?

Re: How can I optimize a query on two indexed columns?

From: Andrew Protasov <protasov_at_percombank.kiev.ua>
Date: Mon, 20 Apr 1998 17:51:52 +0300
Message-ID: <6hfo4h$fd$1@news.lucky.net>


Hi,

You may use cost-based optimizer or change your query to disable index usage for col1 via expression:

select col1, col2
from tab1
where col1||'' = 'x' and col2 = 'y'

                   Andrew Protasov

José Lima Suárez wrote in message <6hb66o$s5b$1_at_diana.bcn.ibernet.es>...
>Hi,
>
>I have a query like this:
>
>select col1, col2
>from tab1
>where col1 = 'x' and col2 = 'y'
>
>and both col1 and col2 have differents indexes, col1 has a lot of rows per
>value so if Oracle uses this index is slowly than if uses the col2 index
>(that has a few rows per value).
>
>is there any way to force the index to use in the query execution?
>
>Thanks...
>
>
>
Received on Mon Apr 20 1998 - 09:51:52 CDT

Original text of this message

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