patternMinor
Why innodb doesn't store geospatial data?
Viewed 0 times
whyinnodbgeospatialstoredoesndata
Problem
I am very curious.
I have business tables. Now I think I will have to create a separate table, location table. That separate table should be myisam.
But why would I do so?
Why can't innodb store points?
I have business tables. Now I think I will have to create a separate table, location table. That separate table should be myisam.
But why would I do so?
Why can't innodb store points?
Solution
Because R-Trees are not B-Trees:
For MyISAM tables, 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 will
be useful for exact-value lookups, but not for range scans.
Adding a completely different storage structure for InnoDb is significant effort (much more than for MyISAM due to locking and recovery).
For MyISAM tables, 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 will
be useful for exact-value lookups, but not for range scans.
Adding a completely different storage structure for InnoDb is significant effort (much more than for MyISAM due to locking and recovery).
Context
StackExchange Database Administrators Q#19240, answer score: 6
Revisions (0)
No revisions yet.