Re size benefit...
It depends on your database:

eg Postgres
date == 4bytes
time == 4bytes
timestamp == 8bytes

different databases may use some algorithm to squeeze timestamp into
7bytes, but I doubt it, diskspace is cheap, squeezing out Y2K type issues
is (or should be) more important do database developers.


re is it better...

If you would want to do a select on just the date or just the time, (eg
all transactions after 6pm), AND your database uses object columns (each
column is a block of disk space, separate from the block of disk space for
the other columns) then you could have a minor performance improvement.

If the moon is blue and the wind is from the west and and and

A more important factor is having a database that is understandable and
usable from a programmer standpoint.

If the date and time is related information, use a timestamp field.  If
they are not, use a date field and a time field.

That's my 2 bits.

Terry

On Thu, 28 Feb 2002, Dimitri  Abramov wrote:

> We have a database that stores date and time as separate values in different
> fields. I am wondering when it could be useful? I used to store datetime in
> one field as a result of 'now()' function.
> It takes less space (I think) and easer to compare.
>
> Thanks,
> Dimitri
> -
> You are subscribed to the CFUGToronto CFTALK ListSRV.
> This message has been posted by: Dimitri  Abramov <[EMAIL PROTECTED]>
> To Unsubscribe, Please Visit and Login to http://www.CFUGToronto.org/
> Manager: Kevin Towes ([EMAIL PROTECTED]) http://www.CFUGToronto.org/
> This System has been donated by Infopreneur, Inc.
> (http://www.infopreneur.net)
>

-- 
Terry Fielder
Network Engineer
Great Gulf Homes / Ashton Woods Homes

-
You are subscribed to the CFUGToronto CFTALK ListSRV.
This message has been posted by: [EMAIL PROTECTED]
To Unsubscribe, Please Visit and Login to http://www.CFUGToronto.org/
Manager: Kevin Towes ([EMAIL PROTECTED]) http://www.CFUGToronto.org/
This System has been donated by Infopreneur, Inc.
(http://www.infopreneur.net)

Reply via email to