当前位置: 代码迷 >> 综合 >> 解读 Oracle12c 执行计划——HASH JOIN
  详细解决方案

解读 Oracle12c 执行计划——HASH JOIN

热度:70   发布时间:2024-01-15 20:07:51.0

解读 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

  相关解决方案