[20190630]如何確定直方圖型別.txt
[20190630]如何確定直方圖型別.txt
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
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/267265/viewspace-2650453/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- [20221227]Adaptive Cursor Sharing & 直方圖.txtAPT直方圖
- python如何畫直方圖Python直方圖
- 直方圖學習直方圖
- 直方圖均衡化直方圖
- [20210817]如何通過bbed確定undo段.txt
- Oracle當number型別超過一定長度直方圖限制導致SQL執行計劃錯誤Oracle型別直方圖SQL
- [20210205]警惕toad下優化直方圖相關sql語句.txt優化直方圖SQL
- [20181031]如何確定db_link的程式號.txt
- halcon-直方圖均衡直方圖
- 直方圖中最大矩形直方圖
- [Python影象處理] 十一.灰度直方圖概念及OpenCV繪製直方圖Python直方圖OpenCV
- OpenCV計算機視覺學習(9)——影像直方圖 & 直方圖均衡化OpenCV計算機視覺直方圖
- SAP RETAIL 如何確定自動補貨觸發的單據型別AI型別
- [20210205]警惕toad下優化直方圖相關sql語句3.txt優化直方圖SQL
- Matplotlib直方圖繪製技巧直方圖
- elasticsearch 之 histogram 直方圖聚合ElasticsearchHistogram直方圖
- CBO計算與資料型別的選擇(兼談日期、字元、數字三種型別的直方圖生成原理和使用)資料型別字元直方圖
- SAP RETAIL 如何確定自動補貨觸發的單據型別 IIAI型別
- SAP RETAIL 如何確定自動補貨觸發的單據型別 IIIAI型別
- 引數如何在python中明確型別?Python型別
- 淺析MySQL 8.0直方圖原理MySql直方圖
- 【沃趣科技】直方圖系列1直方圖
- OpenCV之影象直方圖均衡化OpenCV直方圖
- 你知道直方圖都能幹啥?直方圖
- 一文搞懂直方圖均衡直方圖
- 聊一聊MySQL的直方圖MySql直方圖
- opencv——影像直方圖與反向投影OpenCV直方圖
- 柱狀圖、直方圖、散點圖、餅圖講解直方圖
- 直方圖均衡化原理與實現直方圖
- 一文搞懂 Prometheus 的直方圖Prometheus直方圖
- 灰度直方圖均衡化及其實現直方圖
- 深度學習(模型引數直方圖)深度學習模型直方圖
- matplotlib的直方圖繪製(筆記)直方圖筆記
- SAP LE 交貨單裡的移動型別的確定型別
- Python 影像處理 OpenCV (16):影像直方圖PythonOpenCV直方圖
- 【R語言】繪製權重直方圖R語言直方圖
- win10怎麼改圖片型別 windows10如何更改圖片型別Win10型別Windows
- AI數學基礎之:確定圖靈機和非確定圖靈機AI圖靈