2

Say I want 20 closest businesses to a location.

Innodb doesn't support that. So what does?

Is it possible to have some tables in some engine and other tables on different engines?

  • Not sure if this is geo-ip related or a general mapping question. If the former this might be relevant dbasquare.com/2012/06/01/… – atxdba Jun 12 '12 at 4:44
  • And yes, you can have varying storage engines per table in a given mysql database – atxdba Jun 12 '12 at 4:45
1

Yes you can use MyISAM for storing the geo location as they support the spatial data types.For more information please look Saptial Datatypes in MySQL

And You can also use the mix of engines there is no issues on that..

  • No issues? What about Foreign Keys? – ypercubeᵀᴹ Jun 14 '12 at 0:03
1

Here is how to design an optimal schema, plus code, to find the 20 closest whatevers:

http://mysql.rjweb.org/doc.php/latlng

  • How does this compare to spatial indexes? Pros and cons? – ypercubeᵀᴹ Jun 14 '12 at 0:02
  • I have not benchmarked. Mine is Order(1), so you can't get faster. – Rick James Sep 5 '12 at 21:22
  • I somehow find this claim hard to believe, without benchmarks. – ypercubeᵀᴹ Sep 5 '12 at 21:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.