- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Oracle 10G - ATO
Operating System - HP-UX
1752796
Members
5835
Online
108789
Solutions
Forums
Categories
Company
Local Language
юдл
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
юдл
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-04-2004 07:26 PM
тАО10-04-2004 07:26 PM
Oracle 10G - ATO
In Oracle 10g, the Automatic statistics collection maintains statistics up to date?
DBA doesn't have to gather schema statistics any more?
DBA doesn't have to gather schema statistics any more?
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-05-2004 03:15 PM
тАО10-05-2004 03:15 PM
Re: Oracle 10G - ATO
Hi ericfjchen,
Prior to Oracle 10g , one had to enable DBMS_STATS to automatically gather statistics for a table by specifying the MONITORING keyword in the CREATE (or ALTER) TABLE statement.
In Oracle 10g, the MONITORING and NOMONITORING keywords have been deprecated. If you do specify these keywords, they are ignored.
In 10g, table-monitoring feature is controlled by the STATISTICS_LEVEL parameter.
When STATISTICS_LEVEL is set to BASIC, monitoring is disabled on the table. When STATISTICS_LEVEL is set to TYPICAL, then monitoring is enabled.
By default STATISTICS_LEVEL is set to Typical, that is monitoring of tables is enabled. It is strongly recommended to set STATISTICS_LEVEL to Typical in 10g.
By setting this parameter to BASIC, you will be disabling most of the manageability features in 10g.
ie ASH (Active Session History)
AWR (Automatic Workload Repository)
ASSM (Automatic Shared Memory Management)
ADDM (Automatic Database Diagnostic Monitor)
Are all turned off!
Monitoring tracks the approximate number of INSERT, UPDATE, and DELETE operations for the table since the last time statistics were gathered. Information about how many rows are affected is maintained in the SGA, until periodically (about every 15 minutes) SMON flush the data into the data dictionary.
This data dictionary information is made visible through the tables
DBA_TAB_MODIFICATIONS,ALL_TAB_MODIFICATIONS, or USER_TAB_MODIFICATIONS
views.
Oracle uses these views to identify tables with stale statistics. Whenever there is 10% change in data in a table, Oracle considers its statistics to be stale.
Since in 10g CBO is used, having up to date statistics is so important to generate good execution plans. Automatic statistics collection job using DBMS_STATS package depends on the monitoring data to determine when to collect statistics on objects with stale objects.
Indira A
Prior to Oracle 10g , one had to enable DBMS_STATS to automatically gather statistics for a table by specifying the MONITORING keyword in the CREATE (or ALTER) TABLE statement.
In Oracle 10g, the MONITORING and NOMONITORING keywords have been deprecated. If you do specify these keywords, they are ignored.
In 10g, table-monitoring feature is controlled by the STATISTICS_LEVEL parameter.
When STATISTICS_LEVEL is set to BASIC, monitoring is disabled on the table. When STATISTICS_LEVEL is set to TYPICAL, then monitoring is enabled.
By default STATISTICS_LEVEL is set to Typical, that is monitoring of tables is enabled. It is strongly recommended to set STATISTICS_LEVEL to Typical in 10g.
By setting this parameter to BASIC, you will be disabling most of the manageability features in 10g.
ie ASH (Active Session History)
AWR (Automatic Workload Repository)
ASSM (Automatic Shared Memory Management)
ADDM (Automatic Database Diagnostic Monitor)
Are all turned off!
Monitoring tracks the approximate number of INSERT, UPDATE, and DELETE operations for the table since the last time statistics were gathered. Information about how many rows are affected is maintained in the SGA, until periodically (about every 15 minutes) SMON flush the data into the data dictionary.
This data dictionary information is made visible through the tables
DBA_TAB_MODIFICATIONS,ALL_TAB_MODIFICATIONS, or USER_TAB_MODIFICATIONS
views.
Oracle uses these views to identify tables with stale statistics. Whenever there is 10% change in data in a table, Oracle considers its statistics to be stale.
Since in 10g CBO is used, having up to date statistics is so important to generate good execution plans. Automatic statistics collection job using DBMS_STATS package depends on the monitoring data to determine when to collect statistics on objects with stale objects.
Indira A
Never give up, Keep Trying
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-05-2004 04:39 PM
тАО10-05-2004 04:39 PM
Re: Oracle 10G - ATO
hi,
with Oracle 10g, your statistics no longer depend on chance!
With Oracle 10g, the Rules-Based Optimizer (RBO) is finally desupported (not deprecated).
Because the CBO depends on accurate (or reasonably accurate) statistics to produce optimal execution paths, DBAs need to ensure that statistics are gathered regularly, creating yet another enforcement checklist. Prior to 10g, this process could be futile for various reasons. This difficulty gave rise to the theory that the CBO has a "mind of its own"├в which implies behavior such as changing execution paths at will!
With 10g we no longer have to worry about these! Statistics can now be collected automatically. In Oracle9i, you could check if the data in a table had changed significantly by turning on the table monitoring option (ALTER TABLE ... MONITORING) and then checking the view DBA_TAB_MODIFICATIONS for those tables.
In 10g, the MONITORING statement is gone. Instead, statistics are collected automatically if the initialization parameter STATISTIC_LEVEL is set to TYPICAL or ALL. (The default value is TYPICAL, so automatic statistics gathering is enabled out of the box.) Oracle Database 10g has a predefined Scheduler job named GATHER_STATS_JOB, which is activated with the appropriate value of the STATISTIC_LEVEL parameter.
hope this helps too!
regards
Yogee
with Oracle 10g, your statistics no longer depend on chance!
With Oracle 10g, the Rules-Based Optimizer (RBO) is finally desupported (not deprecated).
Because the CBO depends on accurate (or reasonably accurate) statistics to produce optimal execution paths, DBAs need to ensure that statistics are gathered regularly, creating yet another enforcement checklist. Prior to 10g, this process could be futile for various reasons. This difficulty gave rise to the theory that the CBO has a "mind of its own"├в which implies behavior such as changing execution paths at will!
With 10g we no longer have to worry about these! Statistics can now be collected automatically. In Oracle9i, you could check if the data in a table had changed significantly by turning on the table monitoring option (ALTER TABLE ... MONITORING) and then checking the view DBA_TAB_MODIFICATIONS for those tables.
In 10g, the MONITORING statement is gone. Instead, statistics are collected automatically if the initialization parameter STATISTIC_LEVEL is set to TYPICAL or ALL. (The default value is TYPICAL, so automatic statistics gathering is enabled out of the box.) Oracle Database 10g has a predefined Scheduler job named GATHER_STATS_JOB, which is activated with the appropriate value of the STATISTIC_LEVEL parameter.
hope this helps too!
regards
Yogee
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-05-2004 04:43 PM
тАО10-05-2004 04:43 PM
Re: Oracle 10G - ATO
hi again,
You should also remember that the collection of statistics is fairly resource-intensive, so you may want to ensure it doesn't affect regular operation of the database.
In 10g, you can do so automatically: a special resource consumer group named AUTO_TASK_CONSUMER_GROUP is available predefined for automatically executed tasks such as gathering of statistics. This consumer group makes sure that the priority of these stats collection jobs is below that of the default consumer group, and hence that the risk of automatic tasks taking over the machine is reduced or eliminated.
What if you want to set the parameter STATISTIC_LEVEL to TYPICAL but don't want to make the statistics collection automatic? Simple. Just disable the Scheduler job by issuing the following:
BEGIN
DBMS_SCHEDULER.DISABLE('GATHER_STATS_JOB');
END;
And why would you want to do that?
Because:
a. Although most of the table's rows changed the distribution may not have changed, which is common in data warehouses. In this case you don't want to collect statistics again, but just want to reuse the old statistics.
b. You are using partition exchange to refresh a materialized view (MV) and don't want to collect statistics on the MV, as the statistics on the exchanged table will be imported as well. However, you could also exclude certain tables from the automatic stats collection job, eliminating the need to disable the entire job.
regards
Yogeeraj
You should also remember that the collection of statistics is fairly resource-intensive, so you may want to ensure it doesn't affect regular operation of the database.
In 10g, you can do so automatically: a special resource consumer group named AUTO_TASK_CONSUMER_GROUP is available predefined for automatically executed tasks such as gathering of statistics. This consumer group makes sure that the priority of these stats collection jobs is below that of the default consumer group, and hence that the risk of automatic tasks taking over the machine is reduced or eliminated.
What if you want to set the parameter STATISTIC_LEVEL to TYPICAL but don't want to make the statistics collection automatic? Simple. Just disable the Scheduler job by issuing the following:
BEGIN
DBMS_SCHEDULER.DISABLE('GATHER_STATS_JOB');
END;
And why would you want to do that?
Because:
a. Although most of the table's rows changed the distribution may not have changed, which is common in data warehouses. In this case you don't want to collect statistics again, but just want to reuse the old statistics.
b. You are using partition exchange to refresh a materialized view (MV) and don't want to collect statistics on the MV, as the statistics on the exchanged table will be imported as well. However, you could also exclude certain tables from the automatic stats collection job, eliminating the need to disable the entire job.
regards
Yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP