Open GoogleCodeExporter opened 9 years ago
We're at least in acceptable company - I was curious and just tested MySQL,
and...
SELECT * FROM Sailors WHERE rating + 2 = 10 does a table scan, while
SELECT * FROM Sailors WHERE rating = 8 uses an index on rating, and
SELECT * FROM Sailors WHERE rating = 6 + 2 uses the rating index too.
(So both do simple constant folding but don't do deeper algebraic rewriting.)
:-)
Original comment by dtab...@gmail.com
on 19 Feb 2015 at 5:23
PS - The good news is that users can be alerted to this and write queries
accordingly.
Original comment by dtab...@gmail.com
on 19 Feb 2015 at 5:24
Original issue reported on code.google.com by
sjaco...@ucr.edu
on 18 Feb 2015 at 8:34