Groups > Interbase > Interbase SQL > Re: Date matching for better performance.




Date matching for better performance.

Date matching for better performance.
25 Nov 2007 01:07:10 -0700
Dear,
  I have one column trans_date of DATE type.How should I match trans_date
column?
e.g If I want to match 01-April-2007 then
    by which data retrive fast.

    WHERE trans_date='2007-04-01';
     OR
    WHERE trans_date='04-01-07';
     OR
Post Reply
Re: Date matching for better performance.
25 Nov 2007 07:08:43 -0700
Monalee Bhandge wrote:

> 
> Dear,
>   I have one column trans_date of DATE type.How should I match
> trans_date column?  e.g If I want to match 01-April-2007 then
>     by which data retrive fast.
> 
>     WHERE trans_date='2007-04-01';
>      OR
>     WHERE trans_date='04-01-07';
>      OR
>     WHERE trans_date='04-01-2007';

It makes no performance difference which date format you use as long as
you use a format that InterBase understands. If you are running a query
from within a program it is best to use a parameter for the date to
avoid date format problems.

-- 
Post Reply
about | contact