mysql - Benefits of SPATIAL over using standard bounding box query -


The benefits of intellectual barriers

What are the benefits of using a special query instead of a simple MySQL For example, if I want to meet all the locations within a certain polygon:

Something like this:

Example of the bounding box
  Selection * WHERE GOALAT from geographical position? And? And between geography? And?   

As I think, the only real advantage is that there will be spatial factors in the curvature of the Earth?

Which method is the fastest?

Advantages:

  1. You can use numbers other than numbers and rectangles You can use, and "-in".
  2. If you can use the Spotlight Index, then the performance is a measure of magnitude (depending on the size and nature of your data).

    Disadvantages:

    1. Local objects are binary blobs - some care needs to be handled (for example you can not usually copy a price ).
    2. The spatial index in mySQL is only available for MyISAM tables.
    3. Support in mySQL is somewhat old; Many operations have not been implemented yet

      If your database is large and you need to search fast in your example, then you should definitely go with the Spotlight Indexes.

Comments