dateTime vrs. Timestamp
Hello, Am I gaining anything by using a timestamp instead of using dateTime and calling now(), for example, increased performance, better indexing, etc. I guess another way to ask this is does the MySQL internals handle a timestamp more efficiently than a dateTime. Thanks Michael -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: dateTime vrs. Timestamp
IMO, dateTime doesn't parse now() the same way that timeStamp does. If you use now() in a dateTime field, I have found that it doesn't always write the time to the record, while using now() with the timestamp always does. As far as your other questions, the indexing and increased performance, I have found that dateTime is usually only good for storing static dates v. dynamic dates with timeStamp (i.e., a LastEdit field with dateStamp now() only captures date, but a LastEdit now() with timpstamp catches it all...) HTH, J.R. -Original Message- From: DePhillips, Michael P [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 05, 2005 10:02 AM To: mysql@lists.mysql.com Subject: dateTime vrs. Timestamp Hello, Am I gaining anything by using a timestamp instead of using dateTime and calling now(), for example, increased performance, better indexing, etc. I guess another way to ask this is does the MySQL internals handle a timestamp more efficiently than a dateTime. Thanks Michael -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] smime.p7s Description: S/MIME cryptographic signature
Re: dateTime vrs. Timestamp
From: DePhillips, Michael P Am I gaining anything by using a timestamp instead of using dateTime and calling now(), for example, increased performance, better indexing, etc. I guess another way to ask this is does the MySQL internals handle a timestamp more efficiently than a dateTime. I haven't seen much difference in performance; in fact I think you'll lose standard human readable output (I still can't read UNIX timestamps), you'll lose a large range of dates, etc. You'll probably gain more by optimizing the query and expressions, designing the right indexes, etc. Regards, Jigal. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]