Hey!
Our project keeps world data base in tree-structure inside INNODB table of MySQL db. Earth is the root, then countries, then country regions and the locations are the leaves.
A foreign-key is used to provide a fast access to children (for example cities in a region).
Now we want to implement a fast geo-search in the data-base for given coordinates. An obvious solution is to use SPATIAL INDEX, which is a feature of MyISAM tables. But MyISAM tables do not support foreign keys. And INNODB tables do not support SPATIAL INDEX.
So if we use MyISAM table we have to abandon foreign key and that would make children search way too long.
How can we combine fast children search in tree and also have a SPATIAL INDEX in a table?