PS:每个partition的行数增加
。。。
Number of buckets with 0 rows: 622
Number of buckets with 1 rows: 319
Number of buckets with 2 rows: 71
Number of buckets with 3 rows: 10
Number of buckets with 4 rows: 2
Number of buckets with 5 rows: 0
。。。
### Hash table overall statistics ###
Total buckets: 1024 Empty buckets: 622 Non-empty buckets: 402
Total number of rows: 500
Maximum number of rows in a bucket: 4
Average number of rows in non-empty buckets: 1.243781
小表5000行时候的trace分析
Original hash-area size: 3809692
Memory for slot table: 2826240
。。。
Hash-join fanout: 8
Number of partitions: 8
Nuber of slots: 23
Multiblock IO: 15
Block size(KB): 8
Cluster (slot) size(KB): 120
Minimum number of bytes per block: 8160
Bit vector memory allocation(KB): 128
Per partition bit vector length(KB): 16
Maximum possible row length: 270
Estimated build size (KB): 0
。。。
### Partition Distribution ###
Partition:0 rows:588 clusters:1 slots:1 kept=1
Partition:1 rows:638 clusters:1 slots:1 kept=1
Partition:2 rows:621 clusters:1 slots:1 kept=1
Partiton:3 rows:651 clusters:1 slots:1 kept=1
Partition:4 rows:645 clusters:1 slots:1 kept=1
Partition:5 rows:611 clusters:1 slots:1 kept=1
Partitio:6 rows:590 clusters:1 slots:1 kept=1
Partition:7 rows:656 clusters:1 slots:1 kept=1
。。。
# than the true number.
Number of buckets with 0 rows: 4429
Number of buckets with 1 rows: 2762
Number of buckets with 2 rows: 794
Number of buckets with 3 rows: 182
Number of buckets with 4 rows: 23
Number of buckets with 5 rows: 2
Number of buckets with 6 rows: 0
。。。
### Hash table overall statistics ###
Total buckets: 8192 Empty buckets: 4429 Non-empty buckets: 3763
Total number of rows: 5000
Maximum number of rows in a bucket: 5
PS:当小表上升到5000行的时候,bucket的rows最大也不过5行。注意,如果bucket行数过多,遍历带来的开销会带来性能的严重下降。
Average number of rows in non-empty buckets: 1.328727
结论:
Oracle数据库10g中,内存问题并不是干扰Hash join的首要问题,现今硬件价格越来越便宜,内存2G,8G,64G的环境也很常见。大家在针对hash join调优的过程,更要偏重于partition和bucket的数据分配诊断。
相关专题
- 数据库专栏 (5296篇文章)
- 数据库处理专题 (9002篇文章)
- 城域网专题 (8008篇文章)
- 数据库安全技术专题 (13517篇文章)
- 数据库安装与卸载 (10792篇文章)
- Oracle 10g基础应用 (4629篇文章)
- Linux数据库宝典 (13792篇文章)
- 数据库相关文章 (5296篇文章)
- 数据库体系架构 (1166篇文章)
- Oracle数据库中关键字 (67次浏览)
- 实例讲解清除Oracle 10g RAC CRS的方法 (48次浏览)
- Data Guard学习物理standby高级管理 (47次浏览)
- 深入讲解“database link”的设置和使用 (31次浏览)
- 甲骨文:从手机功能变化看数据库性能扩展 (27次浏览)
- Windows环境中同时安装Oracle9i 10g和11g (25次浏览)
- Oralce定时执行存储过程任务的设置步骤 (24次浏览)
- 实例讲解Oracle监听口令及监听器安全 (23次浏览)
- 测量磁盘I/O (21次浏览)
- 初学者应该如何理解Oracle的架构知识 (20次浏览)



