Re: dates and indexes
From: Charles Wolfe <cwolfe_at_popd.ix.netcom.com>
Date: 1996/04/21
Message-ID: <317A1E1B.41B7_at_popd.ix.netcom.com>#1/1
Date: 1996/04/21
Message-ID: <317A1E1B.41B7_at_popd.ix.netcom.com>#1/1
Steve Yeazel wrote:
>
> If a date column has an index on it, does referencing that column with
> a to_char within the where clause cause the index not to be used?
>
> For instance,
>
> select * from tbl where to_char(datecol,'YYYY') = '1996';
>
> If datecol has an index on it, will it be used? I believe the answer
> is no, but want to confirm.
>
> SteveSteve,
You are correct. Index access paths become unavailable when a function is applied to the indexed column.
hope this helps,
regards,
Chuck
Received on Sun Apr 21 1996 - 00:00:00 CEST