Spatial index's size in MySQL

156 Views Asked by At

Is there any way to find out size of spatial index? So far i have been using this query: show table status from [dbname] however it shows 0 bytes for spatial indexes. Is there other command for spatial ones?

1

There are 1 best solutions below

2
On

Create a table with all your data, but no indexes. (Perhaps a copy of your real data). Check the disk space used. Then add the spatial data and recheck the disk space.

Dropping an index does not necessarily release the space to the OS, so DROP INDEX plus CREATE INDEX is likely to show no change is size. Hence, my suggestion above of starting fresh.