oracle10g的dynamic sampling
dynamic sampling主要是用來改善oracle的效能,使其得到更為正確的執行計劃。oracle是透過optimizer_dynamic_sampling這個引數實現動態取樣,在9i裡面dynamic sampling需要在多表關聯的語句裡面才會起作用。在10g裡面optimizer_dynamic_sampling在2及以上級別時單表就能dynamic sampling。
[@more@]You control dynamic sampling with the OPTIMIZER_DYNAMIC_SAMPLING
parameter, which can be set to a value from 0
to 10
.
- A value of
0
means dynamic sampling will not be done. - A value of
1
(the default) means dynamic sampling will be performed if all of the following conditions are true:- There is more than one table in the query.
- Some table has not been analyzed and has no indexes.
- The optimizer determines that a relatively expensive table scan would be required for this unanalyzed table.
- Increasing the value of the parameter results in more aggressive application of dynamic sampling, in terms of both the type of tables sampled (analyzed or unanalyzed) and the amount of I/O spent on sampling.
Dynamic sampling is repeatable if no rows have been inserted, deleted, or updated in the table being sampled.
The parameter OPTIMIZER_FEATURES_ENABLE
turns off dynamic sampling if set to a version prior to 9.0.2.
另外使用DYNAMIC_SAMPLING hint同樣可以做動態取樣:
SELECT /*+ dynamic_sampling(4) */ * FROM ...
enables dynamic sampling if all of the following conditions are true:
- There is more than one table in the query.
- Some table has not been analyzed and has no indexes.
- The optimizer determines that a relatively expensive table scan would be required for this table that has not been analyzed.
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/12402/viewspace-1044816/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- optimizer_dynamic_sampling引數的理解
- ptimizer_dynamic_sampling設定為4的作用。
- Pipelined table function statistics and dynamic samplingFunction
- 優化器革命之-Dynamic Sampling(二)優化
- 優化器革命之-Dynamic Sampling(五)優化
- 優化器革命之-Dynamic Sampling(四)優化
- 優化器革命之-Dynamic Sampling(三)優化
- oracle動態取樣_optimizer_dynamic_samplingOracle
- oracle動態取樣_optimizer_dynamic_sampling(二)Oracle
- sql profile禁用oracle動態取樣dynamic samplingSQLOracle
- dbms_stats.lock_table_stats與動態取樣(Dynamic Sampling)
- oracle動態取樣dynamic sampling hint為何不生效一點思考Oracle
- Oracle 11g中dynamic sampling自動調節(auto-adjusted)機制Oracle
- Importance samplingImport
- @synthesize @dynamic 的區別
- hive dynamic partition的使用Hive
- 9i,10g 優化器動態取樣級別引數 -- optimizer_dynamic_sampling (統計優化)優化
- Objective-C中的@dynamicObject
- php static dynamicPHP
- C# dynamicC#
- dynamic_castAST
- SampleNet: Differentiable Point Cloud SamplingCloud
- Informix Dynamic Server的安裝(轉)ORMServer
- SciTech-Mathmatics-Probability+Statistics-Applications : Probability&Sampling : Sampling Distribution + Central Limit TheoremAPPMITREM
- dynamic bone unity githubUnityGithub
- why use dynamic SQL?SQL
- Disable Dynamic DNS updateDNS
- C#中dynamic的正確用法C#
- C++ 中dynamic_cast<>的用法C++AST
- DRM - Dynamic Resource MasteringAST
- c# dynamic和ExpandoObjectC#Object
- EXECUTE IMMEDIATE dynamic sql in procedureSQL
- DataTable 轉為 List<dynamic>
- MCMC和Gibbs Sampling演算法演算法
- C++ RTTI中dynamic_cast的用法C++AST
- 【轉】C#中dynamic的正確用法C#
- 理解C# 4 dynamic(2) – ExpandoObject的使用C#Object
- TCP/UDP的埠Dynamic Port Range問題TCPUDP