If you really need random rows out of your results, there are much better ways of doing it.
如果你确实需要随机的返回行,我们有更为有效的方法。
Since DB2 will only use the index the "traditional" way for index-only access, the rows will be returned just like our index data, in groups of identical LASTNAMEs in random order.
因为DB 2仅将以“传统”方式使用索引,以实现仅限索引的访问,各行将像我们的索引数据一样,在同样的LASTNAME小组以随机形式返回。
After the reorganization, the index NAMES_FULL_NAME will have a very low cluster factor (close to 0), because the rows are now stored in random order.
在进行重组之后,索引NAMES_FULL_NAME将具有一个极低的群集因子(接近于0),因为现在的行是以随机次序存储的。
Loop repeats the cycle with a newly generated random code until a scan of the rows does not produce a match.
Loop使用一个新生成的随机码重复这个循环,直到行扫描不再生成匹配值。
Here DB2 can match on only one column, and since LASTNAME is random, DB2 must do a data sort to bring our rows back in LASTNAME, EMPNO order.
这里DB 2仅可在一列上匹配,并且因为LASTNAME是随机的,DB 2必须执行数据排序来以LASTNAME、EMPNO顺序返回我们的行。
Here DB2 can match on only one column, and since LASTNAME is random, DB2 must do a data sort to bring our rows back in LASTNAME, EMPNO order.
这里DB 2仅可在一列上匹配,并且因为LASTNAME是随机的,DB 2必须执行数据排序来以LASTNAME、EMPNO顺序返回我们的行。
应用推荐