At 11:41 -0400 18/10/01, Yibin Dong wrote:
>It depends on which database you are using. In Oracle,
>when TO_DATE() is employed within where clause, all indexes
>will be useless. Oracle will do a range scan instead of
>index row scan.
Not in the case used.
At 9:48 -0400 18/10/01, Rozengurtel, Daniel wrote:
>$sql = "DELETE FROM ft_t_ispc WHERE LAST_CHG_TMS <
>TO_DATE('$final_date','MM/DD/YYYY')";
In this case, the to_date() function is on a literal. This has no
effect on optimiser choice. If the to_date() function had been
applied to a column value, then it would have suppressed the index.
Regards
Paul Miller
--
-
Carib Data Limited
<mailto:[EMAIL PROTECTED]>
<http://www.caribdata.co.uk>