Yes, use the geospatial functions. It's a lot faster using the highly optimized DB engine to do calculations than using php.
Aug 11, 2019
3
Level 6
Decimal lat lon vs Geo spatial mysql
Hello, I'm working on a project that collects Lat Lon from mobile devices. Currently I've made it using decimal fields and calculating distance between points on php side (everything works just fine). Is it better to use 'point' field within mysql instead ? What about performance of calculating distances on mysql side using Geo spatial function?
Please or to participate in this conversation.