Method for automatically collecting Oracle statistical information

A statistical information and automatic collection technology, applied in computing, database design/maintenance, special data processing applications, etc., can solve problems such as low efficiency, high maintenance costs, inability to automatically identify and define collection granularity, and limit resource consumption. To achieve the effect of improving efficiency

Active Publication Date: 2015-11-18
SHANGHAI SNC NET INFORMATION TECH CO LTD
View PDF2 Cites 23 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

The process of collecting statistical information consumes a lot of system resources, but within this time window, not all business systems are idle, so executing statistics collection jobs during this time period will cause serious resource contention and affect normal business processing
[0012] 2. The default collection strategy is adopted, and the integrity of statistical information collection is uncontrollable
Due to the limited range of the default time window, when there are many database objects, a large amount of data, and a large amount of data change, it may not be possible to complete the statistical information collection operation of the required objects within the specified time period
In this case, the statistical information of database objects may not be updated for a long time, affecting the execution efficiency of SQL statements
The database administrator can manually modify and extend the time window of the job, but the time window of the job may coincide with the subsequent business peak, resulting in resource contention
[0013] 3. The dynamic sampling method of statistical information is used, which leads to performance degradation when frequently accessing an object
It can alleviate the problems caused by the default policy to a certain extent, but there are still limitations, such as: 1. Only specified object statistics can be collected
2. Cannot automatically identify new objects, cannot automatically identify and define collection granularity and limit resource consumption
3. The script needs to be modified frequently according to the change of the object, the maintenance cost is high, and the efficiency is not high

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Method for automatically collecting Oracle statistical information
  • Method for automatically collecting Oracle statistical information

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0032] The present invention will be further described below in conjunction with the accompanying drawings and embodiments.

[0033] figure 1 It is a schematic diagram of the automatic collection process of Oracle statistical information in the present invention.

[0034] See figure 1 , the Oracle statistical information automatic collection method that the present invention provides, comprises the steps:

[0035] a) Design the database table as a partition table, and divide it into different statistical collection types according to business characteristics;

[0036] b) The operating system regularly schedules the database storage process, and enters the database table owner, table name or partition name to collect statistical information at different granularities;

[0037] c) According to the input database table owner, table name or partition name, the database storage process searches for the corresponding statistical collection type and completes the statistical infor...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The present invention discloses a method for automatically collecting Oracle statistical information, comprising the following steps: (a) designing a database table into a partition table, and dividing the partition table into different statistical collection types according to a service feature; (b) periodically scheduling, by an operating system, a database storage procedure, and an input database table owner, a table name, or a partition name, to perform statistical information collection of different granularities; and (c) in the database storage procedure, searching for a corresponding statistical collection type according to the input database table owner, the table name, or the partition name, and completing statistical information collection of a database table object. According to the method for automatically collecting Oracle statistical information, the database table is designed into a partition table, operations such as addition, modification, and deletion are merely for a current partition or some specific partitions, and query and statistics-collection are separately implemented according to different statistical collection types, so that it is convenient to perform statistical information collection based on a granularity of such as an owner, a table, or a partition, thereby improving running efficiency, stability and service continuity of an Oracle database.

Description

technical field [0001] The invention relates to a method for collecting statistical information of a database, in particular to a method for automatically collecting Oracle statistical information. Background technique [0002] Statistical information refers to Oracle database optimizer (optimizer) statistical information. Statistical information describes the physical characteristics of Oracle database objects, such as how many records are in the table, how much disk space is occupied, etc. It is a collection that describes the database and database objects in more detail . [0003] When the Oracle database works in CBO (CostBasedOptimizer) mode (Oracle database 10g and later versions are default and recommended to use this mode), the optimizer evaluates the cost of different execution plans of SQL statements according to the object statistics recorded in the data dictionary, so as to find the optimal The execution plan makes the execution efficiency of the SQL statement t...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
Patent Type & Authority Applications(China)
IPC IPC(8): G06F17/30
CPCG06F16/21G06F16/2282
Inventor 程永新徐华春张文宇
Owner SHANGHAI SNC NET INFORMATION TECH CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products