Yes because it's on the right side of the equality. there are other benefits to storing dates as integers -- it's how astronomers do it (Julian day).
date arithmetic becomes trivial. there is no notion of "months" or "weeks" or "years" which are artificial constructs. you can use a float and also include seconds, milliseconds, microseconds. no overhead in SQL of converting date to string and string to date -- all of this is passed on to your application. I agree with Roger, using a primitive type like int for dates will improve performancec. On Jan 18, 2008 9:41 AM, Michael Tinsay <[EMAIL PROTECTED]> wrote: > > Aren't date fields stored as long integers? But then again, taking out the > time part of a datestamp would go a long way in terms of storage and cpu > use. > > I do have a question with regards to MySQL's query optimizer. In Roger's > item #3, will MySQL compute the value of unix_timestamp() only once for the > query? _________________________________________________ Philippine Linux Users' Group (PLUG) Mailing List plug@lists.linux.org.ph (#PLUG @ irc.free.net.ph) Read the Guidelines: http://linux.org.ph/lists Searchable Archives: http://archives.free.net.ph