title: How to use foreign keys and a spatial index inside a MySQL table?
body: <p>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.</p>
  
  <p>A foreign-key is used to provide a fast access to children (for example cities in a region).</p>
  
  <p>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.</p>
  
  <p>So if we use MyISAM table we have to abandon foreign key and that would make children search way too long.</p>
  
  <p>How can we combine fast children search in tree and also have a SPATIAL INDEX in a table?</p>