This article purpose is to record some daily oracle table statisics management procedure usage and some tips for while manage table statistics. Not big deal, if you're familiar with this, pass it.
GATHER_INDEX_STATS Procedure
This procedure gathers index statistics. It attempts to parallelize as much of the work as possible. Restrictions are described in the individual parameters. This operation will not parallelize with certain types of indexes, including cluster indexes, domain indexes, and bitmap join indexes. The granularity
and no_invalidate
arguments are not relevant to these types of indexes.
DBMS_STATS.GATHER_INDEX_STATS (
ownname VARCHAR2,
indname VARCHAR2,
partname VARCHAR2 DEFAULT NULL,
estimate_percent NUMBER DEFAULT to_estimate_percent_type
(GET_PARAM('ESTIMATE_PERCENT')),
stattab VARCHAR2 DEFAULT NULL,
statid VARCHAR2 DEFAULT NULL,
statown VARCHAR2 DEFAULT NULL,
degree NUMBER DEFAULT to_degree_type(get_param('DEGREE')),
granularity VARCHAR2 DEFAULT GET_PARAM('GRANULARITY'),
no_invalidate BOOLEAN DEFAULT to_no_invalidate_type
(GET_PARAM('NO_INVALIDATE')),
force BOOLEAN DEFAULT FALSE);
Table 142-42 GATHER_INDEX_STATS Procedure Parameters
|
Schema of index to analyze |
|
Name of index |
|
Name of partition |
|
Percentage of rows to estimate ( |
|
User statistics table identifier describing where to save the current statistics |
|
Identifier (optional) to associate with these statistics within |
|
Schema containing |
|
Degree of parallelism. The default for |
|
Granularity of statistics to collect (only pertinent if the table is partitioned).
'
|
|
Does not invalidate the dependent cursors if set to |
|
Gather statistics on object even if it is locked |
To invoke this procedure you must be owner of the table, or you need the ANALYZE
ANY
privilege. For objects owned by SYS
, you need to be either the owner of the table, or you need the ANALYZE
ANY
DICTIONARY
privilege or the SYSDBA
privilege.
GATHER_SCHEMA_STATS Procedures
This procedure gathers statistics for all objects in a schema.
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,
obj_filter_list ObjectTab DEFAULT NULL);
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,
obj_filter_list ObjectTab DEFAULT NULL);
Table 142-43 GATHER_SCHEMA_STATS Procedure Parameters
|
Schema to analyze ( |
|
Percentage of rows to estimate ( |
|
Whether or not to use random block sampling instead of random row sampling. Random block sampling is more efficient, but if the data is not randomly distributed on disk, then the sample values may be somewhat correlated. Only pertinent when doing an estimate statistics. |
|
Accepts:
- integer : Number of histogram buckets. Must be in the range [1,254].- REPEAT : Collects histograms only on the columns that already have histograms- AUTO : Oracle determines the columns on which to collect histograms based on data distribution and the workload of the columns.- SKEWONLY : Oracle determines the columns on which to collect histograms based on the data distribution of the columns.
The default is |
|
Degree of parallelism. The default for |
|
Granularity of statistics to collect (only pertinent if the table is partitioned).
'
|
|
Gather statistics on the indexes as well. Using this option is equivalent to running the GATHER_INDEX_STATS Procedure on each of the indexes in the schema in addition to gathering table and column statistics. Use the constant |
|
User statistics table identifier describing where to save the current statistics |
|
Identifier (optional) to associate with these statistics within |
|
Further specification of which objects to gather statistics for:
|
|
List of objects found to be stale or empty |
|
Schema containing |
|
Does not invalidate the dependent cursors if set to |
|
Gather statistics on objects even if they are locked |
|
A list of object filters. When provided, |
To invoke this procedure you must be owner of the table, or you need the ANALYZE
ANY
privilege. For objects owned by SYS
, you need to be either the owner of the table, or you need the ANALYZE
ANY
DICTIONARY
privilege or the SYSDBA
privilege.
When you use a specific value for the sampling percentage, DBMS_STATS
honors it except for when:
-
The result is less than 2500 rows (too small a sample) and
-
The specified percentage is more than the certain percentage.
Applying an Object Filter List
The following example specifies that any table with a "T
" prefix in the SAMPLE
schema and any table in the SYS
schema, if stale, will have statistics gathered upon it.
DECLARE
filter_lst DBMS_STATS.OBJECTTAB := DBMS_STATS.OBJECTTAB();
BEGIN
filter_lst.extend(2);
filter_lst(1).ownname := 'SH';
filter_lst(1).objname := 'SALES';
filter_lst(2).ownname := 'SH';
filter_lst(2).objname := 'COSTS';
DBMS_STATS.GATHER_SCHEMA_STATS(ownname=>'SH',obj_filter_list=>filter_lst);
END;
GATHER_TABLE_STATS Procedure
This procedure gathers table and column (and index) statistics. It attempts to parallelize as much of the work as possible, but there are some restrictions as described in the individual parameters.
DBMS_STATS.GATHER_TABLE_STATS (
ownname VARCHAR2,
tabname VARCHAR2,
partname VARCHAR2 DEFAULT NULL,
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,
statown VARCHAR2 DEFAULT NULL,
no_invalidate BOOLEAN DEFAULT to_no_invalidate_type (
get_param('NO_INVALIDATE')),
stattype VARCHAR2 DEFAULT 'DATA',
force BOOLEAN DEFAULT FALSE);
Table 142-45 GATHER_TABLE_STATS Procedure Parameters
|
Schema of table to analyze |
|
Name of table |
|
Name of partition |
|
Percentage of rows to estimate ( |
|
Whether or not to use random block sampling instead of random row sampling. Random block sampling is more efficient, but if the data is not randomly distributed on disk, then the sample values may be somewhat correlated. Only pertinent when doing an estimate statistics. |
|
Accepts either of the following options, or both in combination:
- integer : Number of histogram buckets. Must be in the range [1,254].- REPEAT : Collects histograms only on the columns that already have histograms- AUTO : Oracle determines the columns on which to collect histograms based on data distribution and the workload of the columns.- SKEWONLY : Oracle determines the columns on which to collect histograms based on the data distribution of the columns.- column_name : Name of a column- extension : can be either a column group in the format of (column_name , Colume_name [, ...]) or an expression
The default is |
|
Degree of parallelism. The default for |
|
Granularity of statistics to collect (only pertinent if the table is partitioned).
'
|
|
Gathers statistics on the indexes for this table. Using this option is equivalent to running the GATHER_INDEX_STATS Procedure on each of the table's indexes. Use the constant |
|
User statistics table identifier describing where to save the current statistics |
|
Identifier (optional) to associate with these statistics within |
|
Schema containing |
|
Does not invalidate the dependent cursors if set to |
|
Statistics type. The only value allowed is |
|
Gather statistics of table even if it is locked |
To invoke this procedure you must be owner of the table, or you need the ANALYZE
ANY
privilege. For objects owned by SYS
, you need to be either the owner of the table, or you need the ANALYZE
ANY
DICTIONARY
privilege or the SYSDBA
privilege.
Index statistics collection can be parellelized except for cluster, domain and join indexes.
SET_INDEX_STATS Procedures
These procedures set index-related information. In the version of this procedure that deals with user-defined statistics, the statistics type specified is the type to store in the dictionary, in addition to the actual user-defined statistics. If this statistics type is NULL, the statistics type associated with the index or column is stored.
DBMS_STATS.SET_INDEX_STATS (
ownname VARCHAR2,
indname VARCHAR2,
partname VARCHAR2 DEFAULT NULL,
stattab VARCHAR2 DEFAULT NULL,
statid VARCHAR2 DEFAULT NULL,
numrows NUMBER DEFAULT NULL,
numlblks NUMBER DEFAULT NULL,
numdist NUMBER DEFAULT NULL,
avglblk NUMBER DEFAULT NULL,
avgdblk NUMBER DEFAULT NULL,
clstfct NUMBER DEFAULT NULL,
indlevel NUMBER DEFAULT NULL,
flags NUMBER DEFAULT NULL,
statown VARCHAR2 DEFAULT NULL,
no_invalidate BOOLEAN DEFAULT to_no_invalidate_type(
get_param('NO_INVALIDATE')),
guessq NUMBER DEFAULT NULL,
cachedblk NUMBER DEFAULT NULL,
cachehit NUMBER DEFUALT NULL,
force BOOLEAN DEFAULT FALSE);
Use the following for user-defined statistics:
DBMS_STATS.SET_INDEX_STATS (
ownname VARCHAR2,
indname VARCHAR2,
partname VARCHAR2 DEFAULT NULL,
stattab VARCHAR2 DEFAULT NULL,
statid VARCHAR2 DEFAULT NULL,
ext_stats RAW,
stattypown VARCHAR2 DEFAULT NULL,
stattypname VARCHAR2 DEFAULT NULL,
statown VARCHAR2 DEFAULT NULL,
no_invalidate BOOLEAN DEFAULT to_no_invalidate_type(
get_param('NO_INVALIDATE')),
cachedblk NUMBER DEFAULT NULL,
cachehit NUMBER DEFUALT NULL,
force BOOLEAN DEFAULT FALSE);
Table 142-90 SET_INDEX_STATS Procedure Parameters
|
Name of the schema |
|
Name of the index |
|
Name of the index partition in which to store the statistics. If the index is partitioned and if |
|
User statistics table identifier describing where to store the statistics. If |
|
Identifier (optional) to associate with these statistics within |
|
User-defined statistics |
|
Schema of the statistics type |
|
Name of the statistics type |
|
Number of rows in the index (partition) |
|
Number of leaf blocks in the index (partition) |
|
Number of distinct keys in the index (partition) |
|
Average integral number of leaf blocks in which each distinct key appears for this index (partition). If not provided, then this value is derived from |
|
Average integral number of data blocks in the table pointed to by a distinct key for this index (partition). If not provided, then this value is derived from |
|
See |
|
Height of the index (partition) |
|
For internal Oracle use (should be left as |
|
Schema containing |
|
Does not invalidate the dependent cursors if set to |
|
Guess quality. See the |
|
The average number of blocks in the buffer cache for the segment (index/table/index partition/table partition) |
|
The average cache hit ratio for the segment (index/table/index partition/table partition) |
|
Sets the values even if statistics of the index are locked |
-
To invoke this procedure you must be owner of the table, or you need the
ANALYZE
ANY
privilege. For objects owned bySYS
, you need to be either the owner of the table, or you need theANALYZE
ANY
DICTIONARY
privilege or theSYSDBA
privilege. -
The Optimizer uses the cached data to estimate number of cached blocks for index or statistics table access. The total cost of the operation will be combined from the I/O cost of reading not cached blocks from disk, the CPU cost of getting cached blocks from the buffer cache, and the CPU cost of processing the data.
-
Oracle maintains
cachedblk
andcachehit
at all times but uses correspondent caching statistics for optimization as part of the table and index statistics only when the user callsDBMS_STATS.GATHER_[TABLE/INDEX/SCHEMA/DATABASE]_STATS
procedure for auto mode orDBMS_STATS.GATHER_SYSTEM_STATS
for manual mode. In order to prevent the user from utilizing inaccurate and unreliable data, the optimizer will compute a 'confidence factor' for eachcachehit
and acachedblk
for each object. If the 'confidence factor' for the value meets confidence criteria, this value will be used, otherwise the defaults will be used. -
The automatic maintenance algorithm for object caching statistics assumes that there is only one major workload for the system and adjusts statistics to this workload, ignoring other "minor" workloads. If this is not the case, you must use manual mode for maintaining object caching statistics.
-
The object caching statistics maintenance algorithm for auto mode prevents you from using statistics in the following situations
-
When not enough data has been analyzed, such as when an object has been recently create
-
When the system does not have one major workload resulting in averages not corresponding to real values.
-
ORA-20000
: Object does not exist or insufficient privileges
ORA-20001
: Invalid input value
ORA-20005
: Object statistics are locked
SET_TABLE_STATS Procedure
This procedure sets table-related information.
DBMS_STATS.SET_TABLE_STATS (
ownname VARCHAR2,
tabname VARCHAR2,
partname VARCHAR2 DEFAULT NULL,
stattab VARCHAR2 DEFAULT NULL,
statid VARCHAR2 DEFAULT NULL,
numrows NUMBER DEFAULT NULL,
numblks NUMBER DEFAULT NULL,
avgrlen NUMBER DEFAULT NULL,
flags NUMBER DEFAULT NULL,
statown VARCHAR2 DEFAULT NULL,
no_invalidate BOOLEAN DEFAULT to_no_invalidate_type (
get_param('NO_INVALIDATE')),
cachedblk NUMBER DEFAULT NULL,
cachehit NUMBER DEFUALT NULL,
force BOOLEAN DEFAULT FALSE);
Table 142-95 SET_TABLE_STATS Procedure Parameters
|
Name of the schema |
|
Name of the table |
|
Name of the table partition in which to store the statistics. If the table is partitioned and |
|
User statistics table identifier describing where to store the statistics. If |
|
Identifier (optional) to associate with these statistics within |
|
Number of rows in the table (partition) |
|
Number of blocks the table (partition) occupies |
|
Average row length for the table (partition) |
|
For internal Oracle use (should be left as |
|
Schema containing |
|
Does not invalidate the dependent cursors if set to |
|
The average number of blocks in the buffer cache for the segment (index/table/index partition/table partition) |
|
The average cache hit ratio for the segment (index/table/index partition/table partition) |
|
Sets the values even if statistics of the table are locked |
-
To invoke this procedure you must be owner of the table, or you need the
ANALYZE
ANY
privilege. For objects owned bySYS
, you need to be either the owner of the table, or you need theANALYZE
ANY
DICTIONARY
privilege or theSYSDBA
privilege. -
The Optimizer uses the cached data to estimate number of cached blocks for index or statistics table access. The total cost of the operation will be combined from the I/O cost of reading not cached blocks from disk, the CPU cost of getting cached blocks from the buffer cache, and the CPU cost of processing the data.
-
Oracle maintains
cachedblk
andcachehit
at all times but uses correspondent caching statistics for optimization as part of the table and index statistics only when the user callsDBMS_STATS.GATHER_[TABLE/INDEX/SCHEMA/DATABASE]_STATS
procedure for auto mode orDBMS_STATS.GATHER_SYSTEM_STATS
for manual mode. In order to prevent the user from utilizing inaccurate and unreliable data, the optimizer will compute a 'confidence factor' for eachcachehit
and acachedblk
for each object. If the 'confidence factor' for the value meets confidence criteria, this value will be used, otherwise the defaults will be used. -
The automatic maintenance algorithm for object caching statistics assumes that there is only one major workload for the system and adjusts statistics to this workload, ignoring other "minor" workloads. If this is not the case, you must use manual mode for maintaining object caching statistics.
-
The object caching statistics maintenance algorithm for auto mode prevents you from using statistics in the following situations
-
When not enough data has been analyzed, such as when an object has been recently create
-
When the system does not have one major workload resulting in averages not corresponding to real values.
-
ORA-20000
: Object does not exist or insufficient privileges
ORA-20001
: Invalid input value
ORA-20005
: Object statistics are locked
LOCK_TABLE_STATS Procedure
This procedure locks the statistics on the table.
-
To invoke this procedure you must be owner of the table, or you need the
ANALYZE
ANY
privilege. For objects owned bySYS
, you need to be either the owner of the table, or you need theANALYZE
ANY
DICTIONARY
privilege or theSYSDBA
privilege. -
When statistics on a table are locked, all the statistics depending on the table, including table statistics, column statistics, histograms and statistics on all dependent indexes, are considered to be locked.
-
The
SET_*,
DELETE_*,
IMPORT_*,
GATHER_*
procedures that modify statistics in the dictionary of an individual table, index or column will raise an error if statistics of the object is locked. -
Procedures that operates on multiple objects (such as
GATHER_SCHEMA_STATS
) will skip modifying the statistics of an object if it is locked. Many procedures have force argument to override the lock. -
This procedure either freezes the current set of the statistics or keeps the statistics empty (uncollected) to use Dynamic Sampling.
-
The locked or unlocked state is not exported along with the table statistics when using
EXPORT_*_STATS
procedures.
UNLOCK_TABLE_STATS Procedure
This procedure unlocks the statistics on the table.
-
To invoke this procedure you must be owner of the table, or you need the
ANALYZE
ANY
privilege. For objects owned bySYS
, you need to be either the owner of the table, or you need theANALYZE
ANY
DICTIONARY
privilege or theSYSDBA
privilege. -
When statistics on a table is locked, all the statistics depending on the table, including table statistics, column statistics, histograms and statistics on all dependent indexes, are considered to be locked.
-
The
SET_*,
DELETE_*,
IMPORT_*,
GATHER_*
procedures that modify statistics in the dictionary of an individual table, index or column will raise an error if statistics of the object is locked. -
Procedures that operates on multiple objects (such as
GATHER_SCHEMA_STATS
) will skip modifying the statistics of an object if it is locked. Many procedures have force argument to override the lock.
How to export and import table statistics between two databases.
Unlock the stats on the customer table
exec dbms_stats.unlock_table_stats(ownname => scott, tabname => 'CUSTOMER');
Oracle will gather stats via the overnight or weekend job window
create table for Exports of customer table stats
execute dbms_stats.create_stat_table(ownname= 'scott', stattab= 'backup_stats_uat');
Import the stats from the customer table and indexes
exec dbms_stats.import_table_stats(ownname=>'scott', tabname=>'customer', statown=>'scott', stattab=>'backup_stats_uat', cascade=>true);
Use datapump to export the table
expdp system tables=scott.backup_stats_uat directory=oraexp dumpfile=backup_stats_uat.dmp logfile=backup_stats_uat.log
Transfer the file to the production system
unlock stats on table scott.customer
exec dbms_stats.unlock_table_stats(ownname => scott, tabname => 'customer')
Import the table backup_stats_uat using the backup_stats_uat.dmp
impdp system tables=scott.backup_stats_uat directory=data_pump_dir dumpfile=backup_stats_uat.dmp logfile=imp_backup_stats_uat.log
Once table is imported /import the table and index stats
exec dbms_stats.export_table_stats(ownname=>'scott', tabname=>'customer', stattab=>'backup_stats_uat', cascade=>true, statown=>'scott');
drop the backup_stats_uat table
execute dbms_stats.drop_stat_table(ownname= 'npp', stattab= 'backup_stats_uat');
If you need to regress the stats
exec dbms_stats.restore_table_stats ('scott','customer',sysdate-1);
– drop statistics table
SQL> execute dbms_stats.drop_stat_table(ownname= 'scott', stattab= 'backup_stats');
Tips:
Once lock index statistics, even rebuild index by rebuild clause ,wouldn't make the statistics invalid.
Truncate table partition wouldn't make golbal index statistics and local index statistics invalid.
参考至:http://docs.oracle.com/cd/E11882_01/appdev.112/e40758/d_stats.htm#ARPLS68567
http://www.dba-oracle.com/t_export_import_cbo_optimizer_statistics_dbms_stats.htm
http://mdesouza.wordpress.com/2011/08/04/export-import-table-stats-from-uat-system-into-production/
本文原创,转载请注明出处、作者
如有错误,欢迎指正
邮箱:czmcj@163.com
相关推荐
标题“Oracle SQL Table name”指出了文档主要讨论的是Oracle数据库中SQL(Structured Query Language)语句所使用的表名。SQL是用于数据库管理和操作的标准语言,能够完成数据查询、更新、插入和删除等操作。 描述...
根据提供的文件信息,我们可以深入探讨Oracle Daily Business Intelligence (DBI) 的关键概念、应用场景以及它在企业中的价值。 ### Oracle Daily Business Intelligence 概述 Oracle Daily Business Intelligence...
Oracle HR Intelligence Daily Business Intelligence for HRMS Implementation Guide 是一本专为Oracle人力资源管理系统(HRMS)设计的指南,专注于在11i版本中实现每日业务智能。该文档由Oracle公司出版,版权日期...
Oracle HR Intelligence Daily Business Intelligence for HRMS User Guide 是一本专为使用Oracle人力资源管理系统(HRMS)的用户设计的指南,适用于11i版本。该指南详细介绍了如何利用Oracle HR Intelligence进行...
Oracle Scheduler还支持高级功能,如作业链(job chains)、资源管理(resource management)、异步执行等,以适应复杂的工作流需求。 7. **安全性** 可以通过角色和权限来控制哪些用户或角色可以创建、修改或...
### Oracle 查询相邻上下行值 #### 背景与需求 在处理时间序列数据或具有某种排序的数据时,经常需要查询某一行记录与其相邻行(前一行或后一行)的数据。这种需求在财务分析、时间序列分析等领域非常常见。例如,...
- **Modern Tool for Daily Tasks:** With the evolution of technology, SQL Developer provides a modern toolset for assisting developers in their daily tasks. **3. Multi-Database Support** - **Support...
Oracle Job是Oracle数据库中的一个强大特性,主要用于在特定时间或间隔执行数据库操作,例如数据备份、维护任务或者定期的数据处理。以下是对Oracle Job使用方法和技巧的详细说明: 一、创建Oracle Job Oracle Job...
schtasks /create /tn "Oracle Backup" /tr "C:\path\to\backup_script.bat" /sc daily /st 01:00:00 ``` 这样,你就设置了一个每日的Oracle数据库备份任务。 总的来说,"Oracle数据库备份还原BAT脚本"是一个高效、...
为避免这种情况,可以在导出命令中添加参数`EXCLUDE=TABLE:“空表名”`,或者编写PL/SQL脚本查询并过滤掉空表后再进行导出。另一种方法是在导出前先删除空表,但需谨慎操作,以免影响实际业务。 接下来,我们讨论...
REAL-WORLD SOLUTIONS FOR DBAs ON LINUX AND SOLARISLinux and Solaris Recipes for Oracle DBAs, 2nd Edition is an example–based book on managing Oracle Database under Linux and Solaris. The book is ...
Linux and Solaris Recipes for Oracle DBAs, 2nd Edition is an example–based book on managing Oracle Database under Linux and Solaris. The book is written for database administrators who need to get ...
Oracle Job是Oracle数据库中的一种调度工具,用于在指定的时间执行一系列数据库操作,如PL/SQL块、存储过程、包或操作系统命令。Oracle Job是Oracle的DBMS_SCHEDULER或之前版本中的DBMS_JOB包的一部分,它允许数据库...
cnn-dailymail, 获取 cnn/daily邮件数据集( 非匿名)的代码 这里代码生成 cnn/daily邮件摘要数据集的非匿名版本,如 ACL 2017论文所使用的 指针发生器网络 。 它将数据集处理为代码所期望的二进制格式的二进制格式。...
backup as compressed backupset database tag 'daily_full_backup'; release channel ch1; } ``` ### RMAN恢复 #### 丢失参数文件恢复 初始化参数文件对于启动数据库实例至关重要。如果丢失或误删除了参数文件...
', start_date => SYSTIMESTAMP, repeat_interval => 'FREQ=DAILY', end_date => NULL, comments => 'This is a sample job', job_class => 1, enabled => TRUE, auto_drop => TRUE, store_outlines => FALSE, job_...
Oracle数据库系统是企业级广泛应用的关系型数据库管理系统,其在数据管理、事务处理和高可用性方面表现出色。本文将深入探讨Oracle中的定时执行计划任务,这是数据库管理员(DBA)进行自动化运维的重要工具。 首先...
- 通过监视V$视图(如V$SESSION_WAIT、V$SQL、V$BUFFER_POOL STATISTICS等)来诊断性能瓶颈。 3. **数据库分区**: - 数据库分区是将大表分成较小、更易管理的部分,每个部分称为分区。这可以提高查询性能,简化...
Oracle数据库是世界上最流行的数据库管理系统之一,它提供了丰富的功能来满足各种业务需求。在Oracle中,计划任务(也称为调度程序)是一项重要的管理功能,允许管理员安排数据库操作在特定时间自动执行,例如数据...