If you're asking did I use some kind of benchmarking software or "official" script, all I did was a simple microtime before & after difference and ran a for loop for like 50 queries or so:
Code: Select all
$start = microtime();
for($i=0;$i<50;$i++)
{
//select all, ordered by timestamp desc
}
$finish = microtime();
$time = $finish-$start;
$start = microtime();
for($i=0;$i<50;$i++)
{
//select all, ordered by datetime desc
}
$finish = microtime();
$time = $finish-$start;
The difference in time between method 1 method 2 was only a small percentage but it was consistent. Try it yourself before making unbecoming accusations :/
If you haven't noticed that difference before, chances are you have your database configured to favor datetime.
pytrin wrote: most surely complicated many processes. As I mentioned previously, such optimizations at the cost of portability and simplicity are the very definition of premature optimization.
By the way, I don't know why you keep saying this. I think you do good work but this doesn't make any sense.
Complicated? You're a programmer, how can the simple idea of a timestamp be complicated to you? It is one number that represents an exact moment in time.
Portability? Because an industry-wide standard format isn't portable?
I won't comment on the fact that premature optimization has nothing to do with using a well supported format. All I can say is you must be prematurely optimizing your ego.
I never said don't use DateTime, but you are trying to claim that "Apples are the best type of fruit, only eat apples, everything else is wrong." Clearly, apples and oranges are just different. Just because you like one thing shouldn't mean that you can come in with malicious attempts to demerit a highly established format.