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: Forcing use of an index

Re: Forcing use of an index

From: Frank van Bortel <fvanbortel_at_netscape.net>
Date: Thu, 17 Mar 2005 15:21:04 +0100
Message-ID: <d1c3j9$pd9$1@news1.zwoll1.ov.home.nl>


Bob P wrote:
> I tried the query without the leading % with some data I knew was there
> and good. the query went from 11 seconds to .013 second. Since I have
> to do several thosand of these at a time against a table with a million
> + rows speed is important.
>

Not good enough - you only retrieved a very small portion of your data.
You did not get xyz5443733996723, just to name one of the zillion you kissed out on!

If the issue is that %7339% is issued where a 7339% should have been issued, then remove the leading %.

You did mention it was the user's request to have it there, so the *user* is caught - either speed, of silly requirements are being honoured.
Usually, one scans the query input for wildcards (% and _), and rejects the query, if wildcards are found in the first x characters; x varies, I've seen x in [1,2,3]

-- 
Regards,
Frank van Bortel
Received on Thu Mar 17 2005 - 08:21:04 CST

Original text of this message

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