Understanding ArcSDE indexes by Oracle Indexes

Source: Internet
Author: User
This question is a bit strange, that is, when we talk about the performance of ArcSDE, we will all talk about rebuilding the spatial index. This article uses the Oracle index example to compare it with ArcSDEforOra.

This question is a bit strange, that is, when we talk about the performance of ArcSDE, we will all talk about rebuilding the spatial index. This article uses the Oracle index example to compare it with ArcSDE for Ora.

This question is a bit strange, that is, when we talk about the performance of ArcSDE, we will all talk about rebuilding the spatial index. This article uses the Oracle index example to compare the spatial index of ArcSDE for Oracle, if you can understand the oracle index example, you should have a good understanding of the ArcSDE index problem.

In the database system, indexing is a very important object. Especially for large data tables, indexing can greatly improve the data retrieval speed. This section describes the principles and usage of indexes.

The most typical example of Indexing in the real world is dictionary retrieval. When using a dictionary, you can use two methods: one is page-by-page lookup to obtain the target, and the other is to retrieve the number of pages of the Target Based on the dictionary's retrieval directory, then, you can directly find the target on this page. There is no doubt that using a search directory (INDEX) to retrieve a target is a more efficient way.

Existing mainstream databases provide the index concept, and Oracle is no exception. Once an index is created on a column in the data table, Oracle creates a new space to store the correspondence between all values in the column and the recorded rowid. When you try to use the index column as the search condition, Oracle uses the index to obtain the corresponding rowid and capture the record.

;

When Oracle processes this query statement, it performs a full table scan. When 6th records are found, the record meets the search criteria and is included in the result set. However, the search will not stop, because Oracle does not know whether there are still qualified records in the subsequent records. Oracle returns the final result set only when a complete table is searched.

However, if an index is created in the name column of the people table in advance, the search order will be completely different. The syntax for creating an index is as follows:

Create index idx_people_name on people (name)

Once an index is created, all the data in the table will be processed in alphabetical order. For example, each five records will be used as a data block (of course, the actual data block will be much larger ). Shows the data structure after partitioning.


Note: The Oracle index in this article is an index created by a string field. Then, string fields are classified alphabetically. Of course, numbers and dates can also be used ,, the same applies to ArcSDE for Oracle. The spatial index is a grid. Compared with this example, it is nothing more than sorting by letter, five or five, arcGIS contains related elements in the grid range.

When you execute the search statement select * from people where name = 'David ';, Oracle only searches for the first data block because the database knows that, the second database is post-M data. After David is searched, if the value of the name column in the next record is not David, Oracle will stop searching because all values in the column are sorted alphabetically, all the "David" locations must be adjacent. Once "David" is found, Oracle immediately obtains its corresponding rowid and quickly locates the Record Based on the rowid.
For the following SQL statements, the effect of indexes is clearer.

;

Select * from people where name = 'Michael ';

Because the search condition is that the value of the name column is "Michael", the second data block is directly redirected to the second data block for search, because the second data block starts with M. In addition, when Michael's next record is "Richard", the search will be stopped and a set of results will be returned.

Note: To query ArcSDE data in oracle, perform the following steps:
1) First, compare the grid and query range to find all the grids within the query range.
2) Find all the elements in these grids.
3) Compare the outer envelope rectangle of these elements with the query range to find all the elements that are within the query range and that are at the intersection of the query range.

It is basically analogous.

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.