Database Statistics
5.1.3 Interpreting Statistics
When initially examining performance data, you can formulate potential theories by examining your statistics. One way to ensure that your interpretation of the statistics is correct is to perform. cross-checks with other data. This establishes whether a statistic or event is really of interest. Also, because foreground activities are tunable, it is better to first analyze the statistics from foreground activities before analyzing the statistics from background activities.
Some pitfalls are discussed in the following sections:
-
Hit ratios --------命中率
When tuning, it is common to compute a ratio that helps determine whether there is a problem. Such ratios include the buffer cache hit ratio, the soft-parse ratio, and the latch hit ratio. Do not use these ratios as definitive identifiers of whether a performance bottleneck exists. Rather, use them as indicators(指標). To identify whether a bottleneck exists, examine other related evidence. See "Calculating the Buffer Cache Hit Ratio".
-
Wait events with timed statistics
Setting TIMED_STATISTICS to true at the instance level directs the database to gather wait time for events, in addition to available wait counts. This data is useful for comparing the total wait time for an event to the total elapsed time between the data collections. For example, if the wait event accounts for only 30 seconds out of a 2-hour period, then little is to be gained by investigating this event, although it may be the highest ranked wait event when ordered by time waited. However, if the event accounts for 30 minutes of a 45-minute period, then the event is worth investigating. See "Wait Events".
Note:
Timed statistics are automatically collected for the database if the initialization parameter STATISTICS_LEVEL is set to TYPICAL or ALL. If STATISTICS_LEVEL is set to BASIC, then you must set TIMED_STATISTICS to TRUE to enable collection of timed statistics. Note that setting STATISTICS_LEVEL to BASIC disables many automatic features and is not recommended. SQL> show parameter statistics;
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
optimizer_use_pending_statistics boolean FALSE
statistics_level string TYPICAL
timed_os_statistics integer 0
timed_statistics boolean TRUEIf you explicitly set DB_CACHE_ADVICE, TIMED_STATISTICS, or TIMED_OS_STATISTICS, either in the initialization parameter file or by using ALTER_SYSTEM or ALTER SESSION, then the explicitly set value overrides(覆蓋) the value derived from STATISTICS_LEVEL.
-
Comparing Oracle Database statistics with other factors
When looking at statistics, it is important to consider other factors that influence whether the statistic is of value. Such factors include the user load and the hardware capability. Even an event that had a wait of 30 minutes in a 45-minute period might not be indicative of a problem if you discover that there were 2000 users on the system, and the host hardware was a 64-node computer.
-
Wait events without timed statistics
If TIMED_STATISTICS is false, then the amount of time waited for an event is not available. Therefore, it is only possible to order wait events by the number of times each event was waited for. Although the events with the largest number of waits might indicate the potential bottleneck, they might not be the main bottleneck. This can happen when an event is waited for a large number of times, but the total time waited for that event is small. The converse is also true: an event with fewer waits might be a problem if the wait time is a significant proportion of the total wait time. Without having the wait times to use for comparison, it is difficult to determine whether a wait event is really of interest.
-
Idle wait events
Oracle Database uses some wait events to indicate if the Oracle server process is idle. Typically, these events are of no value when investigating performance problems, and they should be ignored when examining the wait events. See "Idle Wait Events".
-
Computed statistics
When interpreting computed statistics (such as rates, statistics normalized over transactions, or ratios), it is important to cross-verify the computed statistic with the actual statistic counts. This confirms whether the derived rates are really of interest: small statistic counts usually can discount an unusual ratio. For example, on initial examination, a soft-parse ratio of 50% generally indicates a potential tuning area. If, however, there was only one hard parse and one soft parse during the data collection interval, then the soft-parse ratio would be 50%, even though the statistic counts show this is not an area of concern. In this case, the ratio is not of interest due to the low raw statistic counts.
See Also:
-
"Setting the Level of Statistics Collection" to learn about the STATISTICS_LEVEL settings
-
Oracle Database Reference for information about the STATISTICS_LEVEL initialization parameter
-
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/24867586/viewspace-716309/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- SciTech-Mathematics-Probability+Statistics-7 Key Statistics Concepts
- SciTech-Mathmatics-Probability+Statistics-VI-Statistics:Quantifing Uncertainty + Regression Analysis)AI
- Understanding System Statistics(zt)
- Statistics and Data Analysis for BioinformaticsORM
- SciTech-Statistics-英語授課:Business Statistics商務統計
- The database owner SID recorded in the master database differs from the database owner SID recorded in database 'DB_NAME'DatabaseAST
- MySQL中的Statistics等待MySql
- Oracle Database Cloud - Database as a Service Quick StartOracleDatabaseCloudUI
- Error querying database. XXXXXXXXXXXXX, No database selected。ErrorDatabase
- Convert a Physical Standby Database into a Snapshot Standby DatabaseDatabase
- Database TimeoutDatabase
- Database OverallDatabase
- database no shardingDatabase
- SciTech-Mathmatics-Probability+Statistics-VIII-Statistics:Quantifing Uncertainty+ANOCOVA(ANalysis of COVAriance)協方差分析原理AI
- Oracle 12C Statistics on Column GroupsOracle
- MATH38161 Multivariate Statistics and Machine LearningMac
- Oracle 12.2 使用Database Link優化Standby Database WorkloadOracleDatabase優化
- ORACLE database vaultOracleDatabase
- Relationship Database DesignDatabase
- 3.4 Quiescing a DatabaseUIDatabase
- idea--DatabaseIdeaDatabase
- Oracle clone databaseOracleDatabase
- database的connectDatabase
- IBM SPSS Statistics 26中文啟用資源+IBM SPSS Statistics 26補丁安裝教程IBMSPSS
- Password is required when adding a database to AG group if the database has a master keyUIDatabaseAST
- ORA-16649: possible failover to another database prevents this database from beiAIDatabase
- ORA-20005:object statistics are locked (stattype = ALL)Object
- SciTech-Mathmatics-Probability+Statistics: Distribution : The Uniform DistributionORM
- SciTech-Mathmatics-Probability+Statistics-Population:Region-
- 抓包整理外篇——————autoResponder、composer 、statistics [ 三]
- Guide to Database as a Service (DBaaS)GUIIDEDatabase
- Oracle Database Scheduler整理OracleDatabase
- 3.4.1 About Quiescing a DatabaseUIDatabase
- 3.3 Shutting Down a DatabaseDatabase
- 3.2.2 Opening a Closed DatabaseDatabase
- 3.2.1 Mounting a Database to an InstanceDatabase
- 4.5.1.2 srvctl add databaseDatabase
- Laravel workflow with database and roleLaravelDatabase
- Oracle Physical Database LimitsOracleDatabaseMIT