On Mon, Aug 6, 2012 at 2:14 PM, Alexey Botchkov <holyfoot@askmonty.org> wrote:
1) Comparing MariaDB and what's there in MySQL 5.6.1: are these identical but independent implementations? If there are differences, what are they?
Implementations are quite different by now. Most significant difference is precise arithmetic used in Maria. So coinciding shapes or nodes are handled properly unlike the MySQL. A number of bugs was fixed as well.
It seems MySQL 5.6.1 also supports accurate arithmetic now, not just the old bounding box arithmetic. Ie ST_*() functions. http://dev.mysql.com/doc/refman/5.6/en/functions-for-testing-spatial-relatio... But I can't see from the documentation if they also support complex shapes in the R-tree index, or only in the functions.
3) Speaking of PostGIS, its manual reveals that their GiST R-tree index actually only works on the bounding rectangles of shapes. Is this the case also for MyISAM/Aria R-tree indexes, or would MariaDB actually filter the result set to only return shapes that are within the search shape for real. And btw, does the search shape have to be a box, or can it be any shape?
RTree indexes operate with the 'bounding rectangles' in Maria as in PostGIS. It's just the RTree algorithm works that way. So Maria uses RTree key to get the preliminary result which is later filtered with the exact shape operation. So any shape should produce the proper result. It's just some shapes can't be effectively used by RTree to speed the execution.
Right. But even if you do it in 2 steps, it's still transparent to the user. Apparently in PostGIS, unless you use a rectangle for searching, it won't use the index at all. So you have to explicitly supply first a rectangle, then AND combine it with the shape you really want. (Which works, you can easily get the MBR for your shape, but very annoying to have to do it explicitly.) Imho the user friendliness here is the biggest point in favor of MariaDB.
5) Euclidean geometrics only... PostGIS and SQLite use the separate GEOS library (and cousins like PROJ.4). Why isn't this used in the MySQL/MariaDB implementation? It seems to me, you could get accurate handling of different (non-euclidean) projections by using these libraries, "for free".
For a number of reasons we didn't use the GEOS library. Though the geodetic coordinates (along with other reference systems) should be available soon.
Ah, that's good news. When that is done, the only complaint really would be no support for InnoDB. Which one can live with but still worth mentioning as most MySQL usage is InnoDB-only nowadays. henrik -- henrik.ingo@avoinelama.fi +358-40-8211286 skype: henrik.ingo irc: hingo www.openlife.cc My LinkedIn profile: http://www.linkedin.com/profile/view?id=9522559