JP2016009225A - Database management device, database management method, program, and recording medium - Google Patents

Database management device, database management method, program, and recording medium Download PDF

Info

Publication number
JP2016009225A
JP2016009225A JP2014127831A JP2014127831A JP2016009225A JP 2016009225 A JP2016009225 A JP 2016009225A JP 2014127831 A JP2014127831 A JP 2014127831A JP 2014127831 A JP2014127831 A JP 2014127831A JP 2016009225 A JP2016009225 A JP 2016009225A
Authority
JP
Japan
Prior art keywords
execution plan
database server
resource usage
database
sql
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
JP2014127831A
Other languages
Japanese (ja)
Inventor
祥太郎 山田
Shotaro Yamada
祥太郎 山田
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.)
Canon Marketing Japan Inc
Canon IT Solutions Inc
Original Assignee
Canon Marketing Japan Inc
Canon IT Solutions Inc
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 Canon Marketing Japan Inc, Canon IT Solutions Inc filed Critical Canon Marketing Japan Inc
Priority to JP2014127831A priority Critical patent/JP2016009225A/en
Publication of JP2016009225A publication Critical patent/JP2016009225A/en
Pending legal-status Critical Current

Links

Images

Abstract

PROBLEM TO BE SOLVED: To perform control to, when the delay of processing time occurs due to a new execution plan, return the execution plan to an execution plan processed during past normal time, and to process the execution plan in at least processing time close to the past normal time.SOLUTION: A database management device 100 for storing a predetermined value for determining that the resource usage amount of a database server 102 is abnormal is configured to transmit an input SQL sentence to the database server, and to acquire the resource usage amount of the database server, and to receive an execution plan to be processed correspondingly to the SQL sentence from the database server, and to store the execution plan which has ended with the resource usage amount of the database server which does not exceed the predetermined threshold in association with the SQL sentence as an execution plan during normal time, and to, when the resource usage amount of the database server exceeds the predetermined threshold, compare the received execution plan with the execution plan during normal time, and to transmit the execution plan during normal time to the database server to process the SQL sentence.

Description

本発明は、データベース管理装置に関し、特にデータベースの処理速度を向上させることができるデータベース管理装置に関する。   The present invention relates to a database management apparatus, and more particularly to a database management apparatus that can improve the processing speed of a database.

データベースシステムにおいてクエリ文が処理される場合、処理時間を早めるため、テーブル結合や条件処理を最適と判断された順序で実行するための実行計画というものが利用される。通常、データベースシステムが動的に実行計画を決定し、処理が高速に行われるように調整している。   When a query statement is processed in the database system, an execution plan for executing table joins and condition processing in the order determined to be optimal is used in order to speed up the processing time. Usually, the database system dynamically determines an execution plan and adjusts so that processing is performed at high speed.

実行計画の調整には、対象テーブルのデータ件数などの表統計情報、インデックスのリーフブロック、リーフの深さなどの索引統計情報などの情報を元にデータベースシステムが自動的に判定している。   The adjustment of the execution plan is automatically determined by the database system based on information such as table statistical information such as the number of data in the target table, index statistical information such as index leaf blocks and leaf depth.

しかし、以前に入力された第1クエリ文と完全に同一である第2クエリ文、または、特定の条件、例えばパラメータのみが異なる第2クエリ文が入力される場合、第2クエリ文に対する実行計画は第1クエリ文に対する実行計画と殆ど同一であるにもかかわらず、従来のDBMSは、第2クエリ文に対する実行計画を再度生成するので、システム運用の効率性が低下するという課題があった。   However, when a second query statement that is completely identical to the previously input first query statement or a second query statement that differs only in specific conditions, for example, parameters, is input, an execution plan for the second query statement Is almost the same as the execution plan for the first query statement, but the conventional DBMS regenerates the execution plan for the second query statement, which causes a problem that the efficiency of system operation is reduced.

上記課題を解決するため、特許文献1には、過去に実行したクエリ文をメモリに格納しておき、新たなクエリ文と過去のクエリ文とがマッチングすれば、過去の特定のクエリ文を利用して新たなクエリ文の実行計画を生成し、メモリ資源の効率化、システム速度の向上を図るデータベース管理方法が提案されている。   In order to solve the above problems, Patent Document 1 stores a query sentence executed in the past in a memory, and if a new query sentence and a past query sentence match, a past specific query sentence is used. Thus, a database management method for generating an execution plan for a new query statement to improve the efficiency of memory resources and the system speed has been proposed.

特表2012−524930Special table 2012-524930

しかしながら、特許文献1のデータベース管理方法であっても、実行計画によっては著しく遅い実行計画が採用されるケースが発生することがある。たとえば、データベースソフトを作成しているソフトウェアベンダが仕様を変更して、生成される実行計画の方針が変更された場合、クエリ文の実行が極端に遅くなる例は少なくない。   However, even with the database management method disclosed in Patent Document 1, a case where an extremely slow execution plan is adopted may occur depending on the execution plan. For example, when a software vendor that creates database software changes specifications and the policy of the generated execution plan is changed, there are many examples in which the execution of a query statement becomes extremely slow.

また、通常時のデータベースシステムであれば、クエリ文の処理が遅延した段階で管理者がヒント句を使用して実行計画を変更する処理を行えるが、夜間のバッチ処理などの場合、遅延が生じた段階で管理者を呼んで対応しなければならず、遅延の影響が大きくなってしまう。   In addition, in a normal database system, the administrator can change the execution plan using hint phrases when the query processing is delayed. However, in the case of nighttime batch processing, there is a delay. At this stage, an administrator must be called to deal with it, and the effect of delay will increase.

本発明は、上記問題を解決するためになされたものであり、過去に正常な時間で処理された実行計画を記憶しておき、新たな実行計画により処理時間の遅延が生じた場合は、過去の正常な時間で処理した実行計画に戻して、少なくとも過去の正常な時間に近い処理時間で処理できるように制御することを目的とする。   The present invention has been made in order to solve the above problem, and stores an execution plan processed in a normal time in the past, and if a delay in processing time occurs due to a new execution plan, the past It is an object of the present invention to return to the execution plan processed in the normal time and control the processing so that the processing can be performed in the processing time close to the past normal time.

本発明は、データベースサーバと接続可能なデータベース管理装置であって、入力されたSQL文を前記データベースサーバに送信する送信手段と、前記データベースサーバのリソース使用量を取得するリソース使用量取得手段と、前記データベースサーバから、前記入力されたSQL文に対応して処理される実行計画を受信する実行計画受信手段と、前記データベースサーバのリソース使用量が異常であると判断する所定の閾値を記憶する閾値記憶手段と、前記リソース使用量取得手段により取得された前記データベースサーバのリソース使用量が、前記閾値記憶手段に記憶された所定の閾値を超えているかを判断する判断手段と、前記閾値記憶手段で記憶された所定の閾値を超えないリソース使用量で終了したデータベースサーバの実行計画を、前記入力されたSQL文と紐付けて記憶する正常時実行計画記憶手段と、前記判断手段で前記データベースサーバのリソース使用量が、前記閾値記憶手段に記憶された所定の閾値を超えている場合、前記実行計画受信手段で受信した実行計画と、前記正常時実行計画記憶手段で記憶した実行計画とを比較する比較手段と、前記比較手段による比較結果により、前記入力されたSQL文に紐付けられた前記正常時実行計画で該入力されたSQL文を処理するよう、前記データベースサーバに該正常時実行計画を送信する正常時実行計画送信手段とを有する。   The present invention is a database management device connectable to a database server, a transmission means for transmitting an inputted SQL sentence to the database server, a resource usage acquisition means for acquiring a resource usage of the database server, An execution plan receiving means for receiving an execution plan processed in response to the input SQL statement from the database server, and a threshold for storing a predetermined threshold for determining that the resource usage of the database server is abnormal A storage unit; a determination unit that determines whether the resource usage of the database server acquired by the resource usage acquisition unit exceeds a predetermined threshold stored in the threshold storage unit; and the threshold storage unit Execution of a database server terminated with a resource usage that does not exceed the stored threshold A normal execution plan storage unit that stores the image in association with the input SQL statement, and the resource usage of the database server exceeds the predetermined threshold stored in the threshold storage unit in the determination unit The execution plan received by the execution plan receiving means and a comparison means for comparing the execution plan stored in the normal execution plan storage means; A normal execution plan transmission means for transmitting the normal execution plan to the database server so as to process the inputted SQL statement in the associated normal execution plan.

本発明によれば、過去に正常な時間で処理された実行計画を記憶しておき、新たな実行計画により処理時間の遅延が生じた場合は、過去の正常な時間で処理した実行計画に戻して、少なくとも過去の正常な時間に近い処理時間で処理できる効果を有する。   According to the present invention, an execution plan processed in a normal time in the past is stored, and when a delay in processing time occurs due to a new execution plan, the execution plan processed in the past normal time is restored. Thus, there is an effect that processing can be performed in a processing time that is at least close to a past normal time.

本発明の実施形態のデータベース管理システムの構成を示すシステム構成図である。It is a system configuration figure showing the composition of the database management system of the embodiment of the present invention. 本発明の実施形態の各種端末のハードウエア構成を示す図である。It is a figure which shows the hardware constitutions of the various terminals of embodiment of this invention. 本発明の実施形態のデータベース管理システムのソフトウェア構成を示すブロック図である。It is a block diagram which shows the software structure of the database management system of embodiment of this invention. 本発明の実施形態のデータベース管理システムにおける処理の流れを示す模式図である。It is a schematic diagram which shows the flow of a process in the database management system of embodiment of this invention. 本発明の実施形態のデータベース管理システムにおける処理の流れを示す模式図である。It is a schematic diagram which shows the flow of a process in the database management system of embodiment of this invention. 本発明の実施形態のデータベース管理システムにおける処理の流れを示す模式図である。It is a schematic diagram which shows the flow of a process in the database management system of embodiment of this invention. 本発明の実施形態のデータベース管理システムにおける処理の流れを示す模式図である。It is a schematic diagram which shows the flow of a process in the database management system of embodiment of this invention. 本発明の実施形態のデータベース管理装置に記憶される遅延管理する対象のSQL文の一例を示すデータ構成である。It is a data structure which shows an example of the SQL sentence of the object of delay management memorize | stored in the database management apparatus of embodiment of this invention. 本発明の実施形態のデータベース管理装置に記憶されるSQLIDと遅延管理するリソースや処理時間の一例を示すデータ構成である。It is a data structure which shows an example of SQLID memorize | stored in the database management apparatus of embodiment of this invention, the resource which carries out delay management, and processing time. 本発明の実施形態のデータベース管理装置において、登録される実行計画の一例を示すデータ構成である。In the database management device of an embodiment of the present invention, it is a data composition which shows an example of an execution plan registered. 本発明の実施形態のデータベース管理装置において、ヒント句の作成された一例を示す図である。It is a figure which shows an example in which the hint phrase was produced in the database management apparatus of embodiment of this invention. 本発明の実施形態のデータベース管理装置において、ヒント句を適用されて作成される新実行SQLの元になるSQL文の一例を示す図である。It is a figure which shows an example of the SQL sentence used as the origin of new execution SQL produced by applying a hint phrase in the database management apparatus of embodiment of this invention. 本発明に係るデータベース管理装置で読み取り(読み出し)可能な各種データ処理プログラムを格納する記録媒体(記憶媒体)のメモリマップを説明する図である。It is a figure explaining the memory map of the recording medium (storage medium) which stores the various data processing program which can be read (read) with the database management apparatus which concerns on this invention.

以下、本発明の好ましい実施の形態について図面を参照しながら詳細に説明する。   Hereinafter, preferred embodiments of the present invention will be described in detail with reference to the drawings.

図1は、本発明に係るデータベース管理システムの構成を示すシステム構成図である。   FIG. 1 is a system configuration diagram showing the configuration of a database management system according to the present invention.

図1において、データベース管理システムは、少なくとも1つのデータベースサーバ102とSQL文を送信する管理用クライアント101、およびバッチ処理を管理し実行計画の適不適を判断するデータベース管理装置とがネットワークを介して接続されている。   In FIG. 1, the database management system connects at least one database server 102, a management client 101 that transmits an SQL statement, and a database management apparatus that manages batch processing and determines the suitability of an execution plan via a network. Has been.

管理ユーザは、管理用クライアント101からデータベース管理装置100にバッチ処理などを定義し、夜間などにバッチ処理を実行させる。   The management user defines batch processing and the like from the management client 101 to the database management apparatus 100, and executes batch processing at night or the like.

データベース管理装置100は、管理ユーザからSQL文などのバッチ処理が入力され、そのSQL文をデータベースサーバ102に送信し、データベースサーバ102は、受信したSQL文などのバッチ処理を実行する。   The database management apparatus 100 receives a batch process such as an SQL sentence from the management user, transmits the SQL sentence to the database server 102, and the database server 102 executes the batch process such as the received SQL sentence.

夜間などにデータベースサーバ102で実行された処理結果は、翌朝などに一般ユーザがクライアント103などから取得する。   The processing result executed by the database server 102 at night or the like is acquired from the client 103 or the like by the general user the next morning or the like.

なお、データベース管理装置100は、データベースサーバ102と同一の筐体でも良いし、また、管理用クライアント101と同一の筐体でも良い。また、データベース管理装置100とデータベースサーバ102と管理用クライアント101は同一の筐体としても良い。   The database management apparatus 100 may be the same casing as the database server 102 or the same casing as the management client 101. Further, the database management apparatus 100, the database server 102, and the management client 101 may be the same casing.

図2は、本発明の実施形態の各種端末のハードウエア構成を示す図である。   FIG. 2 is a diagram showing a hardware configuration of various terminals according to the embodiment of the present invention.

図2において、CPU201は、システムバス204に接続される各デバイスを統括的に制御する。   In FIG. 2, the CPU 201 comprehensively controls each device connected to the system bus 204.

また、ROM203あるいは外部メモリ211には、CPU201の制御プログラムであるオペレーティングシステム(OS)や、各サーバあるいは各クライアントの後述する各種機能を実現するためのプログラムが記憶されている。   The ROM 203 or the external memory 211 stores an operating system (OS) that is a control program of the CPU 201 and programs for realizing various functions described later of each server or each client.

RAM202は、CPU201の主メモリ、ワークエリア、一時待避領域等として機能する。   The RAM 202 functions as a main memory, work area, temporary save area, and the like for the CPU 201.

入力コントローラ205は、入力部209からの入力を制御する。この入力部209としては、特に、サーバやクライアント等の端末では、キーボード、マウス等のポインティングデバイスが挙げられる。また、印刷装置等では、タッチパネル、ボタン、スイッチ等が挙げられる。   The input controller 205 controls input from the input unit 209. Examples of the input unit 209 include a pointing device such as a keyboard and a mouse in a terminal such as a server or a client. Moreover, in a printing apparatus etc., a touch panel, a button, a switch, etc. are mentioned.

出力コントローラ206は、出力部210の表示を制御する。この出力部210としては、例えば、CRTや液晶等が挙げられる。   The output controller 206 controls the display of the output unit 210. Examples of the output unit 210 include a CRT and a liquid crystal.

外部メモリコントローラ207は、ブートプログラム、各種のアプリケーション、フォントデータ、ユーザーファイル、編集ファイル、プリンタドライバ等を記憶する外部メモリ211へのアクセスを制御する。加えて、各サーバあるいは各クライアントの各種機能を実現するための各種テーブル、パラメータが記憶されている。この外部メモリ211としては、ハードディスク(HD)やフロッピー(登録商標)ディスク(FD)、PCMCIAカードスロットにアダプタを介して接続されるコンパクトフラッシュ(登録商標)、スマートメディア等が挙げられる。   The external memory controller 207 controls access to the external memory 211 that stores a boot program, various applications, font data, user files, edit files, printer drivers, and the like. In addition, various tables and parameters for realizing various functions of each server or each client are stored. Examples of the external memory 211 include a hard disk (HD), a floppy (registered trademark) disk (FD), a compact flash (registered trademark) connected to a PCMCIA card slot via an adapter, and smart media.

通信I/Fコントローラ208は、ネットワーク214を介して外部機器との通信制御処理を実行する。   The communication I / F controller 208 executes communication control processing with an external device via the network 214.

本発明を実現するためのプログラム212は外部メモリ211に記録されており、必要に応じてRAM202にロードされることによりCPU201によって実行されるものである。   A program 212 for realizing the present invention is recorded in the external memory 211 and is executed by the CPU 201 by being loaded into the RAM 202 as necessary.

図3は、本発明の実施形態のデータベース管理システムのソフトウェア構成を示すブロック図である。   FIG. 3 is a block diagram showing a software configuration of the database management system according to the embodiment of this invention.

データベース管理装置100は、管理用クライアント101の入力部からバッチ処理を受信し、データベース管理装置100のバッチ処理部301はデータベースの実行計画管理部303へバッチ処理のSQL文を送信する。SQL文を受信した実行計画管理部303は、そのSQL文が遅延管理する対象のSQL文かどうかを判断する。   The database management apparatus 100 receives the batch processing from the input unit of the management client 101, and the batch processing unit 301 of the database management apparatus 100 transmits the SQL statement of the batch processing to the database execution plan management unit 303. The execution plan management unit 303 that has received the SQL statement determines whether or not the SQL statement is an SQL statement to be subjected to delay management.

遅延管理する対象のSQL文である場合、SQL文をデータベースサーバ102に送信する。   If the SQL statement is a target of delay management, the SQL statement is transmitted to the database server 102.

データベースサーバ102は、受信したSQL文から、データベース処理部321が最適と考える実行計画を選択し、実行SQL(第1の実行SQL:以後旧実行SQLと呼ぶ)を生成して、旧実行SQLを実行する。   The database server 102 selects an execution plan that the database processing unit 321 considers optimal from the received SQL statement, generates an execution SQL (first execution SQL: hereinafter referred to as an old execution SQL), and converts the old execution SQL to Run.

旧実行SQLを開始すると、データベース管理装置100の実行計画管理部303は、旧実行SQL終了を条件として、データベースサーバ102のリソース情報(CPU処理時間、CPU使用率など)を取得し、それぞれのSQL文に対応した閾値をリソースが越えていないかを判断する。   When the old execution SQL is started, the execution plan management unit 303 of the database management apparatus 100 acquires the resource information (CPU processing time, CPU usage rate, etc.) of the database server 102 on the condition that the old execution SQL ends, and the respective SQLs. Judge whether the resource exceeds the threshold corresponding to the sentence.

実行計画管理部303は、データベースサーバのリソースが閾値を越えている場合は、処理の遅延が発生していると考えられるので、遅延リカバリ処理へと移行する。   If the resource of the database server exceeds the threshold value, the execution plan management unit 303 transitions to the delay recovery process because it is considered that a processing delay has occurred.

データベースサーバのリソースが閾値を越えないうちに処理を終えた場合は、旧実行SQLの実行計画をデータベースサーバ102から受信し、正常時の実行計画としてSQL文と紐付けて記憶しておく。   When the processing is completed before the resource of the database server exceeds the threshold value, the execution plan of the old execution SQL is received from the database server 102 and stored in association with the SQL statement as the normal execution plan.

一方、遅延リカバリ処理に移行すると、データベース管理装置100の実行計画管理部303は、SQL文に対応する正常時の実行計画を読み込み、また、データベースサーバ102から、旧実行SQLの実行計画を受信する。上記2つの実行計画を比較し、一致しているかどうかを判断する。   On the other hand, when the process proceeds to the delayed recovery process, the execution plan management unit 303 of the database management apparatus 100 reads the normal execution plan corresponding to the SQL statement and receives the execution plan of the old execution SQL from the database server 102. . The two execution plans are compared to determine whether they match.

上記判断が一致していない場合は、正常時の実行計画からヒント句を生成し、対象のSQL文にヒント句を付与した実行SQL(第2の実行SQL:以後新実行SQLと呼ぶ)を生成する。   If the above judgments do not match, a hint phrase is generated from the normal execution plan, and an execution SQL (second execution SQL: hereinafter referred to as a new execution SQL) with a hint phrase added to the target SQL statement is generated. To do.

次に、データベースサーバ102からリソース情報(CPU使用率やIOリソース使用率など)を取得し、現状のリソースの使用割合が大きい場合は、旧実行SQLを停止(ロールバックなど)し、新実行SQLを開始する。リソースの使用割合が大きい時に、新旧の実行SQLを同時に実行すると、処理がより遅くなるためである。   Next, resource information (CPU usage rate, IO resource usage rate, etc.) is acquired from the database server 102. If the current resource usage rate is large, the old execution SQL is stopped (rollback, etc.), and the new execution SQL is executed. To start. This is because the processing becomes slower if the old and new execution SQLs are executed simultaneously when the resource usage rate is large.

また、生成した新実行SQLが更新系のSQL文(delete、update、insertなど)の場合にも、旧実行SQLを停止(ロールバックなど)し、新実行SQLを開始する。更新系のSQL文の場合、データのコンフリクトを防ぐため、多くのデータベースサーバは2つのSQLを同時に処理できない仕様になっているためである。   Also, when the generated new execution SQL is an update-type SQL statement (delete, update, insert, etc.), the old execution SQL is stopped (rollback, etc.), and the new execution SQL is started. This is because, in the case of an update SQL statement, in order to prevent data conflicts, many database servers have specifications that cannot process two SQLs simultaneously.

上記の条件に合致しない場合は、新旧の実行SQLを並行に起動し、早く終了した結果を取得して、該当のSQL文の処理を終える。   If the above conditions are not met, the new and old execution SQLs are started in parallel, the result of early termination is obtained, and the processing of the corresponding SQL statement is completed.

以上の処理により、実行計画の変更による処理時間の遅延が発生した場合、少なくとも過去の正常な時間に近い処理時間で処理することができる効果を有する。   As a result of the above processing, when a delay in processing time occurs due to a change in the execution plan, there is an effect that processing can be performed in at least processing time close to the past normal time.

以下、図4〜図7を参照して、本発明における実施形態の流れを説明する。   Hereinafter, the flow of the embodiment of the present invention will be described with reference to FIGS.

図4は、本発明の実施形態のデータベース管理システムにおける第1の制御処理手段の一例を示すフローチャートであり、図中のS401〜S411は各ステップを示す。各ステップの処理は、それぞれの装置の外部メモリ211に格納されたアプリケーションプログラムを、それぞれの装置のCPU201がRAM202上にロードして実行することにより実現される。   FIG. 4 is a flowchart showing an example of the first control processing unit in the database management system according to the embodiment of the present invention, and S401 to S411 in the figure indicate each step. The processing of each step is realized by the CPU 201 of each device loading and executing the application program stored in the external memory 211 of each device on the RAM 202.

図4のフローチャートは、データベース管理装置100がSQL文をデータベースサーバに送信しようとすると開始される処理の流れになる。   The flowchart in FIG. 4 is a flow of processing that is started when the database management apparatus 100 attempts to transmit an SQL statement to the database server.

まず、ステップS401において、データベース管理装置100のバッチ処理部301は、実行命令を受け付けたSQL文を実行計画管理部303に送信する。   First, in step S <b> 401, the batch processing unit 301 of the database management apparatus 100 transmits an SQL statement that has received an execution command to the execution plan management unit 303.

次に、ステップS402において、データベース管理装置100の実行計画管理部303は、バッチ処理部301から受信したSQL文が遅延管理する対象のSQL文かどうかを判断する。この処理は、遅延管理しなくても良いSQL文(処理時間が明らかに短いSQL文など)での以降の処理を省くための判断分岐である。   Next, in step S <b> 402, the execution plan management unit 303 of the database management apparatus 100 determines whether the SQL statement received from the batch processing unit 301 is an SQL statement to be subjected to delay management. This process is a decision branch for omitting subsequent processes in an SQL sentence (such as an SQL sentence whose processing time is clearly short) that does not require delay management.

実行計画管理部303に記憶されている遅延管理する対象のSQL文の例を図8を参照して説明する。   An example of an SQL statement to be managed for delay stored in the execution plan management unit 303 will be described with reference to FIG.

図8は、本発明の実施形態のデータベース管理装置に記憶される遅延管理する対象のSQL文の一例を示すデータ構成である。   FIG. 8 is a data configuration showing an example of a SQL sentence to be delayed managed stored in the database management apparatus according to the embodiment of the present invention.

図8の801欄はSQL文毎に振られたSQLIDであり、802欄は遅延管理する対象のSQL文である。803は、パラメータの条件であり、803に記載のあるSQLIDのSQL文は、803に記載されたパラメータ条件が満たされている場合のみ、遅延管理する対象とする。図4のフローチャートの説明に戻る。   The column 801 in FIG. 8 is the SQL ID assigned to each SQL statement, and the column 802 is the SQL statement to be subject to delay management. Reference numeral 803 denotes a parameter condition. The SQL statement of SQLID described in 803 is subject to delay management only when the parameter condition described in 803 is satisfied. Returning to the flowchart of FIG.

ステップS402で、実行計画管理部303は、受信したSQL文が遅延管理する対象のSQL文であれば、受信したSQL文をデータベースサーバ102へと送信し、ステップS403へと処理を移行する。一方、受信したSQL文が遅延管理する対象のSQL文でなければ、図5の処理に移行する。   In step S402, the execution plan management unit 303 transmits the received SQL statement to the database server 102 if the received SQL statement is a delay management target SQL statement, and the process proceeds to step S403. On the other hand, if the received SQL sentence is not a delay management target SQL sentence, the process proceeds to FIG.

ステップS403に処理を移行すると、データベースサーバ102のデータベース処理部321は、受信したSQL文に適切と考えられる実行計画を適用して実行SQL(第1の実行SQL:以後旧実行SQLと呼ぶ)を生成し、旧実行SQLを実行する。   When the process proceeds to step S403, the database processing unit 321 of the database server 102 applies an execution plan that is considered appropriate to the received SQL statement and executes execution SQL (first execution SQL: hereinafter referred to as old execution SQL). Generate the old execution SQL.

次に、実行計画管理部303は、定期的にデータベースサーバ102からリソース状況や処理時間などの情報を受信し(ステップS405)、閾値以上となって遅延していないかを確認する(ステップS406)。   Next, the execution plan management unit 303 periodically receives information such as the resource status and processing time from the database server 102 (step S405), and checks whether there is a delay beyond the threshold (step S406). .

ステップS406における閾値の例を図9を参照して説明する。   An example of the threshold value in step S406 will be described with reference to FIG.

図9は、本発明の実施形態のデータベース管理装置に記憶されるSQLIDと遅延管理するリソースや処理時間の一例を示すデータ構成である。   FIG. 9 is a data configuration showing an example of SQLID stored in the database management apparatus according to the embodiment of the present invention, resources for delay management, and processing time.

図9の901欄はSQL文毎に振られたSQLIDであり、902欄は閾値のタイプを示す。閾値のタイプとしては、たとえば、該当SQLの処理時間の長さや、CPUの使用時間、使用割合、IOリソースの使用時間や使用割合などがある。903欄は、それぞれのタイプ毎の閾値であり、たとえば処理時間であれば100秒を超えた場合、CPUリソースであれば、使用割合が90%以上が1分以上続く場合などである。図4のフローチャートの説明に戻る。   The column 901 in FIG. 9 is the SQL ID assigned to each SQL sentence, and the column 902 indicates the threshold type. Examples of the threshold type include the length of processing time of the corresponding SQL, CPU usage time, usage rate, and IO resource usage time and usage rate. A column 903 is a threshold value for each type. For example, when the processing time exceeds 100 seconds, when the CPU resource is used, 90% or more of the usage rate continues for 1 minute or more. Returning to the flowchart of FIG.

ステップS405とステップS406の処理は、ステップS403で実行を開始した旧実行SQLが終了するまで繰り返す。   The processes in steps S405 and S406 are repeated until the old execution SQL started in step S403 is completed.

ステップS406で閾値以上となった場合は、遅延リカバリ処理へと処理を移行する。詳細は図6において説明する。   If it becomes equal to or greater than the threshold value in step S406, the process proceeds to the delay recovery process. Details will be described with reference to FIG.

ステップS406で閾値以上となることなく、ステップS403で実行した旧実行SQLが終了する(ステップS407)と、実行計画管理部303は、旧実行SQLの実行計画をデータベース処理部321から取得する(ステップS408、ステップS409)。   When the old execution SQL executed in step S403 ends without exceeding the threshold in step S406 (step S407), the execution plan management unit 303 acquires the execution plan of the old execution SQL from the database processing unit 321 (step S407). S408, step S409).

次に、ステップS410において、実行計画管理部は、取得した旧実行SQLの実行計画をステップS402で取得したSQL文と紐付けて記憶する。ステップS410でSQL文と紐付けて記憶する実行計画は、正常な状態で終了したと判断された実行計画である(以下、正常時の実行計画と呼ぶ)。正常な実行計画の例を図10を参照して説明する。   Next, in step S410, the execution plan management unit stores the acquired execution plan of the old execution SQL in association with the SQL statement acquired in step S402. The execution plan stored in association with the SQL statement in step S410 is an execution plan that is determined to have ended in a normal state (hereinafter referred to as a normal execution plan). An example of a normal execution plan will be described with reference to FIG.

図10は、本発明の実施形態のデータベース管理装置において、登録される実行計画の一例を示すデータ構成である。   FIG. 10 is a data configuration showing an example of an execution plan registered in the database management apparatus according to the embodiment of this invention.

図10の1001欄はSQL文毎に振られたSQLIDであり、図8のSQL文と対応付いている。1002欄はSQLIDそれぞれのSQL文における正常時の実行計画である。たとえば、SQLIDが1の「SELECT * FROM Aテーブル where ○○項目=:パラメタ1」というSQL文の場合、実行計画として「SELECT STATEMENT TABLE ACCESS Aテーブル INDEX A1インデックス UNIQUE SCAN」が登録されている。これは、SQLIDが1のSQL文であるAテーブルの検索には、A1インデックス(プライマリキー)による索引一意スキャンを行うと正常な時間以内に処理が終了することを意味する。また、SQLIDが2の「SELECT * FROM Aテーブル where ○○項目=:パラメタ1 and ××項目=:パラメタ2」というSQL文の場合、実行計画として「SELECT STATEMENT TABLE ACCESS Aテーブル INDEX A2インデックス RANGE SCAN」が登録されている。これは、SQLIDが2のSQL文であるAテーブルの検索には、A2インデックスによる索引レンジ・スキャンを行うと正常な時間以内に処理が終了することを意味する。図4のフローチャートの説明に戻る。   The column 1001 in FIG. 10 is an SQL ID assigned to each SQL sentence, and corresponds to the SQL sentence in FIG. A column 1002 is a normal execution plan in the SQL statement of each SQL ID. For example, in the case of an SQL statement “SELECT * FROM A table where XX item =: parameter 1” with SQLID 1, “SELECT STATEMENT TABLE ACCESS A table INDEX A1 index UNIQUE SCAN” is registered. This means that the search for the A table, which is an SQL statement with an SQL ID of 1, ends the process within a normal time when an index unique scan using the A1 index (primary key) is performed. In addition, in the case of an SQL statement “SELECT * FROM A table where XX item =: parameter 1 and XX item =: parameter 2” with SQLID 2, the execution plan is “SELECT STATEMENT TABLE ACCESS A table INDEX A2 index RANGE SCAN” "Is registered. This means that, for the search of the A table that is an SQL statement with SQLID 2, if the index range scan with the A2 index is performed, the processing is completed within a normal time. Returning to the flowchart of FIG.

ステップS410において、SQL文と正常時の実行計画を紐付けてきおくすると、次にステップS411へと処理を移行する。   In step S410, if the SQL statement is linked to the normal execution plan, the process proceeds to step S411.

ステップS411において、バッチ処理部301は、S401で送信したSQL文の結果を取得し、引き続きの処理を行う。バッチ処理がSQL文である場合は、ステップS401へと処理を戻し、バッチ処理が終了するまでこの処理を繰り返す。   In step S411, the batch processing unit 301 acquires the result of the SQL sentence transmitted in S401, and performs subsequent processing. If the batch process is an SQL statement, the process returns to step S401, and this process is repeated until the batch process ends.

以上の処理により、SQL文が正常に終了した際の実行計画を記憶することが出来る。   With the above processing, the execution plan when the SQL statement is normally completed can be stored.

つぎに、図5を参照して、実行計画管理部303が受信したSQL文が遅延管理する対象のSQL文でない場合の処理を説明する。   Next, processing when the SQL statement received by the execution plan management unit 303 is not a delay management target SQL statement will be described with reference to FIG.

図5は、本発明の実施形態のデータベース管理システムにおける第2の制御処理手段の一例を示すフローチャートであり、それぞれの装置の外部メモリ211に格納されたアプリケーションプログラムを、それぞれの装置のCPU201がRAM202上にロードして実行することにより実現される。なお、図中のS501は処理ステップを示す。   FIG. 5 is a flowchart showing an example of the second control processing unit in the database management system according to the embodiment of the present invention. The application program stored in the external memory 211 of each device is stored in the RAM 202 by the CPU 201 of each device. Realized by loading and executing on top. Note that S501 in the figure indicates a processing step.

図5のフローチャートは、実行計画管理部303が受信したSQL文が遅延管理する対象のSQL文でない場合に開始される処理の流れになる。   The flowchart of FIG. 5 is a flow of processing that is started when the SQL statement received by the execution plan management unit 303 is not a target SQL statement to be delayed.

ステップS501において、データベース処理部321は、実行計画管理部303からSQL文を受信し、受信したSQL文に対する実行計画を適用して実行SQLを生成し、実行SQLを実行する。   In step S501, the database processing unit 321 receives an SQL statement from the execution plan management unit 303, applies an execution plan for the received SQL statement, generates an execution SQL, and executes the execution SQL.

データベース処理部321で実行した結果はバッチ処理部へ送信され、図4のステップS411へと処理へと移行する。   The result executed by the database processing unit 321 is transmitted to the batch processing unit, and the process proceeds to step S411 in FIG.

以上、実行計画管理部303が受信したSQL文が遅延管理する対象のSQL文でない場合の処理の説明を終える。   This is the end of the description of the processing when the SQL statement received by the execution plan management unit 303 is not the target SQL statement to be delayed.

次に、図6を参照して、データベースサーバ102の処理時間が遅延しているなどの場合の処理を説明する。   Next, with reference to FIG. 6, processing when the processing time of the database server 102 is delayed will be described.

図6は、本発明の実施形態のデータベース管理システムにおける第3の制御処理手段の一例を示すフローチャートであり、それぞれの装置の外部メモリ211に格納されたアプリケーションプログラムを、それぞれの装置のCPU201がRAM202上にロードして実行することにより実現される。なお、図中のS601からS610は各処理ステップを示す。   FIG. 6 is a flowchart showing an example of the third control processing unit in the database management system according to the embodiment of the present invention. The application program stored in the external memory 211 of each device is stored in the RAM 202 by the CPU 201 of each device. Realized by loading and executing on top. Note that S601 to S610 in the figure indicate each processing step.

図6のフローチャートは、図4のステップS406において、データベースサーバ102の処理時間の遅延やデータベースサーバ102のリソースの高占有などが生じた際に開始される処理の流れになる。   The flowchart of FIG. 6 is a processing flow that is started when a delay in processing time of the database server 102 or a high occupation of resources of the database server 102 occurs in step S406 of FIG.

まず、ステップS601において、実行計画管理部303は、データベースサーバ102の処理時間の遅延やデータベースサーバ102のリソースの高占有などが生じている旧実行SQLを生成した際の実行計画を、データベース処理部321に要求する。   First, in step S601, the execution plan management unit 303 creates an execution plan when generating an old execution SQL in which processing time delay of the database server 102 or high resource occupancy of the database server 102 has occurred. 321 is requested.

次に、ステップS602において、データベース処理部321は、旧実行SQLを生成した際の実行計画を実行計画管理部303に送信する。   Next, in step S <b> 602, the database processing unit 321 transmits the execution plan when the old execution SQL is generated to the execution plan management unit 303.

次に、ステップS603において、実行計画管理部303は、ステップS601の実行計画の要求により取得した実行計画を記憶する。また、ステップS410で過去に正常に終了した時の実行計画(正常時の実行計画)の内、ステップS402で受信したSQL文のテンプレート(図8の管理対象となるSQL一覧302の802欄)と同じ形式のSQLIDの実行計画(図10の1002欄)をSQL一覧(図8)と実行計画一覧(図10)から取得する。   Next, in step S603, the execution plan management unit 303 stores the execution plan acquired by the execution plan request in step S601. In addition, among the execution plans that were normally completed in the past in step S410 (execution plans in the normal state), the template of the SQL sentence received in step S402 (the column 802 of the SQL list 302 to be managed in FIG. 8) and An SQLID execution plan (column 1002 in FIG. 10) of the same format is acquired from the SQL list (FIG. 8) and the execution plan list (FIG. 10).

次に、ステップS604において、実行計画管理部303は、ステップS602でデータベース処理部321から送信された旧実行SQLを生成した実行計画と、ステップS604で取得した正常時の実行計画とを比較する。   Next, in step S604, the execution plan management unit 303 compares the execution plan that generated the old execution SQL transmitted from the database processing unit 321 in step S602 and the normal execution plan acquired in step S604.

2つの実行計画が等しい場合は、この発明では解決できず、ステップS610へと処理を移行し、ステップS610において、旧実行SQLが終了するまで待機した後、ステップS411へと処理を移行する。   If the two execution plans are equal, the present invention cannot be solved, and the process proceeds to step S610. In step S610, the process waits until the old execution SQL is completed, and then proceeds to step S411.

一方、ステップS604において2つの実行計画が等しくない場合は、正常時の実行計画で処理速度を上げることが可能かもしれないので、正常時の実行計画を適用したSQL文を実行するため、次のステップS605の処理へと移行する。   On the other hand, if the two execution plans are not equal in step S604, it may be possible to increase the processing speed with the normal execution plan. Therefore, to execute the SQL statement to which the normal execution plan is applied, The process proceeds to step S605.

ステップS605へと処理を移行すると、実行計画管理部303は、ステップS603で取得した正常時の実行計画から正常時の実行計画を適用するためのヒント句を生成する。生成されるヒント句の例を図11を参照して説明する。   When the process proceeds to step S605, the execution plan management unit 303 generates a hint phrase for applying the normal execution plan from the normal execution plan acquired in step S603. An example of the generated hint phrase will be described with reference to FIG.

図11は、本発明の実施形態のデータベース管理装置において、ヒント句の作成された一例を示す図である。   FIG. 11 is a diagram illustrating an example in which a hint phrase is created in the database management apparatus according to the embodiment of this invention.

図11の1100は、図10の実行計画一覧のSQLIDそれぞれの実行計画に対するヒント句の例である。   11 is an example of a hint phrase for each execution plan of the SQLID in the execution plan list of FIG.

図11の1101の例では、SQLIDが1のSQL文に対して付与されるヒント句が生成された例であり、図10の1003の行を読み取って、A1インデックスによる検索を行うヒント句の例である。なお、索引一意スキャンを行う「INDEX UNIQUE SCAN」については、A1インデックスがプライマリキーであるので、記載は省略されている。図6のフローチャートの説明に戻る。   The example of 1101 in FIG. 11 is an example in which a hint phrase to be given to the SQL statement with SQLID 1 is generated, and an example of a hint phrase for performing a search by the A1 index by reading the line 1003 in FIG. It is. Note that “INDEX UNIQUE SCAN” for performing index unique scan is omitted because the A1 index is the primary key. Returning to the flowchart of FIG.

ステップS605において、正常時の実行計画からヒント句を生成すると、次のステップS606において、実行計画管理部303は、ステップS402で受信したSQL文に、ステップS605で生成されたヒント句を適用し、新たな実行SQLを作成する(第2の実行SQL:新実行SQLと呼ぶ)。作成される新実行SQLの例を、図12を参照して説明する。   When the hint phrase is generated from the normal execution plan in step S605, in the next step S606, the execution plan management unit 303 applies the hint phrase generated in step S605 to the SQL statement received in step S402, and A new execution SQL is created (second execution SQL: referred to as new execution SQL). An example of the new execution SQL to be created will be described with reference to FIG.

図12は、本発明の実施形態のデータベース管理装置において、ヒント句を適用されて作成される新実行SQLの元になるSQL文の一例を示す図である。   FIG. 12 is a diagram illustrating an example of an SQL statement that is the basis of a new execution SQL created by applying a hint phrase in the database management apparatus according to the embodiment of this invention.

図12の1200には、ヒント句が付与される前、すなわちステップS402でバッチ処理部301から受信した段階のSQL文を示す。一方、1210は、図11の1101のヒント句が反映されたSQL文を示す。1201の「/*+ INDEX(A1インデックス) */」の欄が追記されており、このヒント句により、新実行SQLは、プライマリキーであるA1インデックスを使って検索することが出来る。図6のフローチャートの説明に戻る。   1200 in FIG. 12 shows the SQL sentence before the hint phrase is given, that is, at the stage received from the batch processing unit 301 in step S402. On the other hand, 1210 indicates an SQL sentence in which the hint phrase 1101 in FIG. 11 is reflected. 1201 “/ * + INDEX (A1 index) **” is added, and by this hint phrase, the new execution SQL can be searched using the A1 index which is the primary key. Returning to the flowchart of FIG.

ステップS606の処理を実行後、ステップS607において、実行計画管理部303は、ステップS402で受信したSQL文が更新系のSQLであるか、もしくは、ステップS405でデータベース処理部から送信されたリソースに使用割合が所定の割合を超えているかどうかを判断する。この判断分岐は、新実行SQLを旧実行SQLと並行して処理することが可能か、もしくはリソースの負荷が高くなるために並行して処理をしないほうが良いかの判断を行うための分岐である。   After executing the process of step S606, in step S607, the execution plan management unit 303 uses the SQL sentence received in step S402 as the update SQL or the resource transmitted from the database processing unit in step S405. It is determined whether the ratio exceeds a predetermined ratio. This determination branch is a branch for determining whether it is possible to process the new execution SQL in parallel with the old execution SQL or whether it is better not to perform the processing in parallel because the resource load increases. .

ステップS402で受信したSQL文が更新系のSQLである場合は、並行して同じデータベースにアクセスすることが不可能であるため、ステップS608の処理へと移行する。   If the SQL sentence received in step S402 is an update-type SQL, it is impossible to access the same database in parallel, and the process proceeds to step S608.

ステップS608において、データベース処理部321は、旧実行SQLを切断し、次のステップS609で新実行SQLを開始する。新実行SQLが終了すると、図4のステップS411へと処理を移行する。   In step S608, the database processing unit 321 disconnects the old execution SQL, and starts the new execution SQL in the next step S609. When the new execution SQL is completed, the process proceeds to step S411 in FIG.

また、ステップS607において、リソースの使用割合が所定の割合を超えて、リソースの使用負荷が高い場合も、ステップS608へと処理を移行する。ステップS608以降の処理は、上記と同じ処理となる。   Also, in step S607, when the resource usage rate exceeds a predetermined rate and the resource usage load is high, the process proceeds to step S608. The processing after step S608 is the same processing as described above.

ステップS607で、受信したSQL文が更新系ではなく、またリソースの使用負荷も所定の割合を超えていない場合、図7の新旧2つの実行SQLを並行して実行する処理に移行する。   In step S607, when the received SQL sentence is not an update system and the resource usage load does not exceed a predetermined ratio, the process proceeds to a process of executing the new and old execution SQLs of FIG. 7 in parallel.

図7を参照して、新旧2つの実行SQLを実行する処理について説明する。   With reference to FIG. 7, the process of executing the old and new execution SQL will be described.

図7は、本発明の実施形態のデータベース管理システムにおける第4の制御処理手段の一例を示すフローチャートであり、それぞれの装置の外部メモリ211に格納されたアプリケーションプログラムを、それぞれの装置のCPU201がRAM202上にロードして実行することにより実現される。なお、図中のS701からS708は各処理ステップを示す。   FIG. 7 is a flowchart showing an example of the fourth control processing unit in the database management system according to the embodiment of the present invention. The application program stored in the external memory 211 of each device is stored in the RAM 202 by the CPU 201 of each device. Realized by loading and executing on top. Note that S701 to S708 in the figure indicate each processing step.

図7のフローチャートは、図4のステップS406において、データベースサーバ102のリソースの占有率が所定の割合以下で、且つステップS402で受信したSQL文が更新系SQLではない場合に開始される処理の流れになる。   The flowchart of FIG. 7 shows the flow of processing started when the resource occupancy rate of the database server 102 is equal to or lower than a predetermined ratio in step S406 of FIG. 4 and the SQL sentence received in step S402 is not an update SQL. become.

まず、実行計画管理部303は、データベース処理部321へと処理を移行し、データベース処理部321は、2つの新旧実行SQLの処理を並行して処理する。   First, the execution plan management unit 303 shifts the processing to the database processing unit 321, and the database processing unit 321 processes two new and old execution SQL processes in parallel.

まず、旧実行SQLの処理はステップS701のように旧実行SQLを継続して実行する。   First, the old execution SQL process continues to execute the old execution SQL as in step S701.

また、新実行SQLの処理もステップS703において開始し、ステップS702もしくはステップS704において、どちらかの処理が終了するまで、ステップS701とステップS703の処理を繰り返す。   Also, the new execution SQL process is started in step S703, and the processes in steps S701 and S703 are repeated until either process is completed in step S702 or step S704.

ステップS702もしくはステップS704において、どちらかの処理が終了すると、処理を実行計画管理部303に移行する。   When either process ends in step S702 or step S704, the process proceeds to the execution plan management unit 303.

実行計画管理部303へと移行すると、ステップS705において、終了した実行SQLが新旧どちらのSQLかを判断し、終了していない方の実行SQLを切断し(ステップS706、S707)、図4のステップ411へと処理を移行する。   When the process proceeds to the execution plan management unit 303, in step S705, it is determined which of the old and new execution SQL is terminated, and the execution SQL that has not been terminated is disconnected (steps S706 and S707), and the steps in FIG. The processing is shifted to 411.

以上の処理により、本発明のデータベース管理装置は、新たな実行計画により処理時間の遅延が生じた場合は、過去の正常な時間で処理した実行計画に戻して、少なくとも過去の正常な時間に近い処理時間で処理できる効果を有する。   As a result of the above processing, the database management apparatus of the present invention returns to the execution plan processed at the normal time in the past when the processing time is delayed due to the new execution plan, and is at least close to the past normal time. It has the effect that it can process in processing time.

なお、本実施形態では、データベース管理装置100とデータベースサーバ102とが別筐体として記載したが、データベース管理装置100とデータベースサーバ102は一つの筐体としても良く、また複数の筐体からなっていても良い。   In the present embodiment, the database management device 100 and the database server 102 are described as separate housings. However, the database management device 100 and the database server 102 may be a single housing or a plurality of housings. May be.

また、図8〜図10の各種データの構成およびその内容はこれに限定されるものではなく、用途や目的に応じて、様々な構成や内容で構成されることは言うまでもない。   Further, the configurations and contents of the various data in FIGS. 8 to 10 are not limited to this, and it is needless to say that they are configured with various configurations and contents according to applications and purposes.

以上、一実施形態について示したが、本発明は、例えば、システム、装置、方法、プログラムもしくは記録媒体等としての実施態様をとることが可能であり、具体的には、複数の機器から構成されるシステムに適用しても良いし、また、一つの機器からなる装置に適用しても良い。   Although one embodiment has been described above, the present invention can take an embodiment as, for example, a system, apparatus, method, program, or recording medium, and specifically includes a plurality of devices. The present invention may be applied to a system including a single device.

なお、本実施形態中に示した各変形例を組み合わせた構成も全て本発明に含まれるものである。   In addition, all the structures which combined each modification shown in this embodiment are also included in this invention.

以下、図13に示すメモリマップを参照して本発明に係るデータベース管理装置で読み取り可能なデータ処理プログラムの構成について説明する。   The configuration of the data processing program that can be read by the database management apparatus according to the present invention will be described below with reference to the memory map shown in FIG.

図13は、本発明に係るデータベース管理装置で読み取り(読み出し)可能な各種データ処理プログラムを格納する記録媒体(記憶媒体)のメモリマップを説明する図である。   FIG. 13 is a diagram illustrating a memory map of a recording medium (storage medium) that stores various data processing programs that can be read (read) by the database management apparatus according to the present invention.

なお、特に図示しないが、記録媒体に記憶されるプログラム群を管理する情報、例えばバージョン情報,作成者等も記憶され、かつ、プログラム読み出し側のOS等に依存する情報、例えばプログラムを識別表示するアイコン等も記憶される場合もある。   Although not specifically shown, information for managing a program group stored in the recording medium, for example, version information, creator, etc. is also stored, and information depending on the OS on the program reading side, for example, a program is identified and displayed. Icons may also be stored.

さらに、各種プログラムに従属するデータも上記ディレクトリに管理されている。また、インストールするプログラムやデータが圧縮されている場合に、解凍するプログラム等も記憶される場合もある。   Further, data depending on various programs is also managed in the directory. In addition, when a program or data to be installed is compressed, a program to be decompressed may be stored.

本実施形態における図4〜図7に示す機能が外部からインストールされるプログラムによって、ホストコンピュータにより遂行されていてもよい。そして、その場合、CD−ROMやフラッシュメモリやFD等の記録媒体により、あるいはネットワークを介して外部の記録媒体から、プログラムを含む情報群を出力装置に供給される場合でも本発明は適用されるものである。   The functions shown in FIGS. 4 to 7 in this embodiment may be performed by a host computer by a program installed from the outside. In this case, the present invention is applied even when an information group including a program is supplied to the output device from a recording medium such as a CD-ROM, a flash memory, or an FD, or from an external recording medium via a network. Is.

以上のように、前述した実施形態の機能を実現するソフトウェアのプログラムコードを記録した記録媒体を、システムあるいは装置に供給し、そのシステムあるいは装置のコンピュータ(またはCPUやMPU)が記録媒体に格納されたプログラムコードを読出し実行することによっても、本発明の目的が達成されることは言うまでもない。   As described above, a recording medium in which a program code of software for realizing the functions of the above-described embodiments is recorded is supplied to the system or apparatus, and the computer (or CPU or MPU) of the system or apparatus is stored in the recording medium. It goes without saying that the object of the present invention can also be achieved by reading and executing the program code.

この場合、記録媒体から読み出されたプログラムコード自体が本発明の新規な機能を実現することになり、そのプログラムコードを記憶した記録媒体は本発明を構成することになる。   In this case, the program code itself read from the recording medium realizes the novel function of the present invention, and the recording medium storing the program code constitutes the present invention.

プログラムコードを供給するための記録媒体としては、例えば、フレキシブルディスク,ハードディスク,光ディスク,光磁気ディスク,CD−ROM,CD−R,DVD−ROM,磁気テープ,不揮発性のメモリカード,ROM,EEPROM,シリコンディスク等を用いることができる。   As a recording medium for supplying the program code, for example, a flexible disk, hard disk, optical disk, magneto-optical disk, CD-ROM, CD-R, DVD-ROM, magnetic tape, nonvolatile memory card, ROM, EEPROM, A silicon disk or the like can be used.

また、コンピュータが読み出したプログラムコードを実行することにより、前述した実施形態の機能が実現されるだけでなく、そのプログラムコードの指示に基づき、コンピュータ上で稼働しているOS(オペレーティングシステム)等が実際の処理の一部または全部を行い、その処理によって前述した実施形態の機能が実現される場合も含まれることは言うまでもない。   Further, by executing the program code read by the computer, not only the functions of the above-described embodiments are realized, but also an OS (operating system) or the like running on the computer based on the instruction of the program code. It goes without saying that a case where the function of the above-described embodiment is realized by performing part or all of the actual processing and the processing is included.

さらに、記録媒体から読み出されたプログラムコードが、コンピュータに挿入された機能拡張ボードやコンピュータに接続された機能拡張ユニットに備わるメモリに書き込まれた後、そのプログラムコードの指示に基づき、その機能拡張ボードや機能拡張ユニットに備わるCPU等が実際の処理の一部または全部を行い、その処理によって前述した実施形態の機能が実現される場合も含まれることは言うまでもない。   Furthermore, after the program code read from the recording medium is written in a memory provided in a function expansion board inserted in the computer or a function expansion unit connected to the computer, the function expansion is performed based on the instruction of the program code. It goes without saying that the case where the CPU or the like provided in the board or the function expansion unit performs part or all of the actual processing and the functions of the above-described embodiments are realized by the processing.

また、本発明は、複数の機器から構成されるシステムに適用しても、1つの機器からなる装置に適用してもよい。また、本発明は、システムあるいは装置にプログラムを供給することによって達成される場合にも適応できることは言うまでもない。この場合、本発明を達成するためのソフトウェアによって表されるプログラムを格納した記録媒体を該システムあるいは装置に読み出すことによって、そのシステムあるいは装置が、本発明の効果を享受することが可能となる。   Further, the present invention may be applied to a system composed of a plurality of devices or an apparatus composed of a single device. Needless to say, the present invention can be applied to a case where the present invention is achieved by supplying a program to a system or apparatus. In this case, by reading a recording medium storing a program represented by software for achieving the present invention into the system or apparatus, the system or apparatus can enjoy the effects of the present invention.

さらに、本発明を達成するためのソフトウェアによって表されるプログラムをネットワーク上のサーバ,データベース等から通信プログラムによりダウンロードして読み出すことによって、そのシステムあるいは装置が、本発明の効果を享受することが可能となる。   Furthermore, by downloading and reading out a program represented by software for achieving the present invention from a server, database, etc. on a network using a communication program, the system or apparatus can enjoy the effects of the present invention. It becomes.

100 データベース管理装置
101 管理用クライアント
102 データベースサーバ
103 クライアント
100 Database management apparatus 101 Management client 102 Database server 103 Client

Claims (8)

データベースサーバと接続可能なデータベース管理装置であって、
入力されたSQL文を前記データベースサーバに送信する送信手段と、
前記データベースサーバのリソース使用量を取得するリソース使用量取得手段と、
前記データベースサーバから、前記入力されたSQL文に対応して処理される実行計画を受信する実行計画受信手段と、
前記データベースサーバのリソース使用量が異常であると判断する所定の閾値を記憶する閾値記憶手段と、
前記リソース使用量取得手段により取得された前記データベースサーバのリソース使用量が、前記閾値記憶手段に記憶された所定の閾値を超えているかを判断する判断手段と、
前記閾値記憶手段で記憶された所定の閾値を超えないリソース使用量で終了したデータベースサーバの実行計画を、前記入力されたSQL文と紐付けて記憶する正常時実行計画記憶手段と、
前記判断手段で前記データベースサーバのリソース使用量が、前記閾値記憶手段に記憶された所定の閾値を超えている場合、前記実行計画受信手段で受信した実行計画と、前記正常時実行計画記憶手段で記憶した実行計画とを比較する比較手段と、
前記比較手段による比較結果により、前記入力されたSQL文に紐付けられた前記正常時実行計画で該入力されたSQL文を処理するよう、前記データベースサーバに該正常時実行計画を送信する正常時実行計画送信手段と
を有することを特徴とするデータベース管理装置。
A database management device that can be connected to a database server,
Transmitting means for transmitting the input SQL sentence to the database server;
Resource usage acquisition means for acquiring the resource usage of the database server;
Execution plan receiving means for receiving an execution plan processed in response to the input SQL statement from the database server;
Threshold storage means for storing a predetermined threshold for determining that the resource usage of the database server is abnormal;
Determining means for determining whether the resource usage of the database server acquired by the resource usage acquiring means exceeds a predetermined threshold stored in the threshold storage;
A normal-time execution plan storage unit that stores an execution plan of a database server that is terminated with a resource usage amount that does not exceed the predetermined threshold stored in the threshold storage unit, in association with the input SQL statement;
When the resource usage of the database server by the determination means exceeds a predetermined threshold stored in the threshold storage means, the execution plan received by the execution plan reception means and the normal execution plan storage means A comparison means for comparing the stored execution plan;
When the normal execution plan is transmitted to the database server so that the input SQL statement is processed by the normal execution plan associated with the input SQL statement based on the comparison result by the comparing means. A database management apparatus comprising execution plan transmission means.
前記正常時実行計画送信手段は、前記正常時実行計画記憶手段で記憶された実行計画をヒント句として生成し、データベースサーバに送信することを特徴とする、請求項1に記載のデータベース管理装置。   2. The database management apparatus according to claim 1, wherein the normal execution plan transmission unit generates the execution plan stored in the normal execution plan storage unit as a hint phrase and transmits the hint to the database server. 前記入力されたSQL文が更新系のSQLの場合、前記データベースサーバに、前記リソース使用量が前記所定の閾値を超えていると判断される実行計画の処理を終了させ、前記正常時実行計画送信手段を送信し、SQL文を処理させることを特徴とする請求項1又は2に記載のデータベース管理装置。   When the input SQL statement is an update-type SQL, the database server is caused to finish the execution plan processing in which it is determined that the resource usage exceeds the predetermined threshold, and the normal execution plan transmission The database management apparatus according to claim 1, wherein the database management apparatus transmits the means and processes the SQL sentence. 前記リソース使用量取得手段により取得されたリソース使用量が、リソースの所定の割合を超えている場合は、前記データベースサーバに、前記リソース使用量が前記所定の閾値を超えていると判断される実行計画の処理を終了させ、前記正常時実行計画送信手段を送信し、SQL文を処理させることを特徴とする請求項1乃至3に記載のデータベース管理装置。   When the resource usage acquired by the resource usage acquisition means exceeds a predetermined percentage of resources, the database server determines that the resource usage exceeds the predetermined threshold 4. The database management apparatus according to claim 1, wherein a plan processing is terminated, the normal execution plan transmission means is transmitted, and an SQL statement is processed. 前記閾値記憶手段は、前記入力されたSQL文毎に異なる閾値を持つことを特徴とする請求項1乃至4に記載のデータベース管理装置。
前記入力されたSQL文に対応する
The database management apparatus according to claim 1, wherein the threshold value storage unit has a different threshold value for each of the input SQL sentences.
Corresponds to the input SQL sentence
データベースサーバと接続可能な、前記データベースサーバのリソース使用量が異常であると判断する所定の閾値を記憶する閾値記憶手段を有するデータベース管理装置におけるデータベース管理方法であって、
入力されたSQL文を前記データベースサーバに送信する送信ステップと、
前記データベースサーバのリソース使用量を取得するリソース使用量取得ステップと
前記データベースサーバから、前記入力されたSQL文に対応して処理される実行計画を受信する実行計画受信ステップと、
前記リソース使用量取得ステップにより取得された前記データベースサーバのリソース使用量が、前記閾値記憶手段に記憶された所定の閾値を超えているかを判断する判断ステップと、
前記閾値記憶手段で記憶された所定の閾値を超えないリソース使用量で終了したデータベースサーバの実行計画を、前記入力されたSQL文と紐付けて登録する正常時実行計画登録ステップと、
前記判断ステップで前記データベースサーバのリソース使用量が、前記閾値記憶手段に記憶された所定の閾値を超えている場合、前記実行計画受信ステップで受信した実行計画と、前記正常時実行計画登録ステップで登録した実行計画とを比較する比較ステップと、
前記比較ステップによる比較結果により、前記入力されたSQL文に紐付けられた前記正常時実行計画で該入力されたSQL文を処理するよう、前記データベースサーバに該正常時実行計画を送信する正常時実行計画送信ステップと
を有することを特徴とするデータベース管理装置
A database management method in a database management apparatus having threshold storage means for storing a predetermined threshold for determining that the resource usage of the database server is abnormal and connectable to the database server,
A transmission step of transmitting the input SQL sentence to the database server;
A resource usage acquisition step of acquiring the resource usage of the database server; and an execution plan reception step of receiving an execution plan processed in response to the input SQL statement from the database server;
A determination step of determining whether the resource usage of the database server acquired by the resource usage acquisition step exceeds a predetermined threshold stored in the threshold storage means;
A normal time execution plan registration step of registering an execution plan of a database server terminated with a resource usage amount not exceeding a predetermined threshold stored in the threshold storage unit in association with the input SQL statement;
If the resource usage of the database server in the determining step exceeds a predetermined threshold stored in the threshold storage means, the execution plan received in the execution plan receiving step and the normal execution plan registration step A comparison step that compares the created execution plan with
When the normal execution plan is transmitted to the database server so as to process the input SQL statement with the normal execution plan associated with the input SQL statement, based on the comparison result of the comparison step. A database management apparatus comprising: an execution plan transmission step;
請求項1乃至5のいずれか1項に記載のデータベース管理装置として、コンピュータを機能させるためのプログラム。   The program for functioning a computer as a database management apparatus of any one of Claims 1 thru | or 5. 請求項7に記載のプログラムをコンピュータ読み取り可能に記憶した記録媒体。   A recording medium storing the program according to claim 7 in a computer-readable manner.
JP2014127831A 2014-06-23 2014-06-23 Database management device, database management method, program, and recording medium Pending JP2016009225A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2014127831A JP2016009225A (en) 2014-06-23 2014-06-23 Database management device, database management method, program, and recording medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2014127831A JP2016009225A (en) 2014-06-23 2014-06-23 Database management device, database management method, program, and recording medium

Publications (1)

Publication Number Publication Date
JP2016009225A true JP2016009225A (en) 2016-01-18

Family

ID=55226761

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2014127831A Pending JP2016009225A (en) 2014-06-23 2014-06-23 Database management device, database management method, program, and recording medium

Country Status (1)

Country Link
JP (1) JP2016009225A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106682101A (en) * 2016-12-05 2017-05-17 福建天晴数码有限公司 Method and system for detecting operation anomalies of database script
KR20190054741A (en) * 2017-11-14 2019-05-22 주식회사 케이티 Method and Apparatus for Quality Management of Data

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106682101A (en) * 2016-12-05 2017-05-17 福建天晴数码有限公司 Method and system for detecting operation anomalies of database script
CN106682101B (en) * 2016-12-05 2019-09-20 福建天晴数码有限公司 A kind of database script is operating abnormally the method and system of detection
KR20190054741A (en) * 2017-11-14 2019-05-22 주식회사 케이티 Method and Apparatus for Quality Management of Data
KR102507837B1 (en) 2017-11-14 2023-03-07 주식회사 케이티 Method and Apparatus for Quality Management of Data

Similar Documents

Publication Publication Date Title
CN101650660B (en) Booting a computer system from central storage
KR101760778B1 (en) Computer system and method for updating program therein
US20130198730A1 (en) Update systems responsive to ongoing processing at a storage system
US20150227605A1 (en) Information processing terminal, synchronization control method, and computer-readable recording medium
EP3598301A1 (en) Cloud management platform, virtual machine management method, system thereof
US10956383B2 (en) Device backup and wipe
EP3267323A1 (en) Thin client system, connection management device, virtual machine operating device, method, and storage medium
CN113961510B (en) File processing method, device, equipment and storage medium
CN102272751A (en) Data integrity in a database environment through background synchronization
CN108475201A (en) A kind of data capture method in virtual machine start-up course and cloud computing system
CN108111598B (en) Cloud disk data issuing method and device and storage medium
CN104517067A (en) Method, device and system for data access
US20160173714A1 (en) Information processing apparatus, method of controlling the same, and storage medium
JP2016009225A (en) Database management device, database management method, program, and recording medium
CN111031126B (en) Cluster cache sharing method, system, equipment and storage medium
CN110096295B (en) Multi-module mobile application thermal updating method and system based on reactivating
CN111124256B (en) Method, apparatus and computer program product for managing storage
CN111274192A (en) Multi-BMC management system and blade server
US8219527B2 (en) File processing apparatus, file processing method, and computer program product
CN111708288B (en) Data processing method and device, electronic equipment and storage medium
CN114722003A (en) Centralized data acquisition method, device, equipment and storage medium
CN114328026A (en) Virtual disk backup method, device, equipment and medium
KR101298852B1 (en) Method of restoring file and system for the same
US9727378B2 (en) Persistent unenrollment for devices under management
CN113076273B (en) Component access method, device, electronic equipment, storage medium and program product

Legal Events

Date Code Title Description
RD03 Notification of appointment of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7423

Effective date: 20161101

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20161101