现在有一个客户表,location字段用于记录客户的经纬度坐标,例如:
create table customer(
id int primary key auto_increment,
location GEOMETRY,
name varchar(256)
)
为了查询性能优化,需要给location字段加上 索引,该如何添加?
MySQL中对于经纬度字段如何添加索引提高性能
- 写回答
- 好问题 0 提建议
- 追加酬金
- 关注问题
- 邀请回答
-
2条回答 默认 最新
- 2201_75558049 2022-12-02 22:04关注
alter table customer modify location GEOMETRY not null; alter table customer add INDEX geo_index(location);
本回答被题主选为最佳回答 , 对您是否有帮助呢?解决 1无用
悬赏问题
- ¥15 PSCAD安装问题 ERROR: Visual Studio 2013, 2015, 2017 or 2019 is not found in the system.
- ¥15 (标签-MATLAB|关键词-多址)
- ¥15 关于#MATLAB#的问题,如何解决?(相关搜索:信噪比,系统容量)
- ¥500 52810做蓝牙接受端
- ¥15 基于PLC的三轴机械手程序
- ¥15 多址通信方式的抗噪声性能和系统容量对比
- ¥15 winform的chart曲线生成时有凸起
- ¥15 msix packaging tool打包问题
- ¥15 finalshell节点的搭建代码和那个端口代码教程
- ¥15 Centos / PETSc / PETGEM