原帖由 kangoo77 于 2009-8-15 12:57 发表
建议改成
create index TICAPP001.XTPPTR010_04 on TICAPP001.TTPPTR010 (AREA_CD, MSG_CRTE_DTS ) compress 1;
如果AREA_CD中有不同的值, 而且数据分布比较均匀, 在WHERE中的AREA_CD取的之是其中少数的几个或一个, , 还是会减少一致读的块数, 对性能还是有较大提升的.
是的。不过用压缩会增加cpu成本:
http://www.freelists.org/post/or ... ession-on-Oracle-92,3
> plus there'll be obvious CPU usage because it'll need to uncompress for
> every read and compress for every write.The few GBs of storage to be saved
I wouldn't say that CPU usage increasing is so obvious. Oracle
actually doesn't do any compression
(oracle always toyed to avoid compression algorithms usage as Zip and
other classical utilities are using).
In an "Index compression" feature case Oracle avoids duplicate records
in leaf blocks. I would call the feature differently than Oracle did,
because the name doesn't reflect the meaning of functionality. |