WEB开发网
开发学院数据库DB2 在 DB2 Database Partitioning Feature 环境中选择... 阅读

在 DB2 Database Partitioning Feature 环境中选择分区键

 2010-09-09 00:00:00 来源:WEB开发网   
核心提示: 示例 2这个示例展示了通配符在 ESTIMATE_EXISTING_DATA_SKEW 例程中的使用, 清单 3 报告了具有模式 TPCD 且表名以 “PART” 开头的所有表的现有数据倾斜,在 DB2 Database Partitioning Feature 环境中选

示例 2

这个示例展示了通配符在 ESTIMATE_EXISTING_DATA_SKEW 例程中的使用。 清单 3 报告了具有模式 TPCD 且表名以 “PART” 开头的所有表的现有数据倾斜。由于这些表相对比较大,这个例子构建于 1% 的数据以减少性能的损失。

清单 3. 测量多个表的现有数据倾斜

$ db2 "set serveroutput on" 
$ db2 "CALL estimate_existing_data_skew('TPCD', 'PART%', 1)" 
CALL estimate_existing_data_skew('TPCD', 'PART%', 1) 
 
 Return Status = 0 
 
DATA SKEW ESTIMATION REPORT FOR TABLE: TPCD.PART% 
This report is based on the existing partitioning key 
Accuracy is based on 1% sample of data 
------------------------------------------------------------------------ 
TPCD.PART 
Estimated total number of records in the table: : 399,799,400 
Estimated average number of records per partition : 49,974,900 
 
Row count at partition 1 : 50,051,800 (Skew: 0.15%) 
Row count at partition 2 : 49,951,200 (Skew: -0.04%) 
Row count at partition 3 : 49,862,500 (Skew: -0.22%) 
Row count at partition 4 : 49,986,500 (Skew: -0.02%) 
Row count at partition 5 : 50,096,400 (Skew: 0.24%) 
Row count at partition 6 : 49,993,900 (Skew: -0.03%) 
Row count at partition 7 : 49,955,900 (Skew: -0.03%) 
Row count at partition 8 : 49,901,200 (Skew: -0.14%) 
 
Number of partitions: 8 (1, 2, 3, 4, 5, 6, 7, 8) 
------------------------------------------------------------------------ 
TPCD.PARTSUPP 
Estimated total number of records in the table: : 1,600,374,100 
Estimated average number of records per partition : 200,046,700 
 
Row count at partition 1 : 200,298,100 (Skew: 0.12%) 
Row count at partition 2 : 200,154,900 (Skew: 0.05%) 
Row count at partition 3 : 200,006,700 (Skew: 0.01%) 
Row count at partition 4 : 199,831,600 (Skew: -0.10%) 
Row count at partition 5 : 199,962,200 (Skew: -0.04%) 
Row count at partition 6 : 200,083,900 (Skew: 0.01%) 
Row count at partition 7 : 199,910,300 (Skew: -0.06%) 
Row count at partition 8 : 200,126,400 (Skew: 0.03%) 
 
Number of partitions: 8 (1, 2, 3, 4, 5, 6, 7, 8) 
------------------------------------------------------------------------ 
TPCD.SUPPLIER 
Estimated total number of records in the table: : 20,000,000 
Estimated average number of records per partition : 2,500,000 
 
Row count at partition 1 : 2,498,411 (Skew: -0.06%) 
Row count at partition 2 : 2,498,837 (Skew: -0.04%) 
Row count at partition 3 : 2,500,996 (Skew: 0.03%) 
Row count at partition 4 : 2,500,170 (Skew: 0.00%) 
Row count at partition 5 : 2,501,254 (Skew: 0.05%) 
Row count at partition 6 : 2,499,654 (Skew: -0.01%) 
Row count at partition 7 : 2,501,429 (Skew: 0.05%) 
Row count at partition 8 : 2,499,249 (Skew: -0.03%) 
 
Number of partitions: 8 (1, 2, 3, 4, 5, 6, 7, 8) 
------------------------------------------------------------------------ 
 
Total execution time: 51 seconds 

上一页  1 2 3 4 5 6 7 8 9 10  下一页

Tags:DB Database Partitioning

编辑录入:爽爽 [复制链接] [打 印]
赞助商链接