Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Help with performance with a view
Mat wrote:
> Hi,
>
> I have a performance problem with a view. I need to convert a string
> field to a number field in the select statement of the view. But when I
> do this, the index on the table seems to be ignored, which is
> problematic with the response speed.
>
> Is there any way to speed up the operation?
>
> In perticular, here's my select:
>
> -- with myField as a varchar2, with an index on it
> select to_number(myField);
>
> Any suggestion would be greatly appreciated.
>
> Thanks,
>
> Mathieu
First, that can't be your query, as it's not even a valid statement.
Second, WHY do you think you need to convert with to_number? to_number is most generally used on INSERT. What are you going to do if myField contains the value "ThiSISaPeicEOFJUNKDATA"
Third, the index on myField is not used because you are applying a function to the column. This will always negate the use of an index on the column. Received on Fri Feb 10 2006 - 10:47:49 CST