1 问题引出
对于提高ArcSDE的性能,其中的一项内容为(Oracle一直推荐的、ESRI强力建议的)把index和table分开来存储,分不同的磁盘存放。对于SDE来说,在SDE.DBTUNE表中设置config_string来设置。(本节不详细展开,以后会开新贴讨论ArcSDE的调优问题)
这样一来,就产生了一个问题,对于一个一个featrue class来讲,导入数据库后,产生的表和索引是怎样存储的呢,分别占用多大的空间呢?
2 测试环境
Windows 2000 advanced server; oracle 9i ;ArcSDE 9.0
图层 BUILDING:(polygon)大小,24.6MB。
3 分析过程
A: ArcCatalog 导入一建筑物图层。分别查询关于这个图层所有表的磁盘空间占用情况。
默认参数(不指定GRID SIZE)
B:查看表大小:
select owner ,table_name, NUM_ROWS, BLOCKS*AAA/1024/1024 "Size M", EMPTY_BLOCKS, LAST_ANALYZED from dba_tables where table_name= XXX ;
Here: AAA is the value of db_block_size ; oracle 默认为2048 。本次测试为8096
XXX is the table name you want to check
C:查看index大小:
select sum(blocks)*AAA/1024/1024 from dba_extents t where t.owner=OEWNER' and t.segment_name=XXX
Here: AAA is the value of db_block_size ; oracle 默认为2048 。本次测试为8096
XXX is the index name you want to check
实际上这种查询也应该可以对表大小进行查询,只要t.segment_name指定表名称即可。只不过这样查询出的结果比上一种方法查询出的结果稍大。不知道为什么 :)
注意:如果查询结果为空的话,需要事情对表进行分析(analyze)。
方法:sqlplus user/pass
Analyze table table_name compute statistics;
Analyze index index_name compute statistics;
|
4 结果
对于ArcSDE的一个featrue class 而言,导入数据库后生成了三张table,7个index。
分别为:(假设在sde.layers中序号为100)
|
名称 |
类别 |
索引列 |
存储空间大小 |
|
BUILDING |
Table |
|
2 M |
|
-> A100_IX1 |
Index |
Shape |
0.8 M |
|
->index 162_SDE_ROWID_UK |
Index |
OBJECTID |
0.8 M |
|
F100 |
Table |
|
9 |
|
->F100_AREA_IX2 |
Index |
AREA |
2 M |
|
->F100_LEN_IX3 |
Index |
LEN |
2 M |
|
->F100_UK1 |
Index |
FID |
0.8 M |
|
S100 |
Table |
|
6 M |
|
->S100_IX1 |
Index |
GX,GY,EMAXX,EMAXY,
EMINX,EMINY,SP_FID |
8 M |
|
->S100_IX2 |
Index |
SP_FID |
3 M |
|
|