频道直达 - 专题 - 新闻 - 技巧 - 组网 - 开发 - 安全 - web编程 - 图像 - 操作系统 - 数据库 - 教育 - 旅游 - 健康 - 时尚 - 驱动 - 软件 - 游戏 - 多媒体 - ERP - 讨论组

Oracle数据库的Hash join

来源:pcdog 作者:佚名 出处:巧巧读书 2008-04-30 进入讨论组
上一页 1 2 3 4 

    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的数据分配诊断。

更多文章 更多内容请看数据库专栏数据库处理专题城域网专题专题,或进入讨论组讨论。
上一页 1 2 3 4 
收藏此文】【 】【打印】【关闭
相关图文阅读
频道图文推荐
健 康 咨 询
时 尚 咨 询
巧巧读书宗旨
相关专题
讨论组问题推荐
站内各频道最新更新文档
站内最新制作专题
热门关键字导读
Photoshop教 程照片处理 照片制作 PS快捷键 抠图
计 算 机 故 障XP系统修复
艺 术 与 设 计设计 流媒体 设计欣赏 边框
计 算 机 安 全ARP
站内频道文章精选
巧巧电脑频道编辑信箱  告诉我们您想看的专题或文章