Saving Original Statistics and Gathering New Statistics
Assume many modifications have been made to the employees table since the last time statistics were gathered. To ensure that the cost-based optimizer is still picking the best plan, statistics should be gathered once again; however, the user is concerned that new statistics will cause the optimizer to choose bad plans when the current ones are acceptable. The user can do the following:
BEGIN DBMS_STATS.CREATE_STAT_TABLE ('hr', 'savestats'); DBMS_STATS.GATHER_TABLE_STATS ('hr', 'employees', stattab => 'savestats'); END;
This operation gathers new statistics on the employees table, but first saves the original statistics in a user statistics table: hr.savestats.
If the user believes that the new statistics are causing the optimizer to generate poor plans, then the original statistics can be restored as follows:
BEGIN DBMS_STATS.DELETE_TABLE_STATS ('hr', 'employees'); DBMS_STATS.IMPORT_TABLE_STATS ('hr', 'employees', stattab => 'savestats'); END;
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/27036311/viewspace-751068/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- SciTech-Mathematics-Probability+Statistics-7 Key Statistics Concepts
- SciTech-Mathmatics-Probability+Statistics-VI-Statistics:Quantifing Uncertainty + Regression Analysis)AI
- Statistics and Data Analysis for BioinformaticsORM
- Understanding System Statistics(zt)
- SciTech-Statistics-英語授課:Business Statistics商務統計
- MySQL中的Statistics等待MySql
- SciTech-Mathmatics-Probability+Statistics-VIII-Statistics:Quantifing Uncertainty+ANOCOVA(ANalysis of COVAriance)協方差分析原理AI
- MATH38161 Multivariate Statistics and Machine LearningMac
- Oracle 12C Statistics on Column GroupsOracle
- IBM SPSS Statistics 26中文啟用資源+IBM SPSS Statistics 26補丁安裝教程IBMSPSS
- SciTech-Mathmatics-Probability+Statistics-Population:Region-
- SciTech-Mathmatics-Probability+Statistics: Distribution : The Uniform DistributionORM
- 抓包整理外篇——————autoResponder、composer 、statistics [ 三]
- ORA-20005:object statistics are locked (stattype = ALL)Object
- 題解 CF993E 【Nikita and Order Statistics】
- ORA-20001 selecting from DBA_TAB_STATISTICS
- statistics_level與SGA_TARGET衝突
- IBM SPSS Statistics 26 中文啟用版下載IBMSPSS
- IBM SPSS Statistics 27.0.1中文啟用版IBMSPSS
- IBM SPSS Statistics 27:洞悉資料,揭示趨勢IBMSPSS
- 超強spss分析工具:IBM SPSS Statistics mac中文SPSSIBMMac
- IBM SPSS Statistics for Mac/Win:專業資料分析利器IBMSPSSMac
- SPSS Statistics 27:用資料揭示真理的指南針SPSS
- World Of Statistics:中國人買iPhone 14要花12%年薪iPhone
- [20220517]toad使用gather_plan_statistics提示問題.txt
- 關於資料庫 statistics_level的介紹資料庫
- PostgreSQL多值列的選擇性-Statistics,Cardinality,Selectivity,EstimateSQL
- IBM SPSS Statistics 26 for Mac(spss資料統計分析工具)IBMSPSSMac
- PostgreSQL DBA(171) - PG 13(pg_stat_statements to track planning statistics)SQL
- 『言善信』Fiddler工具 — 7、Fiddler統計(Statistics)詳解
- 【BUG】Oracle12c tablespace io statistics missing from awr reportOracle
- spss統計軟體:BM SPSS Statistics 27 mac 啟用版SPSSMac
- Caused by: java.lang.ClassNotFoundException: javax.management.j2ee.statistics.StatsJavaException
- SciTech-Mathmatics-Probability+Statistics-Population Vs. Sampling: Representative Samples + How to obtain SamplesAI
- SciTech-Mathmatics-Probability+Statistics-Applications : Probability&Sampling : Sampling Distribution + Central Limit TheoremAPPMITREM
- SciTech-Mathmatics-Probability+Statistics-Population:Region-Hypothesis Testing假設檢驗
- 「Macos最新」IBM SPSS Statistics 27 Mac中文版 支援M1MacIBMSPSS
- 深度洞察資料,IBM SPSS Statistics 27助您駕馭統計分析IBMSPSS
- MySQL 8.0 Reference Manual(讀書筆記75節--Optimizer Statistics for InnoDB (1))MySql筆記