k001
Apr 11, 2013 10:55
Are there any SQL experts here? Which one is more effective to get the most recent submission? I am using MySQL with InnoDB, if that matters, 'time' field is of type timestamp, and of course there's an index on time.
SELECT MAX(time) FROM submissions;
or
SELECT time FROM submissions ORDER BY time DESC LIMIT 0,1;
And why.
linux,
work,
sql