Created
November 17, 2019 12:10
-
-
Save ponkotuy/56f06daf3fcd51951fad4d831cf8b2ba to your computer and use it in GitHub Desktop.
spatial index(geo)とindex(geo) using rtreeの違い
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
create table point( | |
id bigint not null auto_increment primary key, | |
spa geometry not null, | |
rtr geometry not null, | |
spatial index(spa), | |
index(rtr) using rtree | |
) engine=InnoDB, default charset=utf8mb4; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mysql> show create table point¥G | |
Create Table: CREATE TABLE `point` ( | |
`id` bigint(20) NOT NULL AUTO_INCREMENT, | |
`spa` geometry NOT NULL, | |
`rtr` geometry NOT NULL, | |
PRIMARY KEY (`id`), | |
SPATIAL KEY `spa` (`spa`), | |
SPATIAL KEY `rtr` (`rtr`) | |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment