arcsde for oracle(ST_GEMETRY)网格索引调整策略

0
分享 2015-12-07
arcsde for oracle中的ST_GEOMETRY存储方式使用的是网格空间索引来加快数据的检索速度,根据不同的数据,需要设置不同大小的网格以适应不同数据的访问速度。
在建立网格索引的时候,同时可以提供三种网格大小,来适应不同的数据,建立完索引后,可以使用sdelayer命令来查看网格索引设置的是否合理。
具体命令如下:
192.168.100.228 [sde bin]$ sdelayer -o si_stats

Error: Data base user name must be specified.
Error: Table name and spatial column must be specified.

ArcSDE 10.0 for Oracle10g Build 775 Fri Sep 17 11:45:27 2010
Layer Administration Utility
-----------------------------------------------------
sdelayer -o {stats | si_stats} -l <table,column> [-i <service>]
[-s <server_name>] [-D <database>]
[-u <DB_User_name>] [-p <DB_User_password>] [-q]
sdelayer -h
sdelayer -?
下面是一个具体的例子:
我的测试图层数据大约有270w条记录,使用ArcCatalog自动统计的网格大小所做出来的统计结果:
192.168.100.228 [sde ~]$ sdelayer -o si_stats -l STREETS,SHAPE -u sde -p sde


ArcSDE 10.0 for Oracle10g Build 775 Fri Sep 17 11:45:27 2010
Layer Administration Utility
-----------------------------------------------------
Layer 1050 Spatial Index Statistics:
Level 1, Grid Size 0.011
|-------------------------------------------------------------------|
| Grid Records: 3628219 |
| Feature Records: 2721089 |
| Grids/Feature Ratio: 1.33 |
| Avg. Features per Grid: 8.38 |
| Max. Features per Grid: 638 |
| % of Features Wholly Inside 1 Grid: 75.34 |
|-------------------------------------------------------------------|
| Spatial Index Record Count By Group |
| Grids: <=4 >4 >10 >25 >50 >100 >250 >500 |
|---------- ------ ------ ------ ------ ------ ------ ------ ------ |
| Features: 2712366 8723 2 0 0 0 0 0 |
| % Total: 100% 0% 0% 0% 0% 0% 0% 0%|
|-------------------------------------------------------------------|

优化的标准如下:
1. 网格的记录数除以地物的记录数要小于2,如上面的结果为1.33是满足这条要求的。
2. 一个网格中所包括的地物的个数适当的低一些,在100-300个是最好的,一个网格中包括的地物的最大个数最好不要超过4000。
3. 每个地物尽量不要跨网格,如果有20%的地物横跨网格,网格大小需要调整。
属性索引:
在查询中对经常使用的属性字段创建索引,索引是指向表记录的指针,可以提高查询性能,减少全表扫描,因此可以提高数据库整体的性能,因此在设计阶段需要对每个索引进行严格的性能测试。
文章来源:http://blog.csdn.net/liufeng1980423/article/details/6273915

0 个评论

要回复文章请先登录注册