Ok I have a database with about 1800 rows, each has a column lat and long, what I am trying to do, it query against Google Maps V3 .getBounds
Take a look at the new spatial data and functions available in MySQL 5.7, now also for InnoDB.
Using the examples above, it takes about 1s for a table with 1 mio records to get the locations within a certain bounding box.
With ST_Within() and ST_MakeEnvelope() and the correct spatial index I get the result in less the 0.01s.