CN103793526A - Method for monitoring SQL statement performance - Google Patents

Method for monitoring SQL statement performance Download PDF

Info

Publication number
CN103793526A
CN103793526A CN201410061517.1A CN201410061517A CN103793526A CN 103793526 A CN103793526 A CN 103793526A CN 201410061517 A CN201410061517 A CN 201410061517A CN 103793526 A CN103793526 A CN 103793526A
Authority
CN
China
Prior art keywords
sql
module
sql statement
consumption
oracle
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201410061517.1A
Other languages
Chinese (zh)
Inventor
初贤哲
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Inspur Electronic Information Industry Co Ltd
Original Assignee
Inspur Electronic Information Industry Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Inspur Electronic Information Industry Co Ltd filed Critical Inspur Electronic Information Industry Co Ltd
Priority to CN201410061517.1A priority Critical patent/CN103793526A/en
Publication of CN103793526A publication Critical patent/CN103793526A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3409Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment for performance assessment

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention provides a method for monitoring SQL statement performance, and belongs to the field of computer system design and the field of databases. The performance of related SQL statements is monitored by reading a data dictionary of oracle and performance data of the operating system-level, and the dependence on a graphic interface tool is reduced. The method solves the problems that a traditional imaging management tool is high in cost and hard to manage, and the processing time of database maintenance workers is shortened.

Description

A kind of method of monitoring SQL statement performance
technical field
The present invention relates to Computer System Design field and database field, be specifically related to the method for a kind of monitor control mechanism query language (Structured Query Language, SQL) SQL statement performance.
Background technology
In the information age of current high speed development, IT system performance issue is the mountain that is difficult to go beyond in face of technician that lies across always.The method of various performance optimizations is constantly explored out.In the various systems based on database, for guaranteeing the search efficiency of statement, IT company has developed many technology one after another, provides support in all its bearings.Aspect the optimization and tuning of SQL, the instrument such as gridcontrol, OEM of Oracle, and other third party's graphical tools are all done relatively goodly.But these graphical tools are under some extreme cases, and for example database does not fill data bank or the charge of third party's instrument, and how monitor database SQL statement performance becomes a problem.
Summary of the invention
The method that this kind monitored SQL statement performance under textual interface be the performance index that obtain SQL statement by data query dictionary monitor SQL statement performance this
The present invention utilizes the performance data of the MMON of oracle and the collection of MMNL process as source data, by the analysis of source data different aspects being drawn to corresponding sql performance data, send early warning mail or note according to the threshold values of definition to related personnel, thereby increase work efficiency.Method for designing of the present invention is after certain measured value (metrics) has exceeded default limit value (threshold value), to have submitted warning to, and create new MMON and be subordinate to process (MMON slave process) and carry out snapshot (snapshot), catch the statistical information of the nearest SQL object of revising, complete and give MMNL process for various tasks relevant with manageability lightweight and that frequency is higher, these 2 processes are written in the table of WRM $ _ * and WRH $ _ * beginning obtaining data, obtain the essential information of corresponding sql-the comprise execution number of times of sql by reading data in these tables, execution time, variate-value, cpu consumes, io consumes, memory consumption and various waiting events, reach the object of monitoring sql statement performance by the monitoring class to these basic indexs.
This project organization comprises: oracle background process module (1), problem process module (2), problem sql module (3), problem sql resource consumption and executive plan module (4), interface module (5);
Oracle background process module, background process module is to be integrated in oracle inside, has oracle automatically to safeguard, is responsible for collecting the related data of the sql statement that client sends, and carrys out timing operation according to related definition;
Problem process module, navigates to problem process by system level, is mainly that the resources such as the use, File Open number of consumption by the monitoring of system resource being comprised to consumption to cpu, io, internal memory, the process number of opening obtain problem process;
Problem sql module, by the id of process module acquisition problem process, then obtains by dictionary view the sql_id that this process is carried out, and can obtain by sql_id the sql statement text that this process is carried out;
Problem sql resource consumption and executive plan module, obtain sql_id by sql module and obtain the executive plan of sql statement, then obtains the reason of the consumption of natural resource of this this sql statement by analyzing this executive plan;
Interface module, by calling of mail or note system interface sent to related maintenance personnel by problem sql, to pinpoint the problems early.
The invention has the beneficial effects as follows: by occurring that the performance data that performance issue period MMON and MMNL process are collected is foundation, first find the process of consumption of natural resource, comprising consuming most cpu, consume internal memory most, consume io most, carry out number of times at most, firmly resolve at most, version too much, consistent read is too much, segment is maximum etc., by finding the id of this process to obtain the sql statement that this process is carried out, then obtain the executive plan of this sql statement by methods such as autotrace, explain, dbms.By the deciphering of sql statement execution plan being obtained to resource that this sql statement mainly consumes and his waiting event, maximum such as finding that the io of this statement consumes, when checking his executive plan, find it is the full table scan at a large table, whether so just should consider increase index in corresponding field, whether need subregion, whether need to set up the overall situation or local index, whether need some historical datas of large table to clear up, this sql statement need to be adjusted etc. and to avoid full table scan, advise the managerial personnel that are prompted to of robotization more by thereby corresponding statement adjustment being made to this class, and because be the inquiry of carrying out respective resources by sql statement, so more easily realize and customizing, can be according to oneself need to be to send corresponding warning going wrong, and the interface of sql statement is the standardized workload that reduces exploitation.
The method of monitoring sql statement under this textual interface has above-mentioned advantage, make it make up the deficiency that cannot monitor sql statement performance without graphical interfaces in the situation that, work efficiency and the work quality of DBA are greatly improved, alleviate the workload of DBA daily servicing, improved DBA to the corresponding speed of problem with the time, and in patterned situation, have very high technological value because customizable makes the method cannot use.
Accompanying drawing explanation
Accompanying drawing 1 is building-block of logic of the present invention.
Embodiment
With reference to the accompanying drawings, content of the present invention, to monitor single sql performance as example, is described to the implementation procedure of this structure.
As described in summary of the invention, logic realization construction design method of the present invention mainly comprises: oracle background process module (1), problem process module (2), problem sql module (3), problem sql resource consumption and executive plan module (4), interface module (5).
A kind of logical organization of the method for monitoring SQL statement performance comprises, the relevant information that oracle background process module is responsible for collecting sql statement, comprise the execution number of times of relevant sql statement at the appointed time, execution time, resolve number of times, sub-vernier number etc., then by these deposit data in corresponding dictionary table, for follow-up monitoring provides the most original data; Problem process module according to process resource consumption (comprise process consume cpu, internal memory, number, language handle number, io open file) situation judge whether this process is problem process, thereby determine whether this process id is sent to sql module, this module judges from system-level, thereby this carries out performance monitoring from 2 aspects and obtains comprehensive, complete performance data, if there are multiple process consume resources to reach threshold line, can sort and obtain resource consumption process list according to the index of being concerned about so; The process that problem sql module provides according to process module is obtained the sql_id of this process for No. id, then obtain according to this sql_id the sql text that this process is carried out, thereby the variate-value that can obtain this sql statement according to data dictionary information judges whether it is because histogram or binding variable are spied out the problem causing, and follows readable result of maintainer to developer; Problem sql resource consumption and executive plan module, the sql_id providing by sql module obtains the executive plan of this sql and obtains the Expenditure Levels of this sql to resource, thereby obtain this sql and which walks consumption of natural resource on earth, and then judge that whether the executive plan of this sql is correct; Interface module, thus sql text, resource consumption and the executive plan this process carried out by mailing system or note system send to related personnel to allow related personnel obtain in time relevant information, improve the corresponding time of processing problem.

Claims (1)

1. monitor a method for SQL statement performance, it is characterized in that this project organization comprises: oracle background process module (1), problem process module (2), problem sql module (3), problem sql resource consumption and executive plan module (4), interface module (5);
Oracle background process module, background process module is to be integrated in oracle inside, has oracle automatically to safeguard, is responsible for collecting the related data of the sql statement that client sends, and carrys out timing operation according to related definition;
Problem process module, navigates to problem process by system level, is mainly that the resources such as the use, File Open number of consumption by the monitoring of system resource being comprised to consumption to cpu, io, internal memory, the process number of opening obtain problem process;
Problem sql module, by the id of process module acquisition problem process, then obtains by dictionary view the sql_id that this process is carried out, and can obtain by sql_id the sql statement text that this process is carried out;
Problem sql resource consumption and executive plan module, obtain sql_id by sql module and obtain the executive plan of sql statement, then obtains the reason of the consumption of natural resource of this this sql statement by analyzing this executive plan;
Interface module, by calling of mail or note system interface sent to related maintenance personnel by problem sql, to pinpoint the problems early.
CN201410061517.1A 2014-02-24 2014-02-24 Method for monitoring SQL statement performance Pending CN103793526A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410061517.1A CN103793526A (en) 2014-02-24 2014-02-24 Method for monitoring SQL statement performance

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410061517.1A CN103793526A (en) 2014-02-24 2014-02-24 Method for monitoring SQL statement performance

Publications (1)

Publication Number Publication Date
CN103793526A true CN103793526A (en) 2014-05-14

Family

ID=50669192

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410061517.1A Pending CN103793526A (en) 2014-02-24 2014-02-24 Method for monitoring SQL statement performance

Country Status (1)

Country Link
CN (1) CN103793526A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104615660A (en) * 2015-01-05 2015-05-13 浪潮(北京)电子信息产业有限公司 Method and system for monitoring database performance
CN105808413A (en) * 2016-03-02 2016-07-27 上海新炬网络信息技术有限公司 Business process visualization based SQL performance monitoring method
CN105989137A (en) * 2015-02-27 2016-10-05 中国移动通信集团河北有限公司 Structured query language performance optimization method and system
CN106598862A (en) * 2016-12-19 2017-04-26 济南浪潮高新科技投资发展有限公司 SQL semantic extensibility-based performance diagnosis and optimization method
WO2019223155A1 (en) * 2018-05-25 2019-11-28 平安科技(深圳)有限公司 Sql performance monitoring method and device, computer apparatus, and storage medium
CN113204565A (en) * 2021-05-28 2021-08-03 中国工商银行股份有限公司 Database monitoring method and device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101059810A (en) * 2007-03-16 2007-10-24 华为技术有限公司 System and method for implementing automatic optimization of data base system
CN101408889A (en) * 2008-11-12 2009-04-15 阿里巴巴集团控股有限公司 Method, apparatus and system for monitoring performance
CN101477524A (en) * 2008-12-11 2009-07-08 金蝶软件(中国)有限公司 System performance optimization method and system based on materialized view
CN102521099A (en) * 2011-11-24 2012-06-27 深圳市同洲视讯传媒有限公司 Process monitoring method and process monitoring system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101059810A (en) * 2007-03-16 2007-10-24 华为技术有限公司 System and method for implementing automatic optimization of data base system
CN101408889A (en) * 2008-11-12 2009-04-15 阿里巴巴集团控股有限公司 Method, apparatus and system for monitoring performance
CN101477524A (en) * 2008-12-11 2009-07-08 金蝶软件(中国)有限公司 System performance optimization method and system based on materialized view
CN102521099A (en) * 2011-11-24 2012-06-27 深圳市同洲视讯传媒有限公司 Process monitoring method and process monitoring system

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104615660A (en) * 2015-01-05 2015-05-13 浪潮(北京)电子信息产业有限公司 Method and system for monitoring database performance
CN105989137A (en) * 2015-02-27 2016-10-05 中国移动通信集团河北有限公司 Structured query language performance optimization method and system
CN105989137B (en) * 2015-02-27 2019-12-10 中国移动通信集团河北有限公司 Method and system for optimizing structured query language performance
CN105808413A (en) * 2016-03-02 2016-07-27 上海新炬网络信息技术有限公司 Business process visualization based SQL performance monitoring method
CN106598862A (en) * 2016-12-19 2017-04-26 济南浪潮高新科技投资发展有限公司 SQL semantic extensibility-based performance diagnosis and optimization method
WO2019223155A1 (en) * 2018-05-25 2019-11-28 平安科技(深圳)有限公司 Sql performance monitoring method and device, computer apparatus, and storage medium
CN113204565A (en) * 2021-05-28 2021-08-03 中国工商银行股份有限公司 Database monitoring method and device

Similar Documents

Publication Publication Date Title
CN103793526A (en) Method for monitoring SQL statement performance
Yang et al. A system architecture for manufacturing process analysis based on big data and process mining techniques
CN104112026B (en) A kind of short message text sorting technique and system
US9367601B2 (en) Cost-based optimization of configuration parameters and cluster sizing for hadoop
EP2577507B1 (en) Data mart automation
CN104966172A (en) Large data visualization analysis and processing system for enterprise operation data analysis
CN110007913A (en) Visual flow chart of data processing setting method, device, equipment and storage medium
CN104809188A (en) Enterprise talent drainage data mining analysis method and device
CN112527774A (en) Data center building method and system and storage medium
CN106202566A (en) A kind of magnanimity electricity consumption data mixing based on big data storage system and method
CN109753596B (en) Information source management and configuration method and system for large-scale network data acquisition
CN106528828A (en) Multi-dimensional checking rule-based data quality detection method
CN104778185A (en) Determination method for abnormal SQL (structured query language) statement and server
US11615076B2 (en) Monolith database to distributed database transformation
Kun et al. Application of big data technology in scientific research data management of military enterprises
CN104281523A (en) Demand testability analysis method and system
CN113688118A (en) Risk inspection platform for power grid multi-source data based on cloud platform
CN103258047B (en) A kind of data organization method towards medicine enterprise Activity-Based Cost Control data warehouse
US20200201867A1 (en) Inserting annotations for application tracing
CN107748748A (en) Water conservancy and hydropower technical standard text retrieval system
CN111221698A (en) Task data acquisition method and device
Adhikari et al. Use of big data analytics in WASH sector
Kranjc et al. Real-time data analysis in ClowdFlows
EP3343372A1 (en) Distributed cache cleanup for analytic instance runs processing operating data from industrial assets
Yang et al. On construction of the air pollution monitoring service with a hybrid database converter

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20140514

WD01 Invention patent application deemed withdrawn after publication