"The used table type doesn't support SPATIAL indexes"
I have got this error in MySQL when i am running a query which includes "contains" keyword. How to make a table support "SPATIAL indexes". The query is
select * from table where contains(column,"1")
A spatial index is a type of extended index that allows you to index a spatial column. A spatial column is a table column that contains data of a spatial data type, such as geometry or geography.
SPATIAL INDEX creates an R-tree index. For storage engines that support nonspatial indexing of spatial columns, the engine creates a B-tree index. A B-tree index on spatial values is useful for exact-value lookups, but not for range scans.
4.1 Creating a Spatial Index. Once data has been loaded into the spatial tables through either bulk or transactional loading, a spatial index must be created on the tables for efficient access to the data. Each spatial index can be an R-tree index or a quadtree index.
Mysql support spatial index only with *.myisam tables, i.e. the ISAM engine. Link: http://dev.mysql.com/doc/refman/5.0/en/creating-spatial-indexes.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With