InnoDB Spatial Indexes in 5.7.4 LAB release

With MySQL 5.7.4 LAB release, InnoDB now supports “Spatial Index” on geometry data.

Before this new feature, InnoDB stores geometry data as BLOB data, and only prefix index can be created on the spatial data. It is very inefficient when comes to spatial search, especially when it comes to complex geometry data. In most cases, table scan are the only way to get the result. This all changed with InnoDB spatial index, which is implemented as R-tree, any spatial search becomes far more efficient.

InnoDB spatial index can be used with all existing syntax that has been developed for MyISAM spatial index. In addition, InnoDB spatial index supports full transaction properties, as well as isolation levels. It employs predicate lock to prevent phantom scenario.

In InnoDB spatial index, only the object’s Minimum Bounding Box is included in the index, making the index entry size small and packed, even with large, complex geometry data. The index itself serves as first screening process, which picks out “possible candidates” with the search criteria (in terms of bounding boxes), and then the data stored in primary index is fetched to server for more detail process.

Currently, InnoDB spatial index supports only two dimension data, but we do have plan to extend to multi-dimension. In addition, we are doing more performance tuning to make it more efficient.

Stay tuned for more discussion on details about InnoDB spatial indexes in the coming weeks.

3 thoughts on “InnoDB Spatial Indexes in 5.7.4 LAB release

Leave a Reply

Your email address will not be published. Required fields are marked *


9 + eight =

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">