Title: RE: [PHP-DEV] Re: [PHP-DB] PHP and MySQL queries...

In these days and times, conservation of a meg of disk
space is really not a consideration. Not the primary one anyway.
The data should be stored in a format such that the
storage itself and then retrieval can be executed with a
minimum of handling/intervention other than the required

I've found that a set of date/time select controls and storage
in a datetime field have been optimal. Insertion requires
no parsing or complex handling (just some gluing of array
elements) and retrieval with mysql's date-related functions
means I don't need to touch the data one bit to display
it in a meaningful way.

For me, having to parse information before insertion,
or after retrieval in order to display it, wastes far
more resources than storing dates in a format other than
an int.

 Mike Robinson
 IT / Developer - Toronto Star TV
 Phone: 416.945.8786
 Fax: 416.869.4566

> -----Original Message-----
> From: Mike Frazer [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, October 24, 2001 8:54 AM
> Subject: [PHP-DEV] Re: [PHP-DB] PHP and MySQL queries...
> Agreed.  This is especially useful when you need to conserve
> every byte you
> can; a timestamp of "10/24/2001" or something similar is
> going to take 10
> bytes as a string and an indeterminate number of bytes for an actual
> timestamp because of system variations, whereas an integer
> value of 10242001
> will take you 2-4 bytes depending on the type of int you
> declare.  Not a lot
> of space, but assume for a second you have 30 fields in your
> database and 5
> million rows...suddenly those 6-8 bytes have multiplied on
> this one field
> alone.  Space and speed are important in DBs :)
> Mike Frazer

http://www.torontostartv.com - Webcasting & Production
http://www.tmgtv.ca - Hometown Television
http://www.thestar.com - Canada’s largest daily newspaper, The Toronto Star, online

PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to