你應該是指在 Create index 時候沒有指定欄位排序是使用 ASC/DESC 情況下,預設值是什麼吧 !? IBM 網址給的答案是 ASC。ASC : Specifies that index entries are to be kept in ascending order of the column values; this is the default setting. ASC canno...
runstats表和索引。如果没有效果,注意观察sysstat.coldist视图,type列值的F和Q分别代表频度和分位数,看colvalue值,type=Q的是否有你的6和5,如果没有并且timeron成本仍然高,在不改数据库参数的情况下用下面的语句搞到有6和5为止,我就不信它还慢啦!runstats on table alt.debit_re...
有一个问题困惑了我很久,同一张表数据下发到不同数据库调度时间差异竟如此大,相差5小时,求解???假如现在我有A B C三个数据库,我要从数据库A的某一张表分别下发到数据库B和C,同一条sql,都是简单select语句,采用联邦技术,数据量比较大所以在A表做了索引,问题来了,下发到数据库B花1个小...(more)
回复 1# vincenthuang 以DB2 V9.7为例,在runstats中与索引相关的参数及作用:SAMPLED-索引取样: This option, only used with the DETAILED option, directs RUNSTATS to use a sampling technique when compiling the extended index statistic...
回复 1# vincenthuang 索引在DB2查询计划中有多种存在形式:– IXSCAN – FETCH– INDEX - ONLY– LIST PREFETCH– Index ANDing– Index ORing索引扫描,其中还涉及到索引的start key/stop key几种情况:A:start key/stop key,两者均有;知道从哪开始扫描、在哪停止执行,效率最理...