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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Strange behaviour of function based index

Re: Strange behaviour of function based index

From: Daniel Morgan <damorgan_at_x.washington.edu>
Date: Tue, 06 Apr 2004 07:51:46 -0700
Message-ID: <1081263088.469617@yasure>


g.entelmann_at_t-online.de wrote:

> Hello,
>
> I encountered some strange behaviour of a function based index.
>
> The Index: Create Index FooIndex on Footable(Trunc(aDate));
>
> Executing the following query uses the index:
>
> select Count(aDate) from Footable where Trunc(aDate) = Trunc(Sysdate);
>
> But when I use the query without the 'Count', it uses a full table scan.
>
> Can anyone explain this ??
>
>
> Gerrit

Without seeing the SQL, knowing what version, and knowing whether your used DBMS_STATS to create statistics for the CBO? No.

-- 
Daniel Morgan
http://www.outreach.washington.edu/ext/certificates/oad/oad_crs.asp
http://www.outreach.washington.edu/ext/certificates/aoa/aoa_crs.asp
damorgan_at_x.washington.edu
(replace 'x' with a 'u' to reply)
Received on Tue Apr 06 2004 - 09:51:46 CDT

Original text of this message

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