Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Help! View performance
In article <352F04DB.A886CBC1_at_sigma-inc.com>,
Suresh Easwar <sje_at_sigma-inc.com> wrote:
>
> I have a table T with a column C that is indexed on C.
> Let F be some arbitrary function.
>
> select F(C) from T where C = some_value
> /
> uses the index just fine.
>
> However I cannot get it to use the index in the following case:
> create view V as select F(C) D from T
> /
> select D from V where C = some_value
> /
> Oracle always does a full table scan in this case. I tried using hints
> to no avail.
>
> Can someone please explain how I could make Oracle use the index? I
> really do need to use the view, though.
>
> Thanks
> Suresh
>
>
Hi.
Do you include the C fied in your view? It is not clear from your
question.
If not - try :
Create viev V as select C, F(C) D from T;
Good luck.
Michael Bialik.
-----== Posted via Deja News, The Leader in Internet Discussion ==----- http://www.dejanews.com/ Now offering spam-free web-based newsreading Received on Sat Apr 11 1998 - 00:00:00 CDT