本文主要是介绍解读 Oracle12c 执行计划——HASH JOIN,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
解读 Oracle12c 执行计划——HASH JOIN
Oracle官方文档中的解释如下:
Hash Joins - Hash joins are used for joining large data sets. The optimizer uses the smaller of the two tables or data sources to build a hash table, based on the join key, in memory. It then scans the larger table, and performs the same hashing algorithm on the join column(s). It then probes the previously built hash table for each value and if they match, it returns a row.
优化器使用两个表或数据源中较小的一个来在内存中基于连接键构建哈希表。然后扫描较大的表,并在连接列上执行相同的哈希算法。然后,为每个值探测先前构建的哈希表,如果它们匹配,则返回一行。
Nested Loops joins - Nested loops joins are useful when small subsets of data are being joined and if there is an efficient way of accessing the second table (for example an index look up). For every row in the first table (the outer table), Oracle accesses all the rows in the second table (the inner table). Consider it like two embedded FOR loops. In Oracle Database 11g the internal implemen
这篇关于解读 Oracle12c 执行计划——HASH JOIN的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!