09-19-2009, 07:29 PM
[eluser]jedd[/eluser]
That's going to be nice and fast if you're just doing comparisons between two dates, but I think you get some measurable performance benefits once you start using the native date and time types - for example selecting a bunch of records from a given month. Sure, you can work out your boundaries for each month, but then you end up with a bunch of new functions, and a bit of overhead.
There are CI/php functions to convert 8601 / MySQL date formats back into unix time (number of seconds since 19700101T0000UTC
That's going to be nice and fast if you're just doing comparisons between two dates, but I think you get some measurable performance benefits once you start using the native date and time types - for example selecting a bunch of records from a given month. Sure, you can work out your boundaries for each month, but then you end up with a bunch of new functions, and a bit of overhead.
There are CI/php functions to convert 8601 / MySQL date formats back into unix time (number of seconds since 19700101T0000UTC
