反转索引

<pre name="code" class="sql">Reverse Key Indexes

Creating a reverse key index, compared to a standard index, reverses the bytes of each column indexed (except the rowid) while keeping the column order. 

Such an arrangement can help avoid performance degradation with Real Application Clusters where modifications to the index are concentrated on a small set of 

leaf blocks. 

By reversing the keys of the index, the insertions become distributed across all leaf keys in the index.

Using the reverse key arrangement eliminates the ability to run an index range scanning query on the index. 

Because lexically adjacent keys are not stored next to each other in a reverse-key index, only fetch-by-key or full-index (table) scans can be performed.


反转索引:

创建一个反转索引,相比标准索引,在保持列顺序的情况下,翻转索引列值的字节(除了rowid).

如此的安排可以帮助避免性能灾难在RAC环境下,在RAC环境下对索引的修改讲影响一部分叶子块


通过反转索引的键值,插入编程了分布索引的所有叶子块。

使用反转索引就消除了索引Index range scan的能力


因为相邻的键值不是相邻存储在反转索引中,只用通过key来访问或者full-index (table) scan才可以


比如:seqquence 990 991 992 993 994 995 996 997 998 这样递增的都插入在索引的最右边

反转后变成 099 199 299 399 499 599 699 799 899  插入的位置为


099       199        299            399         499           599       699         799     899

本来连续的数据被打散插入到不同的leaf块中





原文地址:https://www.cnblogs.com/zhaoyangjian724/p/3797864.html