views:

86

answers:

1

I know think that I've read that one of the following is faster than the other, but I forget which is which:

SELECT * FROM `myTable` WHERE `myDate` > NOW();
SELECT * FROM `myTable` WHERE NOW() < `myDate`;
+3  A: 

The optimizer will produce the same execution plan, realizing that the constant is the same on both sides.

Cody Caughlan
I hope it doesn't matter. Otherwise, MySQL is a crock!
paxdiablo