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

Home -> Community -> Usenet -> c.d.o.server -> Re: Help with performance with a view

Re: Help with performance with a view

From: EdStevens <quetico_man_at_yahoo.com>
Date: 10 Feb 2006 08:47:49 -0800
Message-ID: <1139590069.792674.59940@g14g2000cwa.googlegroups.com>

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

Original text of this message

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