Sorted Hash Cluster

When the Oracle database stores data in a heap-organized table, the rows are not stored in a usercontrolled order. Rather, the decision about where to place a row is dependent on storage heuristics. The Oracle database does not guarantee the return order of the rows unless the query
includes an ORDER BY clause.

[@more@]Inside a sorted hash cluster, the rows are organized in lists of sorted rows. Each list corresponds to a particular value of the hash key columns defined by the corresponding sorted hash cluster. Within each list, the rows are stored in the order specified by the sort key columns defined by the corresponding sorted hash cluster. This is also the default return order when querying the table by using the hash key columns in the predicate.
Sorted hash clusters offer the benefit of eliminating the CPU time and private memory needed to sort the data for queries that require a guaranteed returned order between SQL statements. When querying data in a sorted hash–clustered table by cluster key columns with an ORDER BY
clause that references only the sort key columns or one of their prefixes, the optimizer avoids the sorting overhead, because the rows are returned sorted by the sort key columns. However, for the same kind of queries, if you have an ORDER BY clause on a suffix of the sort key columns or nonsort key columns, additional sorting is required, assuming that no indexes are defined on the table. For this reason, when you create a sorted hash cluster, select its order key columns carefully.

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/38542/viewspace-933500/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/38542/viewspace-933500/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值