Subject | Re: [firebird-support] index on TIMESTAMP field to facilitate search on DATE |
---|---|
Author | Arno Brinkman |
Post date | 2006-01-24T18:03:29Z |
Hi,
SELECT .....
WHERE
T2.CHECKIN_TIMESTAMP >= CURRENT_DATE and
T2.CHECKIN_TIMESTAMP < CURRENT_DATE + 1
which could benefit from the index.
Regards,
Arno Brinkman
ABVisie
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
General database development 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
http://www.fingerbird.de/
http://www.comunidade-firebird.org/
Support list for Firebird and Interbase users :
firebird-support@yahoogroups.com
Nederlandse firebird nieuwsgroep :
news://newsgroups.firebirdsql.info
>I have a TIMESTAMP field and using a SQL likeNo, but you can use this for example:
>
> SELECT .....
> WHERE CAST(T2.CHECKIN_TIMESTAMP AS DATE) = 'NOW'
>
> If i add an index of CHECKIN_TIMESTAMP will it speed up the search?
SELECT .....
WHERE
T2.CHECKIN_TIMESTAMP >= CURRENT_DATE and
T2.CHECKIN_TIMESTAMP < CURRENT_DATE + 1
which could benefit from the index.
Regards,
Arno Brinkman
ABVisie
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
General database development 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
http://www.fingerbird.de/
http://www.comunidade-firebird.org/
Support list for Firebird and Interbase users :
firebird-support@yahoogroups.com
Nederlandse firebird nieuwsgroep :
news://newsgroups.firebirdsql.info