[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/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- [20170114]12c varchar2型別直方圖.txt型別直方圖
- [20170615]直方圖-高度直方圖(11g).txt直方圖
- [20161208]11g直方圖與char資料型別.txt直方圖資料型別
- python如何畫直方圖Python直方圖
- 確定enqueue鎖型別ENQ型別
- 直方圖直方圖
- 收集直方圖及檢視直方圖資訊直方圖
- [20120905]刪除直方圖.txt直方圖
- 如何在執行時確定物件型別(RTTI)物件型別
- 直方圖(histograms)直方圖Histogram
- 7.3 直方圖直方圖
- oracle 直方圖Oracle直方圖
- [20140301]直方圖與優化.txt直方圖優化
- 直方圖均衡化直方圖
- 04:垂直直方圖直方圖
- oracle直方圖使用Oracle直方圖
- 直方圖學習直方圖
- Oracle直方圖解析Oracle直方圖圖解
- [zt] Histograms - 直方圖Histogram直方圖
- dba_histograms等高直方圖和等頻直方圖的理解Histogram直方圖
- Oracle當number型別超過一定長度直方圖限制導致SQL執行計劃錯誤Oracle型別直方圖SQL
- 對於返回值型別不確定的函式如何限定返回值型別型別函式
- 請教大家,java如何顯示直方圖、餅圖等等?Java直方圖
- 直方圖中最大矩形直方圖
- Oracle直方圖詳解Oracle直方圖
- 【效能優化】直方圖優化直方圖
- [20221227]Adaptive Cursor Sharing & 直方圖.txtAPT直方圖
- [20180122]列統計與直方圖.txt直方圖
- 關於直方圖中關於字元型別的ENDPOINT_VALUE欄位的轉換直方圖字元型別
- [Python影象處理] 十一.灰度直方圖概念及OpenCV繪製直方圖Python直方圖OpenCV
- OpenCV計算機視覺學習(9)——影像直方圖 & 直方圖均衡化OpenCV計算機視覺直方圖
- halcon-直方圖均衡直方圖
- elasticsearch 之 histogram 直方圖聚合ElasticsearchHistogram直方圖
- oracle直方圖筆記-轉Oracle直方圖筆記
- 使用直方圖注意事項直方圖
- (轉)Oracle直方圖詳解Oracle直方圖
- Oracle直方圖詳解(ZT)Oracle直方圖
- SAP RETAIL 如何確定自動補貨觸發的單據型別AI型別