Joins on spatial mysql indexes

后端 未结 4 2029
攒了一身酷
攒了一身酷 2021-02-08 03:59

I have two tables: one with points, the other with polys.

CREATE TABLE `points` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `point` point NOT NULL,
  PR         


        
4条回答
  •  滥情空心
    2021-02-08 04:44

    If all you are dealing with are squares, I would just deal with 4 numbers in your table that can be indexed representing Top, Left, Height, Width, then run your query where your point in question has its "X" coordinate between Left, Left+Width and "Y" coordinate between Top, Top+Height.

提交回复
热议问题