Best way to handle MySQL date for performance with thousands of users
Posted
by bitLost
on Stack Overflow
See other posts from Stack Overflow
or by bitLost
Published on 2010-05-24T15:04:03Z
Indexed on
2010/05/24
15:31 UTC
Read the original article
Hit count: 210
I am currently part of a team designing a site that will potentially have thousands of users who will be doing a number of date related searches. During the design phase we have been trying to determine which makes more sense for performance optimization.
Should we store the datetime field as a mysql datetime. Or should be break it up into a number of fields (year, month, day, hour, minute, ...)
The question is with a large data set and a potentially large set of users, would we gain performance wise breaking the datetime into multiple fields and saving on relying on mysql date functions? Or is mysql already optimized for this?
© Stack Overflow or respective owner