11G,可以只刪除直方圖資訊
Deleting Object Statistics
You can delete object statistics from the data dictionary. Except for testing purposes, this is
usually not necessary. Nevertheless, it might happen that a table should not have statistics
because you want to take advantage of dynamic sampling (this feature is covered in Chapter 5).
In that case, the following procedures are available in the package dbms_stats:
• delete_database_stats
• delete_dictionary_stats
• delete_fixed_objects_stats
• delete_schema_stats
• delete_table_stats
• delete_column_stats
• delete_index_stats
As you can see, for each procedure gather_*_stats, there is a corresponding procedure
delete_*_stats. The former ones gather object statistics, and the latter ones delete object
statistics. The only exception is the procedure delete_column_stats. As its name suggests, it is
used for deleting column statistics and histograms.
Table 4-10 summarizes the parameters available for each of these procedures. Most of
them are the same and, therefore, have the same meaning as the parameters used by the
procedures gather_*_stats. I will describe here only the parameters that have not already been
described with the earlier procedures:
• cascade_parts specifies whether statistics for all underlying partitions are deleted. This
parameter accepts the values TRUE and FALSE. The default value is TRUE.
• cascade_columns specifies whether column statistics are deleted as well. This parameter
accepts the values TRUE and FALSE. The default value is TRUE.
• cascade_indexes specifies whether index statistics are deleted as well. This parameter
accepts the values TRUE and FALSE. The default value is TRUE.
• col_stat_type specifies which statistics are deleted. If it is set to ALL, column statistics
and histograms are deleted. If it is set to HISTOGRAM, only histograms are deleted. The
default value is ALL. This parameter is available as of Oracle Database 11g.
The following call shows how to delete the histogram of one single column (a full example
is found in the script. delete_histogram.sql) without modifying the other statistics:
dbms_stats.delete_column_stats(ownname => user,
tabname => 'T',
colname => 'VAL',
col_stat_type => 'HISTOGRAM')
You can delete object statistics from the data dictionary. Except for testing purposes, this is
usually not necessary. Nevertheless, it might happen that a table should not have statistics
because you want to take advantage of dynamic sampling (this feature is covered in Chapter 5).
In that case, the following procedures are available in the package dbms_stats:
• delete_database_stats
• delete_dictionary_stats
• delete_fixed_objects_stats
• delete_schema_stats
• delete_table_stats
• delete_column_stats
• delete_index_stats
As you can see, for each procedure gather_*_stats, there is a corresponding procedure
delete_*_stats. The former ones gather object statistics, and the latter ones delete object
statistics. The only exception is the procedure delete_column_stats. As its name suggests, it is
used for deleting column statistics and histograms.
Table 4-10 summarizes the parameters available for each of these procedures. Most of
them are the same and, therefore, have the same meaning as the parameters used by the
procedures gather_*_stats. I will describe here only the parameters that have not already been
described with the earlier procedures:
• cascade_parts specifies whether statistics for all underlying partitions are deleted. This
parameter accepts the values TRUE and FALSE. The default value is TRUE.
• cascade_columns specifies whether column statistics are deleted as well. This parameter
accepts the values TRUE and FALSE. The default value is TRUE.
• cascade_indexes specifies whether index statistics are deleted as well. This parameter
accepts the values TRUE and FALSE. The default value is TRUE.
• col_stat_type specifies which statistics are deleted. If it is set to ALL, column statistics
and histograms are deleted. If it is set to HISTOGRAM, only histograms are deleted. The
default value is ALL. This parameter is available as of Oracle Database 11g.
The following call shows how to delete the histogram of one single column (a full example
is found in the script. delete_histogram.sql) without modifying the other statistics:
dbms_stats.delete_column_stats(ownname => user,
tabname => 'T',
colname => 'VAL',
col_stat_type => 'HISTOGRAM')
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/22034023/viewspace-689414/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 收集直方圖及檢視直方圖資訊直方圖
- [20140505]刪除直方圖_delete histogram直方圖deleteHistogram
- [20120905]刪除直方圖.txt直方圖
- [20170615]直方圖-高度直方圖(11g).txt直方圖
- oracle統計資訊和直方圖Oracle直方圖
- oracle統計資訊--直方圖的收集:Oracle直方圖
- 直方圖直方圖
- Oracle直方圖統計資訊的應用Oracle直方圖
- 關於列的直方圖統計資訊直方圖
- 收集資料庫統計資訊需要收集直方圖資訊.資料庫直方圖
- 直方圖(histograms)直方圖Histogram
- 7.3 直方圖直方圖
- oracle 直方圖Oracle直方圖
- [轉] oracle統計資訊(statistics)和直方圖(histogram)Oracle直方圖Histogram
- Oracle的自動統計資訊不收集直方圖的資訊Oracle直方圖
- Thinkphp 更新圖片,刪除原圖,更新文字或者圖片互不干涉,可以只更新圖片或者只更新文字。PHP
- 直方圖均衡化直方圖
- 04:垂直直方圖直方圖
- oracle直方圖使用Oracle直方圖
- 直方圖學習直方圖
- Oracle直方圖解析Oracle直方圖圖解
- [zt] Histograms - 直方圖Histogram直方圖
- dba_histograms等高直方圖和等頻直方圖的理解Histogram直方圖
- 11g 等頻直方圖下sql不走索引掃描直方圖SQL索引
- 直方圖中最大矩形直方圖
- Oracle直方圖詳解Oracle直方圖
- 【效能優化】直方圖優化直方圖
- 只讀表空間物件被刪除後對應的物件資訊物件
- 優化由直方圖資訊導致的sql效能問題優化直方圖SQL
- win10 programdata哪些可以刪除_win10 programdata可以刪除嗎Win10
- [Python影象處理] 十一.灰度直方圖概念及OpenCV繪製直方圖Python直方圖OpenCV
- OpenCV計算機視覺學習(9)——影像直方圖 & 直方圖均衡化OpenCV計算機視覺直方圖
- halcon-直方圖均衡直方圖
- python如何畫直方圖Python直方圖
- elasticsearch 之 histogram 直方圖聚合ElasticsearchHistogram直方圖
- oracle直方圖筆記-轉Oracle直方圖筆記
- 使用直方圖注意事項直方圖
- (轉)Oracle直方圖詳解Oracle直方圖