Performance with timestamp conditions

Posted by Tim Whitlock on Stack Overflow See other posts from Stack Overflow or by Tim Whitlock
Published on 2010-04-08T11:04:54Z Indexed on 2010/04/08 11:23 UTC
Read the original article Hit count: 245

Filed under:
|

Which of the following is faster, or are they equivalent? (grabbing recent most records from a TIMESTAMP COLUMN)

SELECT UNIX_TIMESTAMP(`modified`) stamp
FROM `some_table`
HAVING stamp > 127068799
ORDER BY stamp DESC

or

SELECT UNIX_TIMESTAMP(`modified`) stamp
FROM `some_table`
WHERE UNIX_TIMESTAMP(`modified`) > 127068799
ORDER BY `modified` DESC

or even another combination?

© Stack Overflow or respective owner

Related posts about mysql

Related posts about Performance