Tag Info

New answers tagged

2

Look at the estimated query plan, and make sure the index is being used. Also, the complexity of your MultiPolygon could be a significant factor. If you imagine your index as a series of grids over your MultiPolygon, there will be grids that either completely covered by your MultiPolygon or completely not covered by your MultiPolygon. Your ProblemChild ...


1

This blog explains how to lay out your data to get very good speed for "finding the nearest 10 pizza parlors" from latitude/longitude. It includes reference code. It does not depend on SPATIAL or 5.7. "200K and growing" is no problem. It does depend on InnoDB (for clustered PRIMARY KEY), PARTITIONs (to get a pseudo-2D index), and a Stored Procedure ...


1

In order to get advantage of the SPATIAL index you have to filter results using a bounding box (or any other geometry type) with the functions st_within() or st_contains(). You have some examples here: Query Optimization with MySQL 5.7 and MariaDB 10 - GIS Improvements Using the new spatial functions in MySQL 5.6 for geo-enabled applications MySQL 5.7 and ...



Top 50 recent answers are included