GyeongEun Kim
GyeongEun Kim

Reputation: 21

spatial index is not included in possible keys

hi I am using MYSQL 8.0.32

and I have club table and there is club_point column which is point type.

I have 500,000 records in the table.

and as the picture below, I made a spatial index that only contains club_point.

enter image description here

but when I execute

explain
select * from club  WHERE ST_DISTANCE_SPHERE(ST_GEOMFROMTEXT('POINT(37.76452 126.876325)',4326), club_point) <= 100000

enter image description here

It doesn't have any possible keys as well as key.

I found that it could be a SRID problem, but I think It is not.

enter image description here

any keyword would be helpful. Thank you.

Upvotes: 0

Views: 46

Answers (0)

Related Questions