Call now: 252-767-6166  
Oracle Training Oracle Support Development Oracle Apps

 
 Home
 E-mail Us
 Oracle Articles
New Oracle Articles


 Oracle Training
 Oracle Tips

 Oracle Forum
 Class Catalog


 Remote DBA
 Oracle Tuning
 Emergency 911
 RAC Support
 Apps Support
 Analysis
 Design
 Implementation
 Oracle Support


 SQL Tuning
 Security

 Oracle UNIX
 Oracle Linux
 Monitoring
 Remote s
upport
 Remote plans
 Remote
services
 Application Server

 Applications
 Oracle Forms
 Oracle Portal
 App Upgrades
 SQL Server
 Oracle Concepts
 Software Support

 Remote S
upport  
 Development  

 Implementation


 Consulting Staff
 Consulting Prices
 Help Wanted!

 


 Oracle Posters
 Oracle Books

 Oracle Scripts
 Ion
 Excel-DB  

Don Burleson Blog 


 

 

 


 

 

 
 

Oracle COPY_TABLE_STATS

Oracle Database Tips by Donald Burleson

Advanced Oracle Utilities: The Definitive Reference by Rampant TechPress is written by top Oracle database experts (Bert Scalzo, Donald Burleson, and Steve Callan).  The following is an excerpt from the book.

Copy_table_stats is a procedure that copies the table, partition or subpartition statistics from source to destination and which can apply a scaling factor in the process.

 

Argument

Type

In / Out

Default Value

OWNNAME

VARCHAR2

IN

 

TABNAME

VARCHAR2

IN

 

SRCPARTNAME

VARCHAR2

IN

 

DSTPARTNAME

VARCHAR2

IN

 

SCALE_FACOTR

VARCHAR2

IN

1

FORCE

BOOLEAN

IN

FALSE

Table 7.70:  Copy_table_stats Parameters

Create_extended_stats is a function that creates a column level statistics entry for either a user specified column, column group, or an expression of columns in a table. It returns the name of this new entry as a VARCHAR2. The extension parameter should be either a column group list or column expression. There are some restrictions on the extensions, such as not on virtual columns, tables owned by SYS, clustered or index organized tables, a column group between 2 and 32 columns,  or # extensions <= MAX (20, 10% of the total non-virtual columns). Furthermore, expressions must contain at least one column and cannot contain a subquery.

 

Argument

Type

In / Out

Default Value

OWNNAME

VARCHAR2

IN

 

TABNAME

VARCHAR2

IN

 

EXTENSION

VARCHAR2

IN

 

Table 7.71:  Create_extended_stats Parameters

Create_stat_table is a procedure that creates in the OWNNAME's schema a table named STATTAB which can be used to hold statistics generated by procedures and functions in the DBMS_STATS package.

 

Argument

Type

In / Out

Default Value

OWNNAME

VARCHAR2

IN

 

STATTAB

VARCHAR2

IN

 

TBLSPACE

VARCHAR2

IN

NULL

Table 7.72:  Create_stat_table Parameters

Delete_column_stats is a procedure that drops column level statistics for the specified column, column group or column expression.

 

Argument

Type

In / Out

Default Value

OWNNAME

VARCHAR2

IN

 

TABNAME

VARCHAR2

IN

 

COLNAME

VARCHAR2

IN

 

PARTNAME

VARCHAR2

IN

NULL

STATTAB

VARCHAR2

IN

NULL

STATID

VARCHAR2

IN

NULL

CASCADE_PARTS

BOOLEAN

IN

TRUE

STATOWN

VARCHAR2

IN

NULL

NO_INVALIDATE

BOOLEAN

IN

AUTO_INVALIDATE

FORCE

BOOLEAN

IN

FALSE

COL_STAT_TYPE

VARCHAR2

IN

'ALL'

Table 7.73:  Delete_column_stats Parameters

Delete_database_prefs is a procedure that deletes statistics preferences. The valid values for the pname parameter are CASCADE, DEGREE, ESTIMATE_PERCENT, METHOD_OPT, NO_INVALIDATE, GRANULARITY, PUBLISH, INCREMENTAL and STALE_PERCENT.

 

Argument

Type

In / Out

Default Value

PNAME

VARCHAR2

IN

 

ADD_SYS

BOOLEAN

IN

FALSE

Table 7.74:  Delete_database_prefs Parameters

Delete_database_stats is a procedure that drops the statistics for all tables in the database.

 

Argument

Type

In / Out

Default Value

STATTAB

VARCHAR2

IN

NULL

STATID

VARCHAR2

IN

NULL

STATOWN

VARCHAR2

IN

NULL

NO_INVALIDATE

BOOLEAN

IN

AUTO_INVALIDATE

FORCE

BOOLEAN

IN

FALSE

Table 7.75:  Delete_database_stats Parameters

Delete_dictionary_stats is a procedure that drops the statistics for all data dictionary tables in the database like those owned by SYS, SYSTEM and other RDBMS component schemas.

 

Argument

Type

In / Out

Default Value

STATTAB

VARCHAR2

IN

NULL

STATID

VARCHAR2

IN

NULL

STATOWN

VARCHAR2

IN

NULL

NO_INVALIDATE

BOOLEAN

IN

AUTO_INVALIDATE

FORCE

BOOLEAN

IN

FALSE

Table 7.76:  Delete_dictionary_stats Parameters

Delete_fixed_object_stats is a procedure that drops the statistics for all SGA memory residents or fixed tables in the database, i.e. the X$ tables.

 

Argument

Type

In / Out

Default Value

STATTAB

VARCHAR2

IN

NULL

STATID

VARCHAR2

IN

NULL

STATOWN

VARCHAR2

IN

NULL

NO_INVALIDATE

BOOLEAN

IN

AUTO_INVALIDATE

FORCE

BOOLEAN

IN

FALSE

Table 7.77:  Delete_fixed_object_stats Parameters

Delete_index_stats is a procedure that drops index level statistics for the specified index.

 

Argument

Type

In / Out

Default Value

OWNNAME

VARCHAR2

IN

 

INDNAME

VARCHAR2

IN

 

PARTNAME

VARCHAR2

IN

NULL

STATTAB

VARCHAR2

IN

NULL

STATID

VARCHAR2

IN

NULL

CASCADE_PARTS

BOOLEAN

IN

TRUE

STATOWN

VARCHAR2

IN

NULL

NO_INVALIDATE

BOOLEAN

IN

AUTO_INVALIDATE

FORCE

BOOLEAN

IN

FALSE

Table 7.78:  Delete_index_stats Parameters

Delete_pending_stats is a procedure that deletes any pending statistics such as those that have been collected but not yet published for the specified table.

 

Argument

Type

In / Out

Default Value

OWNNAME

VARCHAR2

IN

USER

TABNAME

VARCHAR2

IN

 

Table 7.79:  Delete_pending_stats Parameters

Delete_schema_prefs is a procedure that deletes statistics preferences for the schema specified. The valid values for the pname parameter are CASCADE, DEGREE, ESTIMATE_PERCENT, METHOD_OPT, NO_INVALIDATE, GRANULARITY, PUBLISH, INCREMENTAL and STALE_PERCENT.

 

Argument

Type

In / Out

Default Value

OWNNAME

VARCHAR2

IN

 

PNAME

VARCHAR2

IN

 

Table 7.80:  Delete_schema_prefs Parameters

Delete_schema_stats is a procedure that drops statistics for the specified schema.

 

Argument

Type

In / Out

Default Value

OWNNAME

VARCHAR2

IN

 

STATTAB

VARCHAR2

IN

NULL

STATID

VARCHAR2

IN

NULL

STATOWN

VARCHAR2

IN

NULL

NO_INVALIDATE

BOOLEAN

IN

AUTO_INVALIDATE

FORCE

BOOLEAN

IN

FALSE

Table 7.81:  Delete_schema_stats Parameters

Delete_system_stats is a procedure that drops workload statistics. It essentially sets the state back to that of NOWORKLOAD.

 

Argument

Type

In / Out

Default Value

STATTAB

VARCHAR2

IN

NULL

STATID

VARCHAR2

IN

NULL

STATOWN

VARCHAR2

IN

NULL

Table 7.82:  Delete_system_stats Parameters

Advanced Oracle Utilities: The Definitive Reference by Rampant TechPress is written by top Oracle database experts (Bert Scalzo,  Donald Burleson, and Steve Callan). 

Buy direct from the publisher and save 30%!

 

 

��  
 
 
Oracle Training at Sea
 
 
 
 
oracle dba poster
 

 
Follow us on Twitter 
 
Oracle performance tuning software 
 
Oracle Linux poster
 
 
 

 

Burleson is the American Team

Note: This Oracle documentation was created as a support and Oracle training reference for use by our DBA performance tuning consulting professionals.  Feel free to ask questions on our Oracle forum.

Verify experience! Anyone considering using the services of an Oracle support expert should independently investigate their credentials and experience, and not rely on advertisements and self-proclaimed expertise. All legitimate Oracle experts publish their Oracle qualifications.

Errata?  Oracle technology is changing and we strive to update our BC Oracle support information.  If you find an error or have a suggestion for improving our content, we would appreciate your feedback.  Just  e-mail:  

and include the URL for the page.


                    









Burleson Consulting

The Oracle of Database Support

Oracle Performance Tuning

Remote DBA Services


 

Copyright © 1996 -  2020

All rights reserved by Burleson

Oracle ® is the registered trademark of Oracle Corporation.