Subject Re: select birthdays form the next several days
Author Ali Gökçen
Hi Arno,

if i use:

...
where bdate between bdateblahblah and bdateblahblah

it is not uses the index on bdate.

but
when i use:

...
where bdate>'01.01.1900' and
bdate between bdateblahblah and bdateblahblah

then it uses the index on bdate (Query PLAN reports)

is this correct behaviour?
adding and extra condition helps to use index?
or there is a plan report problem ( natural+index scan? )

Regards,

-Ali


>
> > Theorically it should be do index scan.
>
> No, because bdate is used at the left and right side in the
comparisons.
>
> Regards,
> Arno Brinkman
> ABVisie