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

Home -> Community -> Usenet -> c.d.o.misc -> Re: SQL statement optimization

Re: SQL statement optimization

From: Daniel Morgan <damorgan_at_x.washington.edu>
Date: Thu, 06 Nov 2003 21:55:14 -0800
Message-ID: <1068184533.877970@yasure>


music4 wrote:

>Greetings,
>
>I have a table for subscriber information, and sub_number is primary key of
>VARCHAR(30) type. And I have query as following:
>
>select * from table where sub_number like % || user_input || %;
>
>For example, if there are sub_numbers: '12345678' and '23456789', by input
>'234', the query will return both sub_numbers.
>
>But this query is extremely slow, and occupy too much CPU usage since it
>doesn't apply to index.
>
>Is there a way to optimize such query?
>
>Any idea will be greatly appreciated! Thanks in advance!
>
>Evan
>
>

And you have which version and edition of Oracle?

Go to http://tahiti.oracle.com and look up Function Based Indexes (FBI).

-- 
Daniel Morgan
http://www.outreach.washington.edu/ext/certificates/oad/oad_crs.asp
http://www.outreach.washington.edu/ext/certificates/aoa/aoa_crs.asp
damorgan_at_x.washington.edu
(replace 'x' with a 'u' to reply)
Received on Thu Nov 06 2003 - 23:55:14 CST

Original text of this message

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