Creating a spatial index in Oracle

Source: Internet
Author: User

Oracle spatial can easily store spatial data, and large amounts of spatial data must be queried using spatial indexes. Creating a spatial index in Oracle requires that metadata be established before the index can be created. To create the code for the metadata:

1 Insert  intoUser_sdo_geom_metadata (Table_name,column_name, Diminfo, SRID)2 Values(3 'China_track',4 'track_mbr',5 Mdsys. Sdo_dim_array (6Mdsys. Sdo_dim_element ('X',- the, the,0.005),7Mdsys. Sdo_dim_element ('Y',- -, -,0.005)8 ),9 8307Ten);

Index inserts are made after the metadata is created (the default is R-Tree index):

Create Index  on   is Mdsys. Spatial_index;

It is important to note that the Srid developed in the metadata must be the same as in the original layer, otherwise the index cannot be inserted.

Creating a spatial index in Oracle

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.