[20190630]如何确定直方图类型.txt http://dbaparadise.com/2018/06/which-histogram-will-oracle-pick/ let's explore how will Oracle decide which type of histograms to use. Oracle is using 4 variables to determine the type of histogram to use. These variables are listed below: 1) number of distinct values in the column -> NDV. If the column in the table has the values red, blue, yellow, green, then NDV=4 2) number of histogram buckets -> n. The default value for n is 254. If you don't explicitly specify the number of buckets, then by default Oracle will set the number of buckets to 254. 3) internal variable, percentage threshold, p = (1–(1/n)) * 100; This is a formula set by Oracle. 4) the value of estimate_percent, when you gather statistics, whether or not it's set to default value AUTO_SAMPLE_SIZE, when gathering statistics. --//number of distinct values in the column -> NDV --//n 指建立直方图桶的数量。缺省时254? Here are the rules, set by Oracle when picking a specific type of histogram: Oracle will pick a Frequency Histogram if: NDV < n (n=254 by default) if number of distinct values is less than the number of histogram buckets. --//如果NDV<254 ,选择频率直方图. Oracle will pick a Height Balanced Histogram if: NDV > n (n=254 by default) estimate_percent < > AUTO_SAMPLE_SIZE if number of distinct values is greater than the number of histogram buckets and the estimate percent is not set to AUTO_SAMPLE_SIZE during stats gathering. --//如果NDV>254,estimate_percent < > AUTO_SAMPLE_SIZE,选择Height Balanced Histogram. Oracle will pick a Hybrid Histogram if: NDV > n (n=254 by default) estimate_percent = AUTO_SAMPLE_SIZE percentage of rows for top n (n=254 by default) frequent values < p If n=254, then p is 99.6 --// (1-1/254) *100 = 99.60629921259842519700 --//如果NDV > n,estimate_percent = AUTO_SAMPLE_SIZE. --//流行值的比例 < p,选择Hybrid Histogram. Oracle will pick a Top Frequency Histogram if NDV > n (n=254 by default) estimate_percent = AUTO_SAMPLE_SIZE percentage of rows for top n (n=254 by default) frequent values >= p --//如果NDV > n,estimate_percent = AUTO_SAMPLE_SIZE. --//流行值的比例 >= p,选择Top Frequency Histogram. --//注:要生成Top Frequency Histogram 或者 Hybrid Histogram都要分析时estimate_percent = AUTO_SAMPLE_SIZE。 --//P的计算公式如下: --//(1-1/n)*100= (1-1/254)*100 = 99.60629921259842519700
[20190630]如何确定直方图类型.txt
来源:这里教程网
时间:2026-03-03 13:58:54
作者:
编辑推荐:
- [20190630]如何确定直方图类型.txt03-03
- oracle11g dg broker配置服务的高可用03-03
- X7一体机数据库迁移问题处理03-03
- 管理(005):密码文件设置03-03
- Aix 7一次补丁安装失败问题处理03-03
- 管理(006):启用只读Oracle Home目录03-03
- 疯狂融资没戏了,生鲜电商接下来要圈钱只能IPO了?03-03
- expdpnf 导出问题总结03-03
下一篇:
相关推荐
-
雷神推出 MIX PRO II 迷你主机:基于 Ultra 200H,玻璃上盖 + ARGB 灯效
2 月 9 日消息,雷神 (THUNDEROBOT) 现已宣布推出基于英
-
制造商 Musnap 推出彩色墨水屏电纸书 Ocean C:支持手写笔、第三方安卓应用
2 月 10 日消息,制造商 Musnap 现已在海外推出一款 Oce
热文推荐
- oracle11g dg broker配置服务的高可用
oracle11g dg broker配置服务的高可用
26-03-03 - 疯狂融资没戏了,生鲜电商接下来要圈钱只能IPO了?
疯狂融资没戏了,生鲜电商接下来要圈钱只能IPO了?
26-03-03 - Oracle数据库执行truncate table操作后如何逆向恢复之前的状态
- 从Oracle到PostgreSQL:Storage Index 特性 vs BRIN索引
- OGG-01117 Received signal: Program interrupt (2)
- Debian route命令详解(Linux路由表管理入门教程)
Debian route命令详解(Linux路由表管理入门教程)
26-03-03 - Oracle RAC Cache Fusion 系列八:Oracle RAC 分布式资源管理(一)
- 《数据安全警示录》一书修订版出版
《数据安全警示录》一书修订版出版
26-03-03 - 跌宕起伏的ETC巨头金溢科技,晚年惨遭微信、支付宝截胡
跌宕起伏的ETC巨头金溢科技,晚年惨遭微信、支付宝截胡
26-03-03 - 市值暴跌3000亿背后的360
市值暴跌3000亿背后的360
26-03-03
