Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: rtrim() performance nightmare???
InfoTech Consulting, Inc. wrote:
>
> I was testing the performance of a query today and noticed the following
> query took a LONG TIME to run (when using rtrim() function):
>
> SELECT field1, field2
> FROM table_a
> WHERE field3 = 'value' and
> rtrim(field4) = 'value'
>
> Thanks,
> Dave Morse
Any function used in this way will prevent an index being used (if there is
one), since the value must be fetched and then the function applied to it,
before the match can be tested.
In this case, use
and field4 LIKE 'value%' and rtrim(field4) = 'value'
--
Regards,
John.
Received on Fri Sep 18 1998 - 03:12:43 CDT