KR101136457B1 - Method and apparatus for analyzing SQL Trace in DataBase Management System - Google Patents

Method and apparatus for analyzing SQL Trace in DataBase Management System Download PDF

Info

Publication number
KR101136457B1
KR101136457B1 KR1020060035711A KR20060035711A KR101136457B1 KR 101136457 B1 KR101136457 B1 KR 101136457B1 KR 1020060035711 A KR1020060035711 A KR 1020060035711A KR 20060035711 A KR20060035711 A KR 20060035711A KR 101136457 B1 KR101136457 B1 KR 101136457B1
Authority
KR
South Korea
Prior art keywords
sql
trace
file
statements
analyzed
Prior art date
Application number
KR1020060035711A
Other languages
Korean (ko)
Other versions
KR20070103850A (en
Inventor
최주덕
Original Assignee
주식회사 케이티
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 주식회사 케이티 filed Critical 주식회사 케이티
Priority to KR1020060035711A priority Critical patent/KR101136457B1/en
Publication of KR20070103850A publication Critical patent/KR20070103850A/en
Application granted granted Critical
Publication of KR101136457B1 publication Critical patent/KR101136457B1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/21Design, administration or maintenance of databases
    • G06F16/215Improving data quality; Data cleansing, e.g. de-duplication, removing invalid entries or correcting typographical errors
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/21Design, administration or maintenance of databases
    • G06F16/217Database tuning

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Quality & Reliability (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

본 발명은 데이터베이스 관리 시스템에의 품질과 성능 향상을 위한 튜닝(Tuning) 작업에 관련된 것이다. The present invention relates to a tuning operation for improving quality and performance in a database management system.

본 발명에 따른 SQL Trace 분석 방법은, 데이터베이스 관리 시스템(DBMS)의 품질향상을 위한 튜닝 과정에서 구조화 질의어(이하, SQL)문의 문제점을 파악하기 위하여 SQL문의 실행통계를 세션(Session)별로 수집하여 생성된 실행경로(Trace) 정보를 포함하는 로우(raw) 데이터 파일인 SQL Trace 파일을 분석하는 방법으로서, (a) 분석의 대상이 되는 다수의 SQL Trace 파일에 각각 포함된 다수의 SQL문을 분리하고 추출하는 단계; 및 (b) 상기 추출된 다수의 SQL문을 소정의 기준에 따라 정렬하는 단계;를 포함한다. SQL Trace analysis method according to the present invention, generated by collecting the execution statistics of the SQL statement for each session (Session) to grasp the problem of the structured query (SQL) statement in the tuning process for improving the quality of the database management system (DBMS) A method of analyzing a SQL trace file, which is a raw data file that contains traced execution information, (a) separating a plurality of SQL statements included in each of the plurality of SQL trace files to be analyzed and Extracting; And (b) sorting the extracted plurality of SQL statements according to a predetermined criterion.

Description

데이터베이스 관리 시스템에서 구조화 질의어(SQL) 실행경로(Trace) 분석 방법 및 장치{Method and apparatus for analyzing SQL Trace in DataBase Management System} Method and apparatus for analyzing SQL Trace in DataBase Management System for Structured Query Language (SRl) execution path analysis in database management system

본 명세서에 첨부되는 다음의 도면들은 본 발명의 바람직한 실시예를 예시하는 것이며, 후술하는 발명의 상세한 설명과 함께 본 발명의 기술사상을 더욱 이해시키는 역할을 하는 것이므로, 본 발명은 그러한 도면에 기재된 사항에만 한정되어 해석되어서는 아니된다. The following drawings attached to this specification are illustrative of preferred embodiments of the present invention, and together with the detailed description of the invention to serve to further understand the technical spirit of the present invention, the present invention is a matter described in such drawings It should not be construed as limited to.

도 1은 본 발명의 일 실시예에 따른 SQL Trace 분석 장치가 구현되는 데이터베이스 시스템의 구성을 도시하는 도면이다. 1 is a diagram illustrating a configuration of a database system in which a SQL Trace analysis apparatus according to an embodiment of the present invention is implemented.

도 2는 본 발명의 일 실시에예 따른 SQL Trace 분석 장치의 주요 구성을 도시한 블럭도이다. 2 is a block diagram showing the main configuration of the SQL Trace analysis apparatus according to an embodiment of the present invention.

도 3은 본 발명의 일 실시예에 따른 SQL Trace 분석 방법의 절차를 도시하는 순서도이다. 3 is a flowchart illustrating a procedure of an SQL trace analysis method according to an embodiment of the present invention.

도 4는 SQL Trace 파일에서 추출한 SQL문과 실행통계정보의 화면을 캡춰한 도면이다. 4 is a diagram capturing a screen of the SQL statement and execution statistics information extracted from the SQL Trace file.

<도면의 주요 부분에 대한 부호의 설명> <Explanation of symbols for the main parts of the drawings>

100 : 분석장치 200 : DBMS 100: analysis device 200: DBMS

210 : 데이터베이스 300 : 관리자210: database 300: administrator

401,402,403 : 유저401,402,403: user

본 발명은 데이터베이스 관리 시스템에 관한 것으로서, 보다 상세하게는 데이터베이스 관리 시스템의 품질과 성능 향상을 위한 튜닝(Tuning) 작업에 관련된 것이다. The present invention relates to a database management system, and more particularly, to a tuning operation for improving quality and performance of a database management system.

일반적으로, 데이터베이스(database)에는 서로 관련 있는 데이터들이 저장되어 있는데, 데이터베이스에 저장된 데이터들은 필요시마다 최신의 데이터로 갱신, 삽입, 삭제되는 것을 필요로 한다. 이를 위해 데이터베이스는 DBMS(DataBase Management System)라는 소프트웨어 시스템에 의해 관리되고 있는데, DBMS는 응용 프로그램과 데이터의 중재자로서 모든 응용 프로그램들이 데이터를 공유할 수 있도록 여러 응용 프로그램들이 사용하는 데이터를 하나의 장소에 모아 종합적으로 유지하고 관리해주는 소프트웨어이다. 즉, DBMS는 응용 프로그램들이 원하는 데이터를 검색하거나 변경하여 언제나 일관성 있는 결과를 응용 프로그램에 제공해주는 종합적인 데이터 관리 시스템이다. In general, a database stores data related to each other. The data stored in the database needs to be updated, inserted, or deleted as necessary. For this purpose, the database is managed by a software system called Database Management System (DBMS), which is a mediator of applications and data, which allows data to be shared by multiple applications in one place so that all applications can share data. It is software that collects and maintains comprehensively. In other words, DBMS is a comprehensive data management system that provides applications with consistent results by searching or changing the data they want.

이러한 DBMS는 구조화 질의어(SQL: Structrer Query Language)를 이용하여 여러 사용자가 데이터베이스 내의 데이터를 검색하거나 관리할 수 있도록 한다. 구조화 질의어는 데이터 정의어(DDL)와 데이터 조작어(DML)를 포함한 데이터베이스용 질의언어(query language)의 일종이다. 이 SQL은 특정한 데이터베이스 시스템에 한정되지 않아 널리 사용되고 있다. 초기에는 IBM의 관계형 데이터베이스인 시스템에서만 사용되었으나 지금은 다른 데이터베이스에서도 널리 사용된다. These DBMSs use Structrer Query Language (SQL) to allow multiple users to retrieve or manage data in the database. Structured query language is a type of query language for databases, including data definition words (DDL) and data manipulation words (DML). This SQL is widely used because it is not limited to a specific database system. It was initially used only on systems that were IBM's relational database, but is now widely used in other databases.

SQL은 관계사상(relational mapping)을 기초로 한 대표적인 언어로서 입력 릴레이션(테이블)으로부터 원하는 출력 릴레이션을 사상(mapping)시키는 언어이다. 이 같은 언어로는 1973년 SQUARE(structured queries as relational expressions)가 발표되었는데 수학적인 표현이 많아 초보자가 사용하기는 어려웠다. 이것을 기초로 1974년 SEQUEL(structured english as query language)이 IBM의 새너제이(San Jose) 연구소에서 만들어졌으며 다시 이것을 개선하여 1976년 SEQUEL 2가 발표되었다. 이 SEQUEL 2를 기초로 한 시스템인 시스템 R, 오라클(Oracle) 등이 나오면서 SQL로 알려지게 되었다. SQL is a representative language based on relational mapping and is a language for mapping desired output relations from input relations (tables). In 1973, structured queries as relational expressions (SQUARE) were published in 1973. Many mathematical expressions were difficult for beginners to use. Based on this, structured english as query language (SEQUEL) was created at San Jose Institute in IBM in 1974, and this was again improved and SEQUEL 2 was released in 1976. The system, based on SEQUEL 2, called System R and Oracle, became known as SQL.

SQL은 단순한 질의 기능뿐만 아니라 완전한 데이터 정의 기능과 조작 기능을 갖추고 있다. 또 온라인 단말기를 통해 대화식으로 사용할 수도 있고 코볼이나 PL/I, C 등의 호스트 언어로 된 프로그램에 삽입되어서 사용되기도 한다. SQL은 장치 독립적이고 액세스 경로에 대해서는 어떠한 참조도 하지 않으며, 개개의 레코드보다는 레코드의 집합인 테이블을 단위로 연산을 수행한다. 또한, SQL은 영어 문장과 비슷한 구문으로 되어 있어서 초보자들도 비교적 쉽게 사용할 수 있다. SQL has not only simple query capabilities, but also complete data definition and manipulation capabilities. It can also be used interactively through an online terminal, or embedded in a program in a host language such as COBOL, PL / I, or C. SQL is device independent and does not make any reference to access paths. It performs operations on tables, which are sets of records rather than individual records. In addition, SQL is a syntax similar to English sentences, so even beginners can use it relatively easily.

최근에 정보통신 분야의 발전과 함께 방대한 양의 정보들이 쏟아져 나오고 있고, 이에 따른 방대한 양의 데이터들에 대한 관리가 필요하게 되었다. 이를 위해 방대한 양의 데이터들로 이루어진 데이터베이스를 구축하게 되었고, 이러한 데이터 베이스의 관리를 위해 DBMS가 갈수록 발전하고 있는 추세이다. 이렇게 방대한 양의 데이터베이스와 이를 이용하려는 많은 사용자들로 인해서 DBMS도 많은 기능이 탑재되고 사용자 편의를 위해서 더욱 복잡해지게 되었다. 또한, 이러한 방대한 데이터베이스를 이용하려는 사용자들이 많아지게 됨에 따라 DBMS도 증가한 SQL 처리로 많은 부하가 발생하게 된다. 이러한 DBMS에서의 부하로 인해 시스템에서의 처리 속도가 떨어지게 되고 이는 DBMS의 성능 저하로 이어지게 된다. Recently, with the development of the information and communication field, a huge amount of information is pouring out, and accordingly, it is necessary to manage a huge amount of data. To this end, a database consisting of a large amount of data has been built, and the DBMS for the management of such a database is gradually developing. This vast amount of databases and the many users who want to use them make DBMSs more complex and more complex for user convenience. In addition, as many users want to use such a large database, the DBMS also has a large load due to increased SQL processing. This load on the DBMS slows down the processing speed of the system, which leads to a decrease in the performance of the DBMS.

이와 같이, 정보통신 기술의 발전에 따라 방대한 데이터베이스와 이를 관리하는 DBMS의 품질을 향상시켜야 할 필요가 요구되고 있다. 이를 위해 DBMS의 성능과 처리 속도를 향상시키는 튜닝(Tuning) 작업을 진행하게 되었다. 또한, 빠르게 변하는 정보와 데이터 및 사용자의 요구를 반영하기 위해서는 빠른 튜닝 작업이 절실히 요구된다. 이러한 튜닝 작업을 위해서는 DBMS 내의 주요 처리 대상인 SQL문을 분석하여 문제가 되는 SQL문을 빠르고 정확하게 추출해야 한다. 이미 처리한 SQL문을 분석하기 위해서는 SQL문의 처리시의 해당 정보를 기록으로 남겨야 하는데 이러한 기록은 SQL Trace 파일로 남게 된다. 이 SQL Trace 파일은 처리 당시의 SQL 처리 정보를 포함하는 로우(raw) 데이터 파일이다. 따라서, 튜닝 작업은 이러한 SQL Trace 파일을 분석하고 문제를 발견하는 것으로 시작하게 된다. As such, according to the development of information and communication technology, there is a need to improve the quality of a large database and a DBMS managing the same. To this end, tuning has been carried out to improve the performance and processing speed of the DBMS. In addition, fast tuning is urgently needed to reflect rapidly changing information, data, and user demands. For this tuning, it is necessary to analyze the SQL statements that are the main targets in the DBMS and extract the problematic SQL statements quickly and accurately. In order to analyze the already processed SQL statement, the relevant information when the SQL statement is processed should be recorded as a record, which is left in the SQL Trace file. This SQL Trace file is a raw data file that contains the SQL processing information at the time of processing. Therefore, tuning starts by analyzing these SQL trace files and finding problems.

그러나, 방대한 데이터베이스와 많은 사용자에 따라 복잡해진 DBMS로 인하여 제어하고 관리하는 영역이 많아지고 따라서 다양한 SQL Trace 파일이 생성된다. 이러한 SQL Trace 파일 하나하나에는 많은 양의 SQL문이 존재한다. 따라서, 기존에는 SQL Trace 파일을 분석하여 SQL을 튜닝하기 위해서는 여러 개의 SQL Trace 파일들 을 하나씩 분석하여야 하는 불편함이 있었다. 즉, 기존의 SQL 튜닝을 위해서는 모든 SQL Trace 파일을 하나씩 열어서 확인해야 했다. 또한, 하나의 SQL Trace 파일 안에는 여러 개의 SQL이 존재하므로 실제로 문제가 발생하는 SQL을 찾아서 추출하여 재편집해야만 하는 불편함이 있었다. However, due to the large database and the DBMS complicated by many users, there are many areas to control and manage, thus creating various SQL trace files. Each SQL Trace file contains a large amount of SQL statements. Therefore, in the past, in order to analyze SQL trace files and to tune SQL, it was inconvenient to analyze several SQL trace files one by one. In other words, to tune the existing SQL, all the SQL Trace files had to be opened and checked one by one. In addition, since several SQLs exist in one SQL Trace file, it is inconvenient to find, extract, and re-edit the SQL that has a problem.

본 발명의 첫 번째 목적은, 상술한 바와 같이 기존의 SQL 튜닝시에 여러 개의 SQL Trace 파일을 각각 따로 분석함으로 인해 전체적인 분석 작업이 지연되고 이에 따라 튜닝 작업이 어렵고 복잡해지는 문제를 개선하고자 하는 데 있다. The first object of the present invention is to improve the problem that the overall analysis is delayed and the tuning becomes difficult and complicated by analyzing several SQL Trace files separately during the existing SQL tuning. .

두 번째 목적으로는, 대량의 SQL Trace 파일에서 튜닝이 필요한 문제의 SQL문을 추출하기 위하여 이중으로 진행되던 작업을 개선하여 보다 신속하고 정확하게 SQL문을 분석할 수 있도록 하는 데 있다. The second purpose is to improve the faster and more accurate SQL analysis by improving the work that has been doubled to extract the SQL statement of the problem that needs tuning from a large SQL Trace file.

상기와 같은 목적을 달성하기 위해 본 발명에 따른 SQL Trace 분석 방법은, 데이터베이스 관리 시스템(DBMS)의 품질향상을 위한 튜닝(Tuning) 과정에서 구조화 질의어(이하, SQL)문의 문제점을 파악하기 위하여 SQL문의 실행통계를 세션(Session)별로 수집하여 생성된 실행경로(Trace) 정보를 포함하는 로우(raw) 데이터 파일인 SQL Trace 파일을 분석하는 방법으로서, (a) 분석의 대상이 되는 다수의 SQL Trace 파일에 각각 포함된 다수의 SQL문을 분리하고 추출하는 단계; 및 (b) 상기 추출된 다수의 SQL문을 소정의 기준에 따라 정렬하는 단계;를 포함한다. In order to achieve the above object, SQL Trace analysis method according to the present invention, SQL statement to grasp the problem of structured query (SQL) statement in the tuning (Tuning) process for improving the quality of the database management system (DBMS) A method of analyzing a SQL trace file, which is a raw data file containing trace information generated by collecting execution statistics by session, (a) a plurality of SQL trace files to be analyzed Separating and extracting a plurality of SQL statements included in each; And (b) sorting the extracted plurality of SQL statements according to a predetermined criterion.

바람직하게, 상기 단계 (a)는, (1) 분석의 대상이 되는 다수의 SQL Trace 파 일을 정형화된 포맷의 분석 가능한 형태로 변경하는 단계; 및 (2) 상기 변경된 다수의 파일을 분석하여 각 파일에 포함된 다수의 SQL문을 분리하고 추출하는 단계;를 포함한다. Preferably, step (a) comprises: (1) changing a plurality of SQL Trace files to be analyzed into a format that can be analyzed in a standardized format; And (2) analyzing the changed plurality of files to separate and extract a plurality of SQL statements included in each file.

본 발명의 다른 측면에 따르면, 데이터베이스 관리 시스템(DBMS)의 품질향상을 위한 튜닝(Tuning) 과정에서 SQL문의 문제점을 파악하기 위하여 SQL문의 실행통계를 세션(Session)별로 수집하여 생성된 실행경로(Trace) 정보를 포함하는 로우(raw) 데이터 파일인 SQL Trace 파일을 분석하는 장치로서, 분석의 대상이 되는 다수의 SQL Trace 파일들을 참조하여 각각의 파일에 포함된 다수의 SQL문을 분리하고 추출하는 수단; 및 상기 추출된 다수의 SQL문을 소정의 기준에 따라 정렬하는 수단;을 포함하는 대량의 SQL Trace 분석 장치가 제공된다. According to another aspect of the present invention, an execution path generated by collecting execution statistics of SQL statements for each session in order to identify a problem of SQL statements in a tuning process for improving the quality of a database management system (DBMS). A device that analyzes a SQL trace file, a raw data file containing information, and refers to a plurality of SQL trace files to be analyzed and means for separating and extracting a plurality of SQL statements included in each file. ; And a means for sorting the extracted plurality of SQL statements according to a predetermined criterion.

본 발명의 또 다른 측면에 따르면, 데이터베이스 관리 시스템(DBMS)의 품질향상을 위한 튜닝(Tuning) 과정에서 SQL문의 문제점을 파악하기 위하여 SQL문의 실행통계를 세션(Session)별로 수집하여 생성된 실행경로(Trace) 정보를 포함하는 로우(raw) 데이터 파일인 SQL Trace 파일을 분석하는 프로그램이 기록된 기록매체로서, 분석의 대상이 되는 다수의 SQL Trace 파일을 정형화된 포맷의 분석 가능한 형태로 변경하는 절차와, 상기 변경된 다수의 파일을 분석하여 각 파일에 포함된 다수의 SQL문을 분리하고 추출하는 절차, 및 상기 추출된 다수의 SQL문을 소정의 기준에 따라 정렬하는 절차를 실행하는 컴퓨터로 판독 가능한 프로그램을 기록한 기록매체가 제공된다. According to another aspect of the present invention, in order to identify the problem of the SQL statement in the tuning process for improving the quality of the DBMS (DBMS) execution path generated by collecting the execution statistics of the SQL statement by session (Session) ( A recording medium that records a program that analyzes a SQL trace file, which is a raw data file containing trace information, and includes a procedure for changing a plurality of SQL trace files to be analyzed into a format that can be analyzed in a standardized format. A computer-readable program for analyzing the changed plurality of files, separating and extracting the plurality of SQL statements included in each file, and for sorting the extracted plurality of SQL statements according to a predetermined criterion; A recording medium recording the above is provided.

이하, 첨부된 도면을 참조하여 본 발명의 바람직한 실시예를 상세히 설명하 기로 한다. 이에 앞서, 본 명세서 및 청구범위에 사용된 용어나 단어는 통상적이거나 사전적인 의미로 한정해서 해석되어서는 아니되며, 발명자는 그 자신의 발명을 가장 최선의 방법으로 설명하기 위해 용어의 개념을 적절하게 정의할 수 있다는 원칙에 입각하여 본 발명의 기술적 사상에 부합하는 의미와 개념으로 해석되어야만 한다. 따라서, 본 명세서에 기재된 실시예와 도면에 도시된 구성은 본 발명의 가장 바람직한 일 실시예에 불과할 뿐이고 본 발명의 기술적 사상을 모두 대변하는 것은 아니므로, 본 출원시점에 있어서 이들을 대체할 수 있는 다양한 균등물과 변형예들이 있을 수 있음을 이해하여야 한다. Hereinafter, exemplary embodiments of the present invention will be described in detail with reference to the accompanying drawings. Prior to this, terms or words used in the specification and claims should not be construed as having a conventional or dictionary meaning, and the inventors should properly explain the concept of terms in order to best explain their own invention. Based on the principle that can be defined, it should be interpreted as meaning and concept corresponding to the technical idea of the present invention. Therefore, the embodiments described in the specification and the drawings shown in the drawings are only the most preferred embodiment of the present invention and do not represent all of the technical idea of the present invention, various modifications that can be replaced at the time of the present application It should be understood that there may be equivalents and variations.

도 1은 본 발명의 일 실시예에 따른 SQL Trace 분석 장치가 구현되는 데이터베이스 시스템의 구성을 도시하는 도면이다. 1 is a diagram illustrating a configuration of a database system in which a SQL Trace analysis apparatus according to an embodiment of the present invention is implemented.

도 1을 참조하면, 데이터베이스 시스템은 대량의 데이터들이 구축된 데이터베이스(210), 상기 데이터베이스(210)를 이용하는 유저들(401,402,403), 상기 데이터베이스(210)를 관리하는 데이터베이스 관리 시스템(200), 상기 데이터베이스 관리 시스템(200)을 운용 관리하는 관리자(300), 상기 데이터베이스 시스템의 실행정보들이 기록되는 로그파일(220) 및 상기 로그파일(220)을 분석하는 분석장치(100)를 포함한다. Referring to FIG. 1, a database system includes a database 210 in which a large amount of data are constructed, users 401, 402, and 403 using the database 210, a database management system 200 managing the database 210, and the database. A manager 300 for operating and managing the management system 200, a log file 220 in which execution information of the database system is recorded, and an analysis device 100 for analyzing the log file 220.

상기 데이터베이스(210)는 논리적으로 연관된 하나 이상의 자료의 모음으로 그 내용을 고도로 구조함으로써 검색과 갱신의 효율화를 꾀한 것이다. 즉, 몇 개의 자료 파일을 조직적으로 통합하여 자료 항목의 중복을 없애고 자료를 구조화하여 기억시켜 놓은 자료의 집합체라고 할 수 있다. The database 210 is a collection of one or more logically related data, which is highly structured to improve the efficiency of searching and updating. In other words, it is a collection of data that systematically integrates several data files to eliminate duplication of data items and to structure and remember the data.

상기 유저들(401,402,403)은 상기 데이터베이스(210)를 이용하는 사람, 응용프로그램, 클라이언트 또는 사용자 단말 등이다. 상기 유저는 데이터베이스(210)에 데이터를 정의, 등록, 삽입하는 작업이나 상기 데이터베이스(210)의 데이터를 검색, 갱신, 삭제, 변경, 참조, 응용, 조작하는 등의 작업을 한다. The users 401, 402, 403 are people, applications, clients, user terminals, etc. that use the database 210. The user defines, registers, and inserts data into the database 210, and searches, updates, deletes, changes, references, applications, and manipulates the data of the database 210.

상기 데이터베이스 관리 시스템(200)은 상기 데이터베이스(210)를 유지, 보수, 관리하며 상기 유저들(401,402,403)의 이용을 돕는 시스템이다. 보다 구체적으로 상기 데이터베이스 관리 시스템(200, 이하 DBMS)은 데이터베이스(210)를 구성하고 이를 응용하기 위해 구성된 소프트웨어 시스템이다. 특히, 사용자나 응용 프로그램이 데이터베이스를 쉽게 이용할 수 있도록 하는 기능을 포함한다. 그 기능은 크게 구성 기능, 조작 기능, 제어 기능으로 나눌 수 있다. 구성 기능은 데이터베이스에 저장될 자료의 구조와 응용 프로그램이 그것을 이용하는 방식을 정의하는 것으로, 레코드 구조의 정의, 데이터 모형의 정의, 물리적 구조의 정의 등을 포함한다. 조작 기능은 사용자의 요구에 따라 데이터베이스에 저장된 자료를 검색, 갱신, 삽입, 삭제할 수 있도록 하는 기능이다. 제어 기능은 데이터베이스의 내용이 일관성을 유지하고 중복되지 않도록 하며, 허가되지 않은 접근을 제한하여 자료를 보호하는 기능이다. The database management system 200 is a system that maintains, maintains, and manages the database 210, and assists the users 401, 402, and 403. More specifically, the database management system 200 (hereinafter referred to as DBMS) is a software system configured to configure the database 210 and apply it. In particular, it includes features that make the database easier for users or applications to use. The functions can be broadly divided into configuration functions, operation functions, and control functions. Configuration functions define the structure of the data to be stored in the database and how the application uses it, including the definition of record structures, the definition of data models, and the definition of physical structures. Manipulation functions allow users to search, update, insert, and delete data stored in the database according to user requirements. The control function is to protect the data by keeping the contents of the database consistent and non-duplicated and restricting unauthorized access.

상기 관리자(300)는 데이터베이스(210)와 DBMS(200)를 가장 좋은 상태로 관리하는 책임을 지는 개인 또는 집단이다. 상기 데이터베이스(210) 정보 내용의 정확성이나 통합성을 결정하고 데이터베이스(210)의 내부 저장 구조와 접근 관리 대책을 결정하며, 데이터의 보안 대책을 수립하고 점검하는 등 데이터베이스(210)와 DBMS(200)의 성능을 감시하여 변화하는 요구에 대응하는 책임을 진다. The manager 300 is an individual or a group responsible for managing the database 210 and the DBMS 200 in the best condition. The database 210 and the DBMS 200 determine the accuracy or integrity of the information of the database 210, determine the internal storage structure and access management measures of the database 210, establish and check the security measures of the data, and the like. Monitor your performance and take responsibility for responding to changing needs.

상기 로그파일(220)은 상기 DBMS(200)를 통하여 상기 데이터베이스(210)가 조작 처리될 때의 여러 가지 정보가 기록되는 로우(raw) 데이터 파일이다. 이 중 구조화 질의어(SQL)문에 관계된 정보들은 SQL Trace 파일로 생성된다. 대부분의 DBMS에서는 다수의 유저들(401,402,403)과 세션들로 인하여 대량의 SQL Trace 파일이 생성된다. 이러한 각각의 SQL Trace 파일에는 다수의 SQL문이 포함되어 진다. The log file 220 is a raw data file in which various information is recorded when the database 210 is manipulated through the DBMS 200. Information related to structured query (SQL) statement is generated as SQL Trace file. In most DBMSs, a large number of users (401, 402, 403) and sessions generate a large amount of SQL Trace files. Each of these SQL Trace files contains a number of SQL statements.

상기 분석장치(100)는 상기 관리자(300)의 튜닝 작업시에 로그 파일(220)을 이용하여 SQL문을 분석하는데 이용된다. 상기 데이터베이스(210)와 상기 DBMS(200)의 성능 향상을 위하여 상기 관리자(300)는 시스템 튜닝 작업을 수행하는데, 이때 문제가 되는 SQL문을 분석하기 위하여 상기 로그 파일(220) 중에서 SQL Trace 파일을 분석하게 된다. 상기 분석장치(100)는 이러한 SQL Trace 파일을 생성하고 분석하고 정렬하여 출력하는 등의 작업을 수행하고 이 분석된 정보를 상기 관리자(300)에게 제공한다. The analyzing apparatus 100 is used to analyze the SQL statement using the log file 220 at the time of tuning the manager 300. In order to improve the performance of the database 210 and the DBMS 200, the manager 300 performs a system tuning operation. In this case, an SQL trace file of the log file 220 is analyzed in order to analyze a problem SQL statement. Will be analyzed. The analyzing apparatus 100 performs such a task as generating, analyzing, sorting, and outputting the SQL trace file, and provides the analyzed information to the manager 300.

그러면 본 발명의 일 실시예에 따른 SQL Trace 분석 장치를 도면을 통하여 상세하게 설명하기로 한다. Then, the SQL trace analysis apparatus according to an embodiment of the present invention will be described in detail with reference to the drawings.

도 2는 본 발명의 일 실시에예 따른 SQL Trace 분석 장치의 주요 구성을 도시한 블럭도이다. 2 is a block diagram showing the main configuration of the SQL Trace analysis apparatus according to an embodiment of the present invention.

도 2를 참조하면, 본 발명에 따른 SQL Trace 분석 장치(100)는 Trace 파일 생성 모듈(110), 포맷 변환 모듈(120), SQL 추출 모듈(130), SQL 정렬 모듈(140), SQL 출력 모듈(150) 및 이들을 구동하는 주변 장치들을 포함한다. 2, the SQL Trace analysis apparatus 100 according to the present invention is a trace file generation module 110, format conversion module 120, SQL extraction module 130, SQL sorting module 140, SQL output module 150 and the peripherals that drive them.

상기 Trace 파일 생성 모듈(110)은 상기 DBMS(200)에서 처리되는 SQL문의 실행통계를 세션별로 모아서 Trace 파일을 생성한다. 상기 Trace 파일은 로우 데이터 파일로 내부에 다수의 SQL 정보가 포함된다. 상기 Trace 파일 생성 모듈(110)에서는 DBMS(200)를 이용하는 유저의 수와 복잡한 DBMS(200) 구조 등으로 인해 다수의 Trace 파일이 생성된다. 또한, DBMS(200)에 Trace 생성 기능이 지원되는 경우에는 직접 Trace 파일을 생성하지 않고 DBMS(200)로 Trace 생성 지시만 전달할 수도 있다. 이 경우 DBMS(200)의 전체적인 수행 능력이 약간 저하되는 단점이 있다. 따라서, 본 발명은 Trace 파일 생성 모듈(110)이 생략될 수도 있다. The trace file generation module 110 collects execution statistics of SQL statements processed by the DBMS 200 for each session and generates a trace file. The trace file is a raw data file and includes a plurality of SQL information therein. The trace file generation module 110 generates a plurality of trace files due to the number of users using the DBMS 200 and the complicated DBMS 200 structure. In addition, when a trace generation function is supported in the DBMS 200, only a trace generation instruction may be transmitted to the DBMS 200 without directly generating a trace file. In this case, the overall performance of the DBMS 200 is slightly deteriorated. Therefore, in the present invention, the trace file generation module 110 may be omitted.

상기 포맷 변환 모듈(120)은 다수의 SQL Trace 파일들을 분석 가능한 정형화된 형태의 포맷으로 변환한다. 또는, 다수의 SQL Trace 파일들을 분석하여 각각의 파일마다 분석 가능한 텍스트 형태의 포맷으로 파일을 생성한다. 이는 상기 SQL Trace 파일은 로우 데이터 파일이기 때문에 직접 내부의 정보를 파악하기가 어려워 이를 텍스트 형태 등의 파악하기 용이하고 정형화된 포맷으로 변환하게 된다. 이러한 포맷의 예로 텍스트 형태의 SQL prf 포맷이 있다. 이러한 변환 작업은 기존의 유틸리티 툴을 이용할 수도 있는데, 예를 들어 TKPROF 툴을 이용하여 변환 작업을 수행할 수도 있다. 상기 포맷 변환 모듈(120)은 다수의 SQL Trace 파일들을 일괄적으로 변환하여 분석 가능한 정형화된 형태의 포맷으로 파일을 생성한다. The format conversion module 120 converts a plurality of SQL Trace files into a format of a format that can be analyzed. Alternatively, analyze a plurality of SQL Trace files and create a file in a text format that can be analyzed for each file. Since the SQL Trace file is a raw data file, it is difficult to directly grasp the internal information, so it is easily converted into a text format and a formatted format. An example of such a format is the textual SQL prf format. This conversion can be done using an existing utility tool, for example using the TKPROF tool. The format conversion module 120 converts a plurality of SQL Trace files in a batch to generate a file in a format of a standard form that can be analyzed.

상기 SQL 추출 모듈(130)은 변환된 SQL Trace 파일들에서 SQL들을 분리하고 분리된 SQL들을 추출하는 작업을 수행한다. 하나의 SQL Trace 파일 내에는 다수의 SQL 정보가 포함되어 있고, 이러한 다수의 SQL Trace 파일들을 모두 분석하여 모든 SQL을 추출한다. 이렇게 추출된 SQL은 SQL문과 SQL이 처리될 때의 통계정보가 포함되어 있다. 또한, 상기 SQL 추출 모듈(130)은 로우 데이터 파일인 SQL Trace 파일에서 직접 SQL들을 분리하고 추출할 수도 있다. The SQL extraction module 130 separates the SQLs from the converted SQL trace files and extracts the separated SQLs. A single SQL Trace file contains a lot of SQL information, and all of these SQL trace files are analyzed to extract all the SQL. The extracted SQL includes SQL statements and statistical information when the SQL is processed. In addition, the SQL extraction module 130 may separate and extract SQLs directly from a SQL trace file which is a raw data file.

상기 SQL 정렬 모듈(140)은 상기 SQL 추출 모듈(130)을 통해 추출된 모든 SQL을 정렬하는 작업을 수행한다. 분석 대상인 복수의 SQL Trace 파일들 각각의 내부에는 또다시 다수의 SQL이 포함되어 있다. 이러한 분석 대상의 모든 SQL Trace 파일에서 추출된 모든 SQL들을 대상으로 정렬 작업을 수행하는데, 정렬의 기준은 상기 추출된 SQL에 포함된 SQL 정보의 항목들 중 하나 또는 항목들의 조합을 기준으로 한다. 상기 정렬 기준은 사용자로부터 입력받거나 미리 설정되는 기본 항목으로 설정될 수 있다. 또한, 정렬 방법으로는 오름차순 정렬, 내림차순 정렬 또는 사용자가 정한 규칙에 따른 정렬 등의 방법이 사용된다. 특히, 복수의 항목을 기준으로 정렬을 수행할 수도 있다. 상기 SQL을 정렬할 때 기준으로 사용되는 항목은 SQL 실행통계정보에 존재한다. SQL 실행통계정보는 SQL Trace 파일에서 추출된 SQL에 SQL문과 함께 포함되어 있다. 추출된 SQL의 예를 들면, 도 4에서와 같이 SQL문(A)과 SQL 실행통계정보(B)로 이루어진다. SQL문(A)은 DBMS에서 실행된 명령문이고, SQL 실행통계정보(B)는 상기 SQL문(A)이 실행될 때의 여러 가지 정보이다. 상기 SQL 정렬 모듈(140)에서의 동작을 예를 들면, 정렬 기준 항목이 CPU로 설정되었다고 가정하면, 상기 추출된 모든 SQL에서 SQL 실행통계정보의 CPU 항목을 모두 비교하여 가장 많은 CPU 시간이 소요된 SQL 순으로 정렬이 된다. The SQL sort module 140 sorts all the SQL extracted by the SQL extraction module 130. Each of the plurality of SQL trace files to be analyzed again contains a large number of SQLs. Sorting is performed on all SQLs extracted from all SQL Trace files of the analysis target, and the sorting criteria is based on one or a combination of items of SQL information included in the extracted SQL. The sorting criteria may be set as basic items that are input from a user or preset. As the sorting method, an ascending sorting method, a descending sorting method, or a sorting according to a rule set by a user is used. In particular, sorting may be performed based on a plurality of items. The item used as a reference when sorting the SQL exists in the SQL execution statistics. The SQL Execution Account Report is included with the SQL statements in the SQL extracted from the SQL Trace file. For example, the extracted SQL includes an SQL statement A and SQL execution statistics information B as shown in FIG. SQL statement (A) is a statement executed in the DBMS, SQL execution statistics (B) is a variety of information when the SQL statement (A) is executed. For example, assuming that the sort criterion item is set to CPU, the operation of the SQL sort module 140 compares all CPU items of SQL execution statistics information in all of the extracted SQLs. Sorted in SQL order.

여기서, 도 4를 참조하여 상기 SQL 정렬 모듈(140)에서 정렬의 기준이 되는 항목들을 살펴보면, 우선 SQL에 의한 DBMS의 동작형태인 분석(Parsing), 실행(Execute), 호출(Fetch) 항목이 있다. Parsing은 SQL문이 파싱되는 단계에 대한 통계로 새로 파싱을 했거나, 공유 풀에서 찾아 온 것도 포함된다. 단, 반복 수행(Loop)된 SQL이나 PRO*SQL에서 보존커서(Hold cursor)를 지정한 경우에는 한 번만 파싱된다. Execute는 SQL문의 실행 단계에 대한 통계이다. 갱신, 삽입, 삭제 문들은 여기에 수행한 결과가 나타난다. Fetch는 SQL문이 실행되면서 호출된 통계이다. 부분범위 방식으로 처리된 SELECT문들이나 전체범위 처리를 한 후, 한 건을 추출하는 경우는 주로 여기에 많은 값들이 나타난다. 다음으로, 상기 세 항목들에 대한 통계수치 항목을 설명한다. count는 SQL문이 파싱된 회수, 실행된 회수, 호출이 수행된 회수이다. CPU는 파싱, 실행, 호출이 실제로 사용한 CPU 시간이다. elapsed는 작업의 시작에서 종료시까지 실제 소요된 총 시간이다. disk는 디스크에서 읽혀진 데이터 블록의 수이다. query는 메모리 내에서 변경되지 않은 블록을 읽거나 다른 세션에 의해 변경되었으나 아직 확인되지 않아 복사해 둔 스냅샷 블록을 읽은 블록의 수이다. current는 현 세션에서 작업한 내용을 확인하지 않아 오로지 자신에게만 유효한 블록을 액세스한 블록 수이다. rows는 SQL문을 수행한 결과에 의해 최종적으로 액세스된 로우의 수이다. Here, referring to FIG. 4, the items that are the sort criteria in the SQL sorting module 140 are parsed, executed, and fetched items, which are operations of the DBMS by SQL. . Parsing is a statistic about the stage at which an SQL statement is parsed, including new parsing or retrieval from a shared pool. However, if Hold cursor is specified in Looped SQL or PRO * SQL, it is parsed only once. Execute is a statistic about the execution phase of an SQL statement. Update, insert, and delete statements are the result of doing this. Fetch is the statistics called when the SQL statement is executed. In case of extracting one case after SELECT statements processed in partial range method or full range processing, many values appear mainly here. Next, the statistical value items for the above three items will be described. count is the number of times the SQL statement was parsed, executed, and executed. CPU is the CPU time actually used by parsing, execution, and invocation. elapsed is the total time actually spent from start to finish. disk is the number of data blocks read from the disk. query is the number of blocks read in the memory that have not been changed or read snapshot blocks that have been modified by another session but have not been checked yet. current is the number of blocks that only access blocks that are valid only for you because you have not checked what you have done in the current session. rows is the number of rows finally accessed by the result of executing the SQL statement.

상기 SQL 출력 모듈(150)은 상기 SQL 정렬 모듈(140)에서 정렬된 SQL들을 사용자에게 제공하기 위하여 출력수단을 통해 출력한다. 출력은 화면이나 디스플레이 수단으로 할 수도 있고, 파일로 저장할 수도 있다. 또한, 출력될 SQL의 수를 사용자가 원하는 만큼 설정할 수 있다. The SQL output module 150 outputs through the output means to provide the SQL sorted by the SQL sort module 140 to the user. The output can be on screen, display means, or saved to a file. In addition, you can set the number of SQL to be output as you want.

다음으로, 상기의 모듈들을 구동하는 주변장치는 사용자 인터페이스(160), 제어 모듈(170), 입/출력 장치(180), 메모리(190) 등을 포함한다. 상기 사용자 인터페이스(160)는 상기 각 모듈들에서 필요로 하는 정보를 사용자로부터 입력받을 수 있게 하는 수단이다. 상기 제어 모듈(170)은 각 모듈들 사이나, 모듈과 주변장치 사이에서 이루어지는 동작을 제어하는 수단이다. 상기 입/출력 장치(180)는 DBMS와 데이터를 통신하는 수단이다. 상기 메모리(190)는 정렬된 SQL들을 임시로 저장하고 모듈들과 장치의 정보들이 저장되는 수단이다. Next, the peripheral device for driving the modules includes a user interface 160, a control module 170, an input / output device 180, a memory 190, and the like. The user interface 160 is a means for receiving information required by each module from a user. The control module 170 is a means for controlling the operation between each module, or between the module and the peripheral device. The input / output device 180 is a means for communicating data with a DBMS. The memory 190 is a means for temporarily storing sorted SQLs and storing information of modules and devices.

그러면 본 발명의 일 실시예에 따른 SQL Trace 분석 방법을 설명하기로 한다. 도 3은 본 발명의 일 실시예에 따른 SQL Trace 분석 방법의 절차를 도시하는 순서도이다. Next, an SQL trace analysis method according to an embodiment of the present invention will be described. 3 is a flowchart illustrating a procedure of an SQL trace analysis method according to an embodiment of the present invention.

도 3을 참조하면, 본 발명에 따른 SQL Trace 분석 방법은, 먼저 DBMS 내에서 이루어지는 SQL이나 트랜잭션 등의 실행정보를 기록한다. 이 중 DBMS에서 수행되는 SQL에 관한 실행통계정보들을 기록하여 SQL Trace 파일을 생성한다. 이 과정은 상기 DBMS에서 Trace 생성 기능을 제공할 경우에는 생략이 가능하다.(단계 S10) Referring to FIG. 3, the SQL Trace analysis method according to the present invention first records execution information such as SQL or transactions performed in a DBMS. Among them, SQL trace file is created by recording execution statistics information about SQL executed in DBMS. This process can be omitted if the DBMS provides a trace generation function (step S10).

관리자가 DBMS를 튜닝하거나 점검하고자 할 시에 상기 SQL Trace 파일을 분석하게 되는데, 관리자로부터 분석 시작 신호가 수신되면 분석 절차가 진행된다. 분석 시작 신호가 없을 경우에는 상기 단계 S10의 Trace 파일 생성 과정이 반복되어 진행된다.(단계 S20) When the administrator tries to tune or check the DBMS, the SQL Trace file is analyzed. When the analysis start signal is received from the administrator, the analysis process is performed. If there is no analysis start signal, the trace file generation process of step S10 is repeated and proceeds (step S20).

분석이 시작되면 처음으로 분석할 대상을 선택하는 절차가 진행된다. 이때에는 관리자 또는 사용자로부터 상기 단계 S10에서 생성되거나 또는 미리 준비된 다 수의 SQL Trace 파일들 중에서 분석하고자 하는 파일들을 선택받는다. 일정 폴더나 디렉터리에 포함된 모든 SQL Trace 파일들로 선택받을 수도 있고, 개별적으로 파일들을 선택받을 수도 있다.(단계 S30) When the analysis begins, the first step is to select the object to be analyzed. In this case, a file to be analyzed is selected from a plurality of SQL trace files generated in step S10 or prepared in advance by an administrator or a user. All SQL Trace files included in a certain folder or directory may be selected, or files may be individually selected (step S30).

분석할 대상인 SQL Trace 파일들이 선정된 다음에는 분석하기 용이한 형태로 파일들을 변환하는 작업을 수행하게 된다. 상기 SQL Trace 파일은 로우 데이터 파일이므로 이를 가공하기 용이한 형태(예를 들어, 텍스트 파일)로 변환하는 중간 과정을 거치게 된다. 이때에는 상기 단계 S30에서 선정된 모든 파일이 순차적으로 또는 동시에 변환된다. 로우 데이터 파일인 SQL Trace 파일이 직접 다른 포맷으로 변환될 수도 있고, SQL Trace 파일은 유지하고 이를 참조하여 변환된 포맷의 새로운 파일을 생성하는 것도 가능하다. 이렇게 분석 가능한 형태의 포맷으로는 SQL prf 포맷을 예로 들 수 있다. 또한, TKPROF 유틸리티 툴을 이용하여 변환 작업을 수행할 수도 있다.(단계 S40) After the SQL trace files to be analyzed are selected, the files are converted into a form that is easy to analyze. Since the SQL trace file is a raw data file, an intermediate process of converting the SQL trace file into an easy form (for example, a text file) is performed. At this time, all the files selected in step S30 are converted sequentially or simultaneously. The raw data file, the SQL Trace file, can be converted directly to another format, or the SQL Trace file can be maintained and referenced to create a new file in the converted format. The format that can be analyzed is, for example, the SQL prf format. In addition, the conversion operation may be performed using the TKPROF utility tool (step S40).

상기 단계 S40의 과정을 거친 후 생성된 파일들은 내부의 분석 과정을 거치고 SQL들을 분리하고 추출하는 작업을 수행한다. 이때 역시, 다수의 분석 대상 파일들을 모두 분석하여 내부에 포함된 다수의 SQL을 추출하게 된다. 이렇게 추출된 모든 SQL들은 다음의 절차를 위하여 임시 저장소에 보관된다. 또한, 다른 실시예로는 상기 단계 S30 이후에 선정된 로우 데이터 파일들을 직접 분석하여 SQL을 분리 추출할 수도 있다. 이 경우에는 상기 단계 S40이 생략될 수도 있다.(단계 S50) The files generated after the process of step S40 undergo an internal analysis process to separate and extract SQLs. In this case, the plurality of analysis files are analyzed to extract a plurality of SQLs included therein. All extracted SQLs are stored in temporary storage for the following procedure. In another embodiment, SQL may be extracted by directly analyzing the row data files selected after step S30. In this case, step S40 may be omitted (step S50).

상기 추출된 모든 SQL들은 소정의 기준에 따라 내림차순 또는 오름차순 또는 사용자로부터 입력받은 규칙에 의하여 정렬하는 작업을 수행한다. 이때 정렬되는 SQL들은 상기 분석 대상으로 선정된 다수의 SQL Trace 파일들 각각에 포함된 다수의 SQL들이 총 나열된다. 또한, 상기 정렬 작업 전에는 정렬의 기준이 될 항목을 설정하는 단계를 거치는데, 이 기준 항목의 설정은 사용자가 직접 정할 수도 있고 미리 설정될 수도 있다. 이때에는 사용자로부터 정렬할 기준 항목을 입력받거나, 선택할 수 있는 기준 항목들의 목록을 제공한 뒤에 사용자로부터 선택받아서 항목을 설정할 수 있다. 상기 정렬의 기준이 될 수 있는 항목들은 앞서 설명한바 있으므로 생략하기로 한다.(단계 S60, S70) All of the extracted SQLs are sorted according to a predetermined criterion in descending or ascending order or by a rule input from a user. In this case, the sorted SQLs are listed in total in a plurality of SQLs included in each of the plurality of SQL trace files selected for analysis. In addition, before the sorting operation, a step of setting an item to be a reference for sorting is performed, and the setting of the reference item may be directly set by the user or may be preset. In this case, the user may input a reference item to be sorted from the user or provide a list of selectable reference items, and then select the user to set the item. Items that may be the basis of the alignment have been described above and will be omitted. (Steps S60 and S70)

이렇게 정렬된 SQL들은 디스플레이 수단을 통하여 출력되거나 분석 리포트 파일로 생성되어 사용자에게 제공되어 진다. 이때에도 출력되는 SQL들의 개수나 출력량을 상위부터 우선순위로 설정하여 출력을 제어할 수도 있다. 이렇게 제공된 SQL 분석 정보는 사용자로 하여금 DBMS 튜닝 작업이나 점검 작업시에 유용하게 이용할 수 있도록 도와준다.(단계 S80) The sorted SQLs are outputted through display means or generated as analysis report files and provided to the user. In this case, the output can also be controlled by setting the number or output amounts of SQL to be output from the top. The provided SQL analysis information helps the user to use it usefully during DBMS tuning work or check work (step S80).

상술한 바와 같은 본 발명의 방법은 프로그램으로 구현되어 컴퓨터로 읽을 수 있는 형태로 기록매체(시디롬, 램, 롬, 플로피 디스크, 하드 디스크, 광자기 디스크 등)에 저장될 수 있다. 이러한 과정은 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자가 용이하게 실시할 수 있으므로 더 이상 상세히 설명하지 않기로 한다. The method of the present invention as described above may be implemented as a program and stored in a recording medium (CD-ROM, RAM, ROM, floppy disk, hard disk, magneto-optical disk, etc.) in a computer-readable form. Since this process can be easily implemented by those skilled in the art will not be described in more detail.

본 명세서 및 청구범위에 사용된 용어나 단어는 통상적이거나 사전적인 의미로 한정해서 해석되어서는 아니 되며, 발명자는 그 자신의 발명을 가장 최선의 방법으로 설명하기 위해 용어의 개념을 적절하게 정의할 수 있다는 원칙에 입각하여 본 발명의 기술적 사상에 부합하는 의미와 개념으로 해석되어야만 한다. The terms or words used in this specification and claims are not to be construed as limiting in their usual or dictionary meanings, and the inventors may appropriately define the concept of terms in order to best explain their invention in the best way possible. It should be interpreted as meaning and concept corresponding to the technical idea of the present invention based on the principle that the present invention.

따라서, 본 명세서에 기재된 실시예와 도면에 도시된 구성은 본 발명의 가장 바람직한 일 실시예에 불과할 뿐이고 본 발명의 기술적 사상을 모두 대변하는 것은 아니므로, 본 출원시점에 있어서 이들을 대체할 수 있는 다양한 균등물과 변형예들이 있을 수 있음을 이해하여야 한다. Therefore, the embodiments described in the specification and the drawings shown in the drawings are only the most preferred embodiment of the present invention and do not represent all of the technical idea of the present invention, various modifications that can be replaced at the time of the present application It should be understood that there may be equivalents and variations.

본 발명에 따른 SQL Trace 분석 장치 및 방법은, 실제 DBMS 튜닝 작업을 위해 분석해야 하는 많은 수의 SQL Trace 파일을 한꺼번에 일괄하여 처리하여 기존의 분석 작업보다 신속하게 분석할 수 있는 효과를 제공한다. 따라서 빠르고 신속한 튜닝 작업이 가능하여 보다 높은 품질의 데이터베이스 서비스를 제공할 수 있게 한다. The apparatus and method for analyzing SQL traces according to the present invention provides an effect of analyzing a large number of SQL Trace files that need to be analyzed for actual DBMS tuning at once and analyzing them more quickly than existing analysis tasks. This allows for fast and fast tuning, providing a higher quality database service.

또한, 다수의 SQL Trace 파일에 포함된 다수의 SQL을 모두 추출하여 모든 SQL들을 통합 분석 처리할 수 있으므로 하나씩 분석 처리할 때보다 정확하고 신속한 분석을 할 수 있는 효과를 제공한다. In addition, all the SQLs included in the multiple SQL Trace files can be extracted and all the SQLs can be integratedly analyzed, thus providing a more accurate and faster analysis than analyzing them one by one.

Claims (16)

데이터베이스 관리 시스템(DBMS)의 품질향상을 위한 튜닝(Tuning) 과정에서 구조화 질의어(이하, SQL)문의 문제점을 파악하기 위하여 SQL문의 실행통계를 세션(Session)별로 수집하여 생성된 실행경로(Trace) 정보를 포함하는 로우(raw) 데이터 파일인 SQL Trace 파일을 분석하는 방법으로서, Execution path information generated by collecting execution statistics of SQL statements by session to identify problems with structured query (hereinafter, SQL) statements during the tuning process for improving the quality of database management systems (DBMS) A method of analyzing a SQL Trace file, which is a raw data file containing (a) 분석의 대상이 되는 다수의 SQL Trace 파일에 각각 포함된 다수의 SQL문을 분리하고 추출하는 단계; 및 (a) separating and extracting a plurality of SQL statements each included in the plurality of SQL Trace files to be analyzed; And (b) 상기 추출된 다수의 SQL문을 소정의 기준에 따라 정렬하는 단계;를 포함하는 대량의 SQL Trace 분석 방법. and (b) sorting the extracted plurality of SQL statements according to a predetermined criterion. 제 1 항에 있어서, The method of claim 1, 상기 단계 (a)는, Step (a) is, (1) 분석의 대상이 되는 다수의 SQL Trace 파일을 정형화된 포맷의 분석 가능한 형태로 변경하는 단계; 및 (1) changing a plurality of SQL Trace files to be analyzed into a format that can be analyzed in a standardized format; And (2) 상기 변경된 다수의 파일을 분석하여 각 파일에 포함된 다수의 SQL문을 분리하고 추출하는 단계;를 포함하는 것을 특징으로 하는 대량의 SQL Trace 분석 방법. (2) analyzing and analyzing the plurality of modified files to separate and extract a plurality of SQL statements included in each file. 제 1 항 또는 제 2 항에 있어서, The method according to claim 1 or 2, 상기 단계 (a) 이전에 다수의 세션별로 SQL Trace 파일을 생성하는 단계를 더 포함하는 것을 특징으로 하는 대량의 SQL Trace 분석 방법. Before the step (a) further comprises the step of generating a SQL trace file for each of a plurality of sessions. 제 1 항 또는 제 2 항에 있어서, The method according to claim 1 or 2, 상기 단계 (b) 이후에 상기 정렬된 SQL문을 출력하는 단계를 더 포함하는 것을 특징으로 하는 대량의 SQL Trace 분석 방법. And outputting the sorted SQL statement after step (b). 제 1 항 또는 제 2 항에 있어서, The method according to claim 1 or 2, 상기 단계 (b)는 사용자의 요청에 따라 상기 추출된 다수의 SQL문의 실행통계 중에 원하는 항목을 기준으로 SQL문들을 정렬하는 것을 특징으로 하는 대량의 SQL Trace 분석 방법. The step (b) is a large amount of SQL trace analysis method, characterized in that to sort the SQL statements based on the desired item among the execution statistics of the extracted plurality of SQL statements according to the user's request. 제 5 항에 있어서, The method of claim 5, 기준 항목의 값을 근거하여 오름차순 또는 내림차순 또는 사용자가 원하는 규칙으로 정렬하는 것을 특징으로 하는 대량의 SQL Trace 분석 방법. A large SQL Trace analysis method characterized by sorting in ascending or descending order or a rule desired by the user based on the value of a reference item. 제 5 항에 있어서, The method of claim 5, 상기 기준 항목은 SQL 분석(Parsing), SQL 실행(Execute), SQL 호출(Fetch) 명령에 관한 수행 회수, CPU 타임, 총 경과시간, 디스크(물리적) 또는 메모리(논리적)의 읽기를 수행한 회수, 추출된 로우(Row)의 수, 라이브러리 캐쉬 미스(miss) 수 및 이들의 조합으로 이루어진 것 중에 하나인 것을 특징으로 하는 대량의 SQL Trace 분석 방법. The criteria items include the number of executions related to SQL Parsing, Execute SQL, Fetch command, CPU time, total elapsed time, the number of times a disk (physical) or memory (logical) has been read, A method of analyzing a large amount of SQL Traces, characterized in that it is one of the number of extracted rows, the number of library cache misses, and a combination thereof. 제 4 항에 있어서, The method of claim 4, wherein 사용자에 의하여 설정된 개수만큼 상기 정렬된 SQL문을 우선 순위부터 차례로 출력하는 것을 특징으로 하는 대량의 SQL Trace 분석 방법. A method for analyzing a large amount of SQL traces, characterized in that for outputting the sorted SQL statements in order of priority by the number set by the user. 제 2 항에 있어서, The method of claim 2, 상기 단계 (1)은 로우 데이터 파일인 SQL Trace 파일을 분석 가능한 텍스트 형태의 SQL prf 포맷으로 변경하는 것을 특징으로 하는 SQL Trace 분석 방법. Step (1) is a SQL Trace analysis method, characterized in that for changing the SQL trace file of the raw data file to the SQL prf format of the text that can be analyzed. 제 9 항에 있어서, The method of claim 9, 상기 SQL prf 포맷으로 변경시는 TKPROF 유틸리티 툴을 이용하는 것을 특징으로 하는 대량의 SQL Trace 분석 방법. A large SQL Trace analysis method characterized by using the TKPROF utility tool when changing to the SQL prf format. 데이터베이스 관리 시스템(DBMS)의 품질향상을 위한 튜닝(Tuning) 과정에서 SQL문의 문제점을 파악하기 위하여 SQL문의 실행통계를 세션(Session)별로 수집하여 생성된 실행경로(Trace) 정보를 포함하는 로우(raw) 데이터 파일인 SQL Trace 파일을 분석하는 장치로서, Raw containing execution information generated by collecting execution statistics of SQL statements for each session in order to identify problems with SQL statements in the tuning process for improving the quality of the database management system (DBMS). ) A device that analyzes a SQL trace file, a data file. 분석의 대상이 되는 다수의 SQL Trace 파일들을 참조하여 각각의 파일에 포 함된 다수의 SQL문을 분리하고 추출하는 수단; 및 Means for separating and extracting a plurality of SQL statements included in each file by referring to the plurality of SQL Trace files to be analyzed; And 상기 추출된 다수의 SQL문을 소정의 기준에 따라 정렬하는 수단;을 포함하는 대량의 SQL Trace 분석 장치. And a means for sorting the extracted plurality of SQL statements according to a predetermined criterion. 제 11 항에 있어서, The method of claim 11, 상기 추출하는 수단은, The means for extracting, 분석의 대상이 되는 다수의 SQL Trace 파일을 정형화된 포맷의 분석 가능한 형태로 변경하는 수단; 및 Means for converting a plurality of SQL Trace files to be analyzed into a format that can be analyzed in a standardized format; And 상기 변경된 다수의 파일을 분석하여 각 파일에 포함된 다수의 SQL문을 분리하고 추출하는 수단;을 포함하는 것을 특징으로 하는 대량의 SQL Trace 분석 장치. And a means for separating and extracting a plurality of SQL statements included in each file by analyzing the changed plurality of files. 제 11 항 또는 제 12 항에 있어서, 13. The method according to claim 11 or 12, 상기 데이터베이스 관리 시스템에서 다수의 세션별로 SQL Trace 파일을 생성하는 수단을 더 포함하는 것을 특징으로 하는 대량의 SQL Trace 분석 장치. And a means for generating a SQL trace file for each of a plurality of sessions in the database management system. 제 11 항 또는 제 12 항에 있어서, 13. The method according to claim 11 or 12, 상기 정렬하는 수단에서 정렬된 SQL문을 출력하는 수단을 더 포함하는 것을 특징으로 하는 대량의 SQL Trace 분석 장치. And a means for outputting the sorted SQL statements in the sorting means. 제 11 항 또는 제 12 항에 있어서, 13. The method according to claim 11 or 12, 상기 정렬하는 수단은 사용자의 요청에 따라 상기 추출된 다수의 SQL문의 실행통계 중에 원하는 항목을 기준으로 SQL문들을 정렬하는 것을 특징으로 하는 대량의 SQL Trace 분석 장치. And the sorting means sorts the SQL statements based on a desired item among execution statistics of the extracted plurality of SQL statements according to a user's request. 데이터베이스 관리 시스템(DBMS)의 품질향상을 위한 튜닝(Tuning) 과정에서 SQL문의 문제점을 파악하기 위하여 SQL문의 실행통계를 세션(Session)별로 수집하여 생성된 실행경로(Trace) 정보를 포함하는 로우(raw) 데이터 파일인 SQL Trace 파일을 분석하는 프로그램이 기록된 기록매체로서, Raw containing execution information generated by collecting execution statistics of SQL statements for each session in order to identify problems with SQL statements in the tuning process for improving the quality of the database management system (DBMS). ) A recording medium that records a program that analyzes a SQL trace file, a data file. 분석의 대상이 되는 다수의 SQL Trace 파일을 정형화된 포맷의 분석 가능한 형태로 변경하는 절차와, A process of changing a plurality of SQL Trace files to be analyzed into a format that can be analyzed in a standard format; 상기 변경된 다수의 파일을 분석하여 각 파일에 포함된 다수의 SQL문을 분리하고 추출하는 절차, 및 Analyzing a plurality of changed files to separate and extract a plurality of SQL statements included in each file, and 상기 추출된 다수의 SQL문을 소정의 기준에 따라 정렬하는 절차를 실행하는 컴퓨터로 판독 가능한 프로그램을 기록한 기록매체. And a computer-readable program for recording a computer-readable program for executing the procedure of sorting the extracted plurality of SQL statements according to predetermined criteria.
KR1020060035711A 2006-04-20 2006-04-20 Method and apparatus for analyzing SQL Trace in DataBase Management System KR101136457B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020060035711A KR101136457B1 (en) 2006-04-20 2006-04-20 Method and apparatus for analyzing SQL Trace in DataBase Management System

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020060035711A KR101136457B1 (en) 2006-04-20 2006-04-20 Method and apparatus for analyzing SQL Trace in DataBase Management System

Publications (2)

Publication Number Publication Date
KR20070103850A KR20070103850A (en) 2007-10-25
KR101136457B1 true KR101136457B1 (en) 2012-04-19

Family

ID=38818057

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020060035711A KR101136457B1 (en) 2006-04-20 2006-04-20 Method and apparatus for analyzing SQL Trace in DataBase Management System

Country Status (1)

Country Link
KR (1) KR101136457B1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9182947B2 (en) 2013-06-06 2015-11-10 International Business Machines Corporation Program source code navigation
KR101710445B1 (en) 2016-03-02 2017-02-27 (주)로직소프트 Apparatus for assembling and verifying update sentences
KR20190076826A (en) * 2017-12-22 2019-07-02 주식회사 웨어밸리 Automation of sql tuning method and system using statistic sql pattern analysis

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101845208B1 (en) * 2017-12-28 2018-04-03 최영철 Performance Improving Method Based Web for Database and Application
KR102240496B1 (en) * 2020-04-17 2021-04-15 주식회사 한국정보기술단 Data quality management system and method
KR20230138074A (en) 2022-03-23 2023-10-05 배재대학교 산학협력단 Method and apparatus for managing data quality of academic information system using data profiling

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20020033223A (en) * 2000-10-30 2002-05-06 구자홍 Coordinated manipulation method of structured query language between database management systems
KR20030013656A (en) * 2001-08-08 2003-02-15 한국전자통신연구원 Dynamic query language tuning system and method
KR20030056121A (en) * 2001-12-27 2003-07-04 삼성에스디에스 주식회사 Method for managing the efficiency of the database

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20020033223A (en) * 2000-10-30 2002-05-06 구자홍 Coordinated manipulation method of structured query language between database management systems
KR20030013656A (en) * 2001-08-08 2003-02-15 한국전자통신연구원 Dynamic query language tuning system and method
KR20030056121A (en) * 2001-12-27 2003-07-04 삼성에스디에스 주식회사 Method for managing the efficiency of the database

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9182947B2 (en) 2013-06-06 2015-11-10 International Business Machines Corporation Program source code navigation
KR101710445B1 (en) 2016-03-02 2017-02-27 (주)로직소프트 Apparatus for assembling and verifying update sentences
KR20190076826A (en) * 2017-12-22 2019-07-02 주식회사 웨어밸리 Automation of sql tuning method and system using statistic sql pattern analysis
KR102127272B1 (en) * 2017-12-22 2020-06-29 주식회사 웨어밸리 Automation of sql tuning method and system using statistic sql pattern analysis

Also Published As

Publication number Publication date
KR20070103850A (en) 2007-10-25

Similar Documents

Publication Publication Date Title
US11436213B1 (en) Analysis of database query logs
US11899666B2 (en) System and method for dynamic database split generation in a massively parallel or distributed database environment
US7809694B2 (en) Analysis of performance data from a relational database system for applications using stored procedures or SQL
US7287034B2 (en) On-demand multi-version data dictionary to support distributed applications
US6938035B2 (en) Reduce database monitor workload by employing predictive query threshold
US6801903B2 (en) Collecting statistics in a database system
US11294869B1 (en) Expressing complexity of migration to a database candidate
US10528596B2 (en) System and method for consistent reads between tasks in a massively parallel or distributed database environment
US11544268B2 (en) System and method for generating size-based splits in a massively parallel or distributed database environment
US7174345B2 (en) Methods and systems for auto-partitioning of schema objects
US7877378B2 (en) System and method for consolidating execution information relatin to execution of instructions by a database management system
US9563660B2 (en) Coalescing operation for query processing
US20080140627A1 (en) Method and apparatus for aggregating database runtime information and analyzing application performance
US8626729B2 (en) Database index monitoring system
US10078684B2 (en) System and method for query processing with table-level predicate pushdown in a massively parallel or distributed database environment
WO2017183065A1 (en) Device and method for tuning relational database
KR101136457B1 (en) Method and apparatus for analyzing SQL Trace in DataBase Management System
US9734177B2 (en) Index merge ordering
US7236993B2 (en) On-demand multi-version denormalized data dictionary to support log-based applications
KR101544560B1 (en) An online analytical processing system for big data by caching the results and generating 2-level queries by SQL parsing
US11354313B2 (en) Transforming a user-defined table function to a derived table in a database management system
US10042942B2 (en) Transforms using column dictionaries
JP2023152910A (en) Computer-implemented method, computer program and system (utilizing structured audit log for improving accuracy and efficiency of database auditing)
KR20010056171A (en) Apparatus and method for searching pattern matching information in information searching system
Pearl et al. Much Ado About Indexes

Legal Events

Date Code Title Description
N231 Notification of change of applicant
A201 Request for examination
E701 Decision to grant or registration of patent right
GRNT Written decision to grant
LAPS Lapse due to unpaid annual fee