Subject | Re: [firebird-support] Re: select birthdays form the next several days |
---|---|
Author | Arno Brinkman |
Post date | 2005-09-23T14:31:40Z |
Hi,
records are fetched from disk.
Regards,
Arno Brinkman
ABVisie
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
General database developer support:
http://www.databasedevelopmentforum.com
Firebird open source database (based on IB-OE) with many SQL-99 features:
http://www.firebirdsql.org
http://www.firebirdsql.info
Support list for Interbase and Firebird users:
firebird-support@yahoogroups.com
Nederlandse firebird nieuwsgroep:
news://newsgroups.firebirdsql.info
> where bdate between bdateblahblah and bdateblahblahYes, an index will be used to build a bitmap for dates where > '01.01.1900'.
>
> 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?Because the condition is a constant and no expression with an other field from the same table.
> or there is a plan report problem ( natural+index scan? )No, the "bdate between bdateblahblah and bdateblahblah" filter will be handled after internally the
records are fetched from disk.
Regards,
Arno Brinkman
ABVisie
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
General database developer support:
http://www.databasedevelopmentforum.com
Firebird open source database (based on IB-OE) with many SQL-99 features:
http://www.firebirdsql.org
http://www.firebirdsql.info
Support list for Interbase and Firebird users:
firebird-support@yahoogroups.com
Nederlandse firebird nieuwsgroep:
news://newsgroups.firebirdsql.info