MySQL 5.1 リファレンスマニュアル :: 16 Spatial Extensions :: 16.6 Optimizing Spatial Analysis
« 16.5.6 Functions That Test Spatial Relationships Between Geometries

16.6.1 Creating Spatial Indexes »
Section Navigation      [Toggle]
  • 16 Spatial Extensions
  • 16.1 Introduction to MySQL Spatial Support
  • 16.2 The OpenGIS Geometry Model
  • 16.3 Supported Spatial Data Formats
  • 16.4 Creating a Spatially Enabled MySQL Database
  • 16.5 Analyzing Spatial Information
  • 16.6 Optimizing Spatial Analysis
    • 16.6.1 Creating Spatial Indexes
    • 16.6.2 Using a Spatial Index
  • 16.7 MySQL Conformance and Compatibility

16.6. Optimizing Spatial Analysis

[+/-]

16.6.1. Creating Spatial Indexes
16.6.2. Using a Spatial Index

Search operations in non-spatial databases can be optimized using indexes. This is true for spatial databases as well. With the help of a great variety of multi-dimensional indexing methods that have previously been designed, it is possible to optimize spatial searches. The most typical of these are:

  • Point queries that search for all objects that contain a given point

  • Region queries that search for all objects that overlap a given region

MySQL uses R-Trees with quadratic splitting to index spatial columns. A spatial index is built using the MBR of a geometry. For most geometries, the MBR is a minimum rectangle that surrounds the geometries. For a horizontal or a vertical linestring, the MBR is a rectangle degenerated into the linestring. For a point, the MBR is a rectangle degenerated into the point.

It is also possible to create normal indexes on spatial columns. You are required to declare a prefix for any (non-spatial) index on a spatial column except for POINT columns.

Copyright © 1997, 2010, Oracle and/or its affiliates. All rights reserved. Legal Notices
Top / Previous / Next / Up / Table of Contents
© 2010, Oracle Corporation and/or its affiliates