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: The LIKE Clause and the optimizer!

Re: The LIKE Clause and the optimizer!

From: <karsten_schmidt8891_at_my-deja.com>
Date: Fri, 26 Nov 1999 10:45:17 GMT
Message-ID: <81lobs$4lk$1@nnrp1.deja.com>


Hi,

 is the optimiser smart enough to use reverse-key indexes for  that kind of query ?
 I personally doubt it, but theoretically, it could - right ?

Karsten

In article <81j5qb$5ur$1_at_ctb-nnrp1.saix.net>,   "Billy Verreynne" <vslabs_at_onwe.co.za> wrote:
> George wrote in message <81iajg$27n$1_at_perki.connect.com.au>...
> >I have a query:
> > SELECT /* + INDEX(invoices inv_num) */
> > FROM invoices
> > where inv_num LIKE '%xxxx'
> >
> >inv_num is of VARCHAR2(10) type and has an index on it.
> >
> >I am aware that Oracle will choose to do a FULL TABLE SCAN because
> >the character string contains a '%' as the first letter, however I
find it
> >hard to believe that
> >Oracle would rather use a full table scan rather than use the index
in this
> >case.
>

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Fri Nov 26 1999 - 04:45:17 CST

Original text of this message

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