This procedure gathers statistics for all objects in a schema.
Syntax
DBMS_STATS.GATHER_SCHEMA_STATS (
ownname VARCHAR2,
estimate_percent NUMBER DEFAULT to_estimate_percent_type
(get_param('ESTIMATE_PERCENT')),
block_sample BOOLEAN DEFAULT FALSE,
method_opt VARCHAR2 DEFAULT get_param('METHOD_OPT'),
degree NUMBER DEFAULT to_degree_type(get_param('DEGREE')),
granularity VARCHAR2 DEFAULT GET_PARAM('GRANULARITY'),
cascade BOOLEAN DEFAULT to_cascade_type(get_param('CASCADE')),
stattab VARCHAR2 DEFAULT NULL,
statid VARCHAR2 DEFAULT NULL,
options VARCHAR2 DEFAULT 'GATHER',
objlist OUT ObjectTab,
statown VARCHAR2 DEFAULT NULL,
no_invalidate BOOLEAN DEFAULT to_no_invalidate_type (
get_param('NO_INVALIDATE')),
force BOOLEAN DEFAULT FALSE);
DBMS_STATS.GATHER_SCHEMA_STATS (
ownname VARCHAR2,
estimate_percent NUMBER DEFAULT to_estimate_percent_type
(get_param('ESTIMATE_PERCENT')),
block_sample BOOLEAN DEFAULT FALSE,
method_opt VARCHAR2 DEFAULT get_param('METHOD_OPT'),
degree NUMBER DEFAULT to_degree_type(get_param('DEGREE')),
granularity VARCHAR2 DEFAULT GET_PARAM('GRANULARITY'),
cascade BOOLEAN DEFAULT to_cascade_type(get_param('CASCADE')),
stattab VARCHAR2 DEFAULT NULL,
statid VARCHAR2 DEFAULT NULL,
options VARCHAR2 DEFAULT 'GATHER',
statown VARCHAR2 DEFAULT NULL,
no_invalidate BOOLEAN DEFAULT to_no_invalidate_type (
get_param('NO_INVALIDATE'),
force BOOLEAN DEFAULT FALSE);
Parameters
Usage Notes
DBMS_STATS.GATHER_SCHEMA_STATS
generates differing sampling rates on partitioned tables when you use the auto_sample_size
constant. DBMS_STATS
tries to determine an adequate sample size for each type of statistic,
which is different for each table or column (and each partition, if
partitioned). It starts with a sampling rate to get approximately 5000
rows and examines the result based on statistical equations. This
process is repeated with increased sampling rate for unsatisfactory
results.
In general, the number of distinct values column statistics requires
the highest sampling rate among the others, especially when each
distinct value repeats a small number of times.
When you use a specific value for the sampling percentage, DBMS_STATS
honors it except for when:
Statistics for external tables are not collected by this procedure.
Exceptions
ORA-20000
: Schema does not exist or insufficient privileges.
ORA-20001
: Bad input value.
分享到:
相关推荐
作用:DBMS_STATS.GATHER_TABLE_STATS统计表,列,索引的统计信息. DBMS_STATS.GATHER_TABLE_STATS的语法如下: DBMS_STATS.GATHER_TABLE_STATS ( ownname VARCHAR2, tabname VARCHAR2, partname VARCHAR2, estimate_...
ORACLE数据库使用dbms_stats包手动收集关于表的、索引的统计信息。
Oracle统计分析-dbms_stats.pdf
简单的dbms_stats操作,简单的dbms_stats操作简单的dbms_stats操作
Oracle 18c bug 执行 DBMS_PDB.CHECK_PLUG_COMPATIBILITY报错_ITPUB博客.mhtml
NULL 博文链接:https://duqiangcise.iteye.com/blog/648491
How to Move from ANALYZE (using DBMS_UTILITY) to DBMS_STATS Is ANALYZE on the Data Dictionary Supported (TABLES OWNED BY SYS)?
支持ArcGIS10.2版本的PostgreSQL_DBMS_for_windows_922,ESRI官方原版资源。
dbms_comp_advisor.getratio 预估压缩比例的存储过程脚本 11gR2以前使用,11gR2后可以使用系统自带的存储。
oracle dbms_lob
以下是对Oracle中dbms_metadata.get_ddl的用法进行了详细的分析介绍,需要的朋友参考下
亲测有效 通过此版本可以把oracle时区版本调整到为最新版本,一般配合时区补丁使用 可以参考...脚本里有说明 先运行upg_tzv_check.sql再运行upg_tzv_apply.sql
EXECUTE dbms_logmnr.add_logfile(LogFileName=>'C:\ORACLE\PRODUCT\10.2.0\ORADATA\ABC\REDO03.LOG',Options=>dbms_logmnr.new); 添加其它文件 EXECUTE dbms_logmnr.add_logfile(LogFileName=>'D:\ORACLE\...
oracle dbms_sql的使用方法,非常使用
Oracle SQL执行计划分析器功能的创建3步曲: 1 首先,编译XYG_ALD_SESS_PKG的Package头。 (XYG_ALD_SESS_PKG.sql) 2 接着要建立好下面的4个视图对象。因为XYG_ALD_SESS_PKG包体会用到。(View Create Script v...
使用C语言实现的数据库管理系统。 支持简单类 SQL语言。
dbms_obfuscation_toolkit加密解密数据
一、dbms_job涉及到的知识点 1、创建job: variable jobno number; dbms_job.submit(:jobno, —-job号 'your_procedure;',—-执行的存储过程, ';'不能省略 next_date, —-下次执行时间 'interval' —-每次间隔...