How to optimize the size of the ArcSDE space grid?

Source: Internet
Author: User

Abstract: The Spatial Query of ArcSDE uses a grid index mechanism. Therefore, the setting of the index grid unit size directly affects data response and system performance. When a layer is imported to the SDE database, it automatically creates a grid index by default. The index has been optimized based on the layer space reference, graphic type, and other related information.

I. Introduction to SDE spatial indexes

The Spatial Query of ArcSDE uses a grid index mechanism. Therefore, the setting of the index grid unit size directly affects data response and system performance. When a layer is imported to the SDE database, it automatically creates a grid index by default. The index has been optimized based on the layer space reference, graphic type, and other related information.

ArcSDE provides a maximum of three levels of indexes. For general data, we only need to create a level-1 grid index, for example, the point data, or the amount of data is small, and the maximum range and minimum range used by a single image are not very large. In the SDE space database, the second-and third-level space grid size values are generally 0, we can create two or three-level indexes by changing the value of level 2 and level 3 grid size. The principle is that the size of the last level of Space Mesh should be more than three times the size of the first level of grid. Only such an index can make sense.

Ii. Analysis of space grid size settings

We know that layer data is stored in Table B and table F respectively in the SDE database, and the corresponding Layer Space Mesh index is stored in Table S, it stores the cut part of the space object in the feature ID sequence. If a geometric object is divided into three parts by a space mesh, there will be three records with the same feature ID in the s table.

The key to the problem is how much linear ratio should be used to cut and store the geometric images to save storage space and display them at a fast speed? The following two situations are analyzed:

If the linear proportion is too large, for example, 10000 is used as the linear proportion to cut the geometric object, there will be a problem: 10000*10000 the grid will store multiple records, if you zoom in, some geometric objects that are not in the current display window will also be read, which will inevitably slow down the display speed.

If the linear proportion is too small, for example, to use 1 as the linear proportion to cut the geometric object, there will be a problem: a large geometric object is divided into multiple parts and stored in the s table, when the storage space is increased and the operation is reduced to display a record, you must first read multiple parts and then splice them for display. In addition, for a wide range of records, the feature class is read-only mode and the layers are no longer readable.

Therefore, setting a linear ratio will affect storage and performance whether it is too large or too small. By the way, I also answered my colleague's question about how to store small scales and large scales in layers: If the sizes of geometric objects are different, the difference is very large, the calculated linear ratio is always unsatisfactory, so performance optimization cannot be achieved.

3. How to set the Space Mesh Size
A. Principles for setting the size of a Space Grid:
1. You only need to create a single-level index on the vertex layer, and the grid cell size can be larger, because the processing efficiency of the vertex layer is the highest;

2. Monitor the spatial index. If the data changes frequently, You need to reevaluate the index based on the data changes;

3. Adjust the cell size in the grid index to the application based on the actual application.ProgramFrequently Used window display size;

4. For unknown applications, you can set the cell size in Grid index to three times the average graph coverage;

B. Several methods to obtain graphic information:
1. Calculation Method of the average image coverage:

Select (AVG (emaxx-emedia) + AVG (emaxy-eminy)/2 from F <n>;

Example: Select (AVG (emaxx-emedia) + AVG (emaxy-eminy)/2 from SDE. f200;

2. How to query layer statistics:

Sdelayer-O stats-l layer_name, spatial_column_name-u sde_user_name-P sde_user_password-I SERVICE_NAME;

This information is an important basis for determining the cell size in the grid index.

3. How to query graph statistics:

Sdelayer-O si_stats-l layer_name, spatial_column_name-u sde_user_name-P sde_user_password-I SERVICE_NAME;

C. How to adjust the grid index (cannot be adjusted after the registration version ):

1. Implemented through catalog:

Select the Spatial Field of the layer (shape field by default) and modify the grid index parameter;
2. implemented through the SDE command line:

Sdelayer-O alter-l layer_name, spatial_column_name-G grid_size0, grid_size1, grid_size2-u sde_user_name-P sde_user_password-I SERVICE_NAME;

During the test, it was found that the cell size created by default has been optimized for normal layers during data import.

Iv. Summary
This article describes how to optimize SDE based on the analysis of the impact of space grid size settings on performance. To improve the system performance, optimizing grid indexes is only one of the factors. For more information about space access optimization, see: space information access optimization based on Oracle and ArcSDE.

Http://www.gissky.net/Article/1408.htm

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.