Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: SQL TUNING
Yes, albeit a bit ugly
from a
where reference
between rpad('Hithere',length(reference),chr(0)) and
rpad('Hithere',length(reference), ... the ascii character with the highest
ordinal, whatever it is ...)
Hth,
Sybrand Bakker, Oracle DBA
Vinay Joshi wrote:
> Hi,
> I am trying to tune a sql statement on Oracle 7.3.3 Unix.
>
> The table a has 10,000 records.
> It has a uniq index on reference column.
>
> Here is the query:
> select /*+ index(a a_ref) */
> rowid
> from a
> where substr(reference,1,7) = 'Hithere';
>
> I know the plan returns a full table scan because I am using a function
> (substr). Is there any way of getting round this problem so it uses the
> index ?
>
> Many thanks...
Received on Fri Nov 20 1998 - 13:32:08 CST