Odd things about MySQL
Today, I optimized a MySQL query to find spatial points by proximity. Initially, my query took an average of 250 ms. After some research, I came across a document from MySQL. By following their recommendation to use a preliminary approximation via a bounding box, I was able to reduce the query time to a range of 5 to 35 ms. However, as I continued reading, I discovered that MySQL also offers a spatial extension based on R-Tree. I thought I had found the perfect solution. But no, R-Trees are only available with the MyISAM engine, and creating spatial indexes is not allowed in InnoDB. The same goes for FULLTEXT indexes, which are also not available in InnoDB. ...