JP2007122405A - Performance tuning system for database management system - Google Patents

Performance tuning system for database management system Download PDF

Info

Publication number
JP2007122405A
JP2007122405A JP2005313684A JP2005313684A JP2007122405A JP 2007122405 A JP2007122405 A JP 2007122405A JP 2005313684 A JP2005313684 A JP 2005313684A JP 2005313684 A JP2005313684 A JP 2005313684A JP 2007122405 A JP2007122405 A JP 2007122405A
Authority
JP
Japan
Prior art keywords
sql
tuning
score
index
target
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
JP2005313684A
Other languages
Japanese (ja)
Inventor
Hiroshi Miyazaki
博史 宮崎
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.)
Hitachi Ltd
Original Assignee
Hitachi Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP2005313684A priority Critical patent/JP2007122405A/en
Publication of JP2007122405A publication Critical patent/JP2007122405A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To select an SQL group including a search system SQL and an update system SQL for finding an effective tuning method in an SQL group unit. <P>SOLUTION: An SQL group to be tuned is selected from statistic information accumulated through actual work operation and from an execution frequency and SQL processing time. Weighting matching priority is carried out among the SQL group, and a score target value is decided for each SQL. Tuning is carried out on the target SQL to calculate a score, and tuning satisfying the target value is decided. <P>COPYRIGHT: (C)2007,JPO&INPIT

Description

本発明はデータベース管理システムで実行するSQLの最適なチューニングを可能とするSQL性能チューニングの方式に関する。   The present invention relates to a SQL performance tuning method that enables optimum tuning of SQL executed in a database management system.

従来のSQL性能チューニングではSQL単位に性能チューニングを行う方式は実現されている。   In the conventional SQL performance tuning, a method of performing performance tuning in SQL units is realized.

また、特開2001−175678号公報に記載されているトランザクション単位でSQLの統計情報を抽出し、解析してチューニングを行う方法では複数のSQLを対象としたチューニングを可能としている。   Further, the method for extracting SQL statistical information in units of transactions, analyzing it, and performing tuning by performing tuning described in Japanese Patent Laid-Open No. 2001-175678 enables tuning for a plurality of SQLs.

更に、特開平10−111819号公報に記載されているリレーショナルデータベースのインデックス自動付加システムでは、検索系SQLおよび更新系SQLの複数SQLに対して有効なインデックスチューニングを可能としている。   Furthermore, the automatic index addition system for a relational database described in Japanese Patent Laid-Open No. 10-1111819 enables effective index tuning for a plurality of SQLs of a search system SQL and an update system SQL.

特開2001−175678号公報JP 2001-175678 A 特開平10−111819号公報JP 10-1111819 A

実際の電子商取引などのシステムでは、検索系や更新系の多種多様なSQLを実行して運用を行う。このようなシステムにおいてデータベースのアクセス性能を維持させる為にはSQL単位でのチューニングでは困難であった。性能向上を図るためには対象となるSQLを選出し、SQLグループとして互いの影響を考慮したチューニング方法が必須となる。   In an actual system such as electronic commerce, operation is performed by executing a wide variety of search and update SQL. In such a system, in order to maintain the database access performance, tuning by SQL unit is difficult. In order to improve performance, a target SQL is selected, and a tuning method considering the mutual influence as an SQL group is essential.

上記従来技術において、特開2001−175678号公報に記載されている方法では検索系のSQLには効果があるが、更新系のSQLには適用できないという問題点があった。   In the above prior art, the method described in Japanese Patent Application Laid-Open No. 2001-175678 is effective for search SQL, but cannot be applied to update SQL.

また、特開平10−111819号公報においては、インデックスを付加するというチューニング以外のチューニングについては適用できないという問題点があった。   Japanese Patent Application Laid-Open No. 10-1111819 has a problem that it cannot be applied to tuning other than tuning for adding an index.

したがって本発明の目的は上記の問題点を解決して、検索系および更新系SQLを含めたSQLグループを選出し、SQLグループ単位を対象としたSQLチューニングシステムを提供することにある。   Accordingly, an object of the present invention is to solve the above-described problems, to select an SQL group including a search system and an update system SQL, and to provide an SQL tuning system for an SQL group unit.

上記の目的を達成するため、本発明のデータベース管理システムの性能チューニングシステムは、業務プログラムが発行するリレーショナルデータベース処理操作用のSQLコマンドをデータベース管理システムで解析・実行し、データベース管理システムが取得する統計情報を基に業務プログラムが発行したSQLコマンドのうちチューニング対象とする複数のSQLコマンドを選出するSQLコマンド選出処理部と、選出した複数のSQLコマンドに対し目標となるスコアを設定して多様なチューニング実行時のスコアの算出結果から最適なチューニング方法を決定するSQLチューニング処理部を具備するシステムを構築することで課題を解決する。   In order to achieve the above object, a performance tuning system for a database management system according to the present invention uses a database management system to analyze and execute an SQL command for relational database processing operation issued by a business program, and to obtain statistics acquired by the database management system. Various tunings by setting a SQL command selection processing unit that selects a plurality of SQL commands to be tuned among SQL commands issued by a business program based on information, and a target score for the selected plurality of SQL commands The problem is solved by constructing a system including an SQL tuning processing unit that determines an optimal tuning method from a calculation result of a score at the time of execution.

本発明の性能チューニングシステムによれば、検索や更新を行う複数のSQLコマンドに対し、全てのSQLコマンドの性能を効率的に向上させることが可能となる。   According to the performance tuning system of the present invention, it is possible to efficiently improve the performance of all SQL commands with respect to a plurality of SQL commands for searching and updating.

以下、本発明であるデータベース管理システムの性能チューニングシステムにおける実施の形態を図面を用いて詳細に説明する。   Embodiments of a performance tuning system for a database management system according to the present invention will be described below in detail with reference to the drawings.

図1は本発明におけるデータベース管理システムの性能チューニングシステムの一実施形態を適用したシステム構成例を示すブロック図である。同図中、101は業務プログラム、102は業務プログラム101より発行されるSQL(Structured Query Language)コマンド、103はSQLコマンド102に応じた制御を実現するデータベース管理システム(DBMS)、104はSQLコマンド102の内容を解析して対応する検索処理や更新処理の実行制御を行うSQL解析・実行処理部、105はSQL解析・実行処理部104における処理に関する統計情報107を求める統計情報取得部、106は統計情報取得部105で取得した統計情報107を蓄積するジャーナル、108はSQLチューニングを行うSQLチューニングツール、109は統計情報107を基に対象となる複数のSQLコマンドを選出するSQLコマンド選出処理部、110はSQLコマンド選出処理部109で選出されたSQLコマンドに対しチューニングを行い、スコアにて判定を行うSQLチューニング処理部、111は業務プログラム101の対象となるリレーショナルデータベース(RDB)である。   FIG. 1 is a block diagram showing a system configuration example to which an embodiment of a performance tuning system for a database management system according to the present invention is applied. In the figure, 101 is a business program, 102 is an SQL (Structured Query Language) command issued by the business program 101, 103 is a database management system (DBMS) that realizes control according to the SQL command 102, and 104 is a SQL command 102. Is an SQL analysis / execution processing unit that performs execution control of the corresponding search processing and update processing by analyzing the contents of the URL, 105 is a statistical information acquisition unit that obtains statistical information 107 regarding processing in the SQL analysis / execution processing unit 104, and 106 is a statistical A journal for accumulating statistical information 107 acquired by the information acquisition unit 105, 108 a SQL tuning tool for performing SQL tuning, 109 an SQL command selection processing unit for selecting a plurality of target SQL commands based on the statistical information 107, 110 SQL command selection processing unit 109 An SQL tuning processing unit 111 that tunes the SQL command selected in step S1 and makes a determination based on a score.

図2は図1のシステムによるチューニングシステムの全体的手順の一例を示すフローチャートである。同図中、業務プログラムを実行して蓄積した統計情報を取得する(201)。そして、取得した統計情報から次に示す方法でSQLチューニング対象となるSQLコマンドを選出する(202)。
方法1:統計情報に含まれるSQLのうち、使用頻度の高いSQL順にソートして上位のものをチューニング対象SQLグループとして選出する。
方法2:統計情報に含まれるSQLのうち、性能の悪いSQL順にソートして上位のものをチューニング対象SQLグループとして選出する。
FIG. 2 is a flowchart showing an example of the overall procedure of the tuning system according to the system of FIG. In the figure, the statistical information accumulated by executing the business program is acquired (201). Then, an SQL command to be an SQL tuning target is selected from the acquired statistical information by the following method (202).
Method 1: Among the SQLs included in the statistical information, the higher ones are sorted in the order of the most frequently used SQLs and are selected as tuning target SQL groups.
Method 2: Among the SQLs included in the statistical information, the higher ones are selected as the tuning target SQL group by sorting in the order of the poorly performing SQL.

選出したSQLグループ中のSQLに対し、各SQLの重要度に応じた性能向上を図るため、合計スコアが100%になるように、SQL毎に重み付けを行う(203)。次に、各SQLの初期スコアの値を100とし、それぞれのSQLに対して行った重み付けの値と初期値からSQL毎の目標スコアを算出する(204)。その後、対象SQLグループに対しチューニング処理を行い対象SQLグループ中のSQL毎にスコアを算出する(205)。考えられるチューニング処理及びチューニング処理の組み合わせが全て終了するまで、実行及びスコアの算出を行う(206=NO)。全てのチューニングパターンに対し、スコアの算出が終了した場合(206=YES)は、算出結果の評価を行い最高のチューニング処理を選出する(207)。全てのチューニング結果が目標スコアを下回った場合でも、その中で最高のチューニング処理を選出する。   In order to improve the performance according to the importance of each SQL for the SQL in the selected SQL group, weighting is performed for each SQL so that the total score becomes 100% (203). Next, the value of the initial score of each SQL is set to 100, and the target score for each SQL is calculated from the weighted value and the initial value performed for each SQL (204). Thereafter, tuning processing is performed on the target SQL group, and a score is calculated for each SQL in the target SQL group (205). Execution and score calculation are performed until all possible tuning processes and combinations of tuning processes are completed (206 = NO). When score calculation is completed for all tuning patterns (206 = YES), the calculation result is evaluated and the best tuning process is selected (207). Even if all tuning results fall below the target score, the best tuning process is selected.

図3は図1中のSQLチューニング処理部で実施されるチューニングのスコアを算出するのに使用するチューニングテーブルの一例を示す図である。このチューニングテーブルはチューニング実行時にスコアを算出する為に使用するものであり、チューニング項目301、スコア値(基本値)302、変動値有無303から構成される。スコア値(基本値)302は検索系304、更新系305から構成され、チューニング項目301のチューニング実行した場合、検索系SQLに対してのチューニングであれば検索系304のスコア値を更新系SQLに対してのチューニングであれば更新系305のスコア値を適用する。変動値有無303は詳細な変動値表が存在するかを示し、「有(変動値表名)」もしくは「無」を設定する。例えば、「インデックスを設定する」というチューニングについては、インデックスを設定する列やインデックスの種類等でスコア値が変動するため、詳細なスコア値を算出するために対象となる変動値表にリンクを設定し、変動値表からスコア値の算出を行う。   FIG. 3 is a diagram showing an example of a tuning table used to calculate a score for tuning performed by the SQL tuning processing unit in FIG. This tuning table is used to calculate a score at the time of tuning execution, and includes a tuning item 301, a score value (basic value) 302, and a fluctuation value presence / absence 303. The score value (basic value) 302 includes a search system 304 and an update system 305. When tuning of the tuning item 301 is executed, the score value of the search system 304 is changed to the update system SQL if tuning is performed for the search system SQL. In the case of tuning, the score value of the update system 305 is applied. The fluctuation value presence / absence 303 indicates whether a detailed fluctuation value table exists, and “present (variation value table name)” or “none” is set. For example, for the tuning of “setting an index”, the score value varies depending on the column to which the index is set, the type of index, etc., so a link is set to the target fluctuation value table to calculate the detailed score value. Then, the score value is calculated from the fluctuation value table.

図4は図3のチューニング方法のうち、「対象列にインデックスを定義する」に関する変動値表の一例を示す図である。この変動値表は「対象列にインデックスを定義する」のチューニングを行う際にスコアを算出するのに使用する詳細なスコア値表であり、対象列401、対象列数402、チューニング内容403、スコア変動値404から構成される。   FIG. 4 is a diagram showing an example of a variation value table related to “define an index in the target column” in the tuning method of FIG. This fluctuation value table is a detailed score value table used to calculate a score when tuning “define an index for a target column”, and includes a target column 401, a target column number 402, a tuning content 403, and a score. It consists of a variation value 404.

図5は図3のチューニング方法のうち、「対象列のインデックスを削除する」に関する変動値表の一例を示す図である。この変動値表は上述した変動値表と同様に「対象列のインデックスを削除する」のチューニングを行う際にスコアを算出するのに使用する詳細なスコア値表であり、対象列501、対象列数502、チューニング内容503、スコア変動値504から構成される。   FIG. 5 is a diagram showing an example of a variation value table related to “delete the index of the target column” in the tuning method of FIG. This variation value table is a detailed score value table used for calculating a score when tuning “delete the index of the target column” is performed similarly to the above-described variation value table. Numeral 502, tuning contents 503, and score fluctuation value 504.

図6はチューニング対象となる在庫管理システム中の在庫管理表の一具体例を示す図である。この在庫管理表は商品コード601、商品名602、製造年603、数量604、価格605から構成される。また、同図には商品コード601にのみインデックスが定義されているものとする。   FIG. 6 is a diagram showing a specific example of an inventory management table in the inventory management system to be tuned. This inventory management table includes a product code 601, a product name 602, a manufacturing year 603, a quantity 604, and a price 605. In the figure, it is assumed that an index is defined only for the product code 601.

図7は図6の在庫管理システムにおいて、図2のチューニングシステムを適用した場合の結果の一具体例を示す図である。最初に取得した統計情報からチューニング対象となるSQLを使用頻度の高いもので選出した結果、該当SQLとして以下2つを選出した。なお、カラムに対応する値の部分は可変であり、以下のSQLは代表例である。
SQL1:select 商品コード from 在庫管理表 where 製造年 ≦ 2004 order by 商品コード,数量
SQL2:update 在庫管理表 set 価格 = 価格×0.7 where 製造年 ≦ 2004 and 価格 ≧ 100000
更に、統計情報からSQL1とSQL2の使用頻度の比率が6:4であったと仮定して、それぞれの重み付けをSQL1が60%、SQL2が40%と決定する。これよりSQL1、SQL2のスコアの目標値は初期値を100として、SQL1=160、SQL2=140と決定する。
FIG. 7 is a diagram showing a specific example of a result when the tuning system of FIG. 2 is applied to the inventory management system of FIG. As a result of selecting the SQL to be tuned with the most frequently used one from the statistical information acquired first, the following two were selected as the corresponding SQL. The value portion corresponding to the column is variable, and the following SQL is a representative example.
SQL1: select Product code from inventory control table where Year of manufacture ≦ 2004 order by Product code, quantity SQL2: update Inventory control table set Price = Price x 0.7 where Year of manufacture ≦ 2004 and Price ≧ 100000
Further, assuming that the ratio of the usage frequencies of SQL1 and SQL2 is 6: 4 from the statistical information, the weights of SQL1 and SQL2 are determined to be 60% and 40%, respectively. As a result, the SQL1 and SQL2 score target values are determined as SQL1 = 160 and SQL2 = 140, with the initial value set to 100.

次に、図3、図4及び図5の適用可能な全てのチューニング項目と全ての組み合わせについて、チューニング項目毎のスコア値を算出する。チューニングを実行した際のスコア値の例は以下のようになる。なお、更新件数は統計情報から10件と仮定する。
#1:「製造年」の列にシングルインデックスを定義する。
Next, score values for each tuning item are calculated for all applicable tuning items and all combinations shown in FIGS. An example of the score value when tuning is performed is as follows. The number of updates is assumed to be 10 from the statistical information.
# 1: A single index is defined in the column “Production Year”.

図3のチューニング方法のうち「対象列にインデックスを定義する」に当てはまるため、図4の変動値表からスコア値を算出する。   Since this applies to “define an index in the target column” in the tuning method of FIG. 3, a score value is calculated from the variation value table of FIG.

SQL1に関しては対象列401が「where探索条件」、対象列数402が「1つ」、チューニング403が「シングルカラムインデックスを定義する」に当てはまるため、スコア値は+20となり、結果は以下のようになる。
SQL1=100+20=120
SQL2も同様にスコア値を算出すると以下のようになる。
SQL2=100+20=120
以下同様にスコア値を算出した結果は以下のとおりになる。
#2:「製造年」と「価格」にそれぞれシングルカラムインデックスを定義する。
SQL1=100+20=120
SQL2=100+2×20+10×(−5)=90
#m:「商品コード」、「数量」、「製造年」の順でマルチカラムインデックスを定義する。
SQL1=100+40=140
SQL2=100
#n:「製造年」の列にシングルインデックスを定義する。かつ「商品コード」、「数量」、「製造年」の順でマルチカラムインデックスを定義する。
SQL1=100+40=140
SQL2=100+20=120
最後に選出したチューニング結果を目標スコア値と比較して評価を行うと、最適なチューニング項目は、「製造年」の列にシングルインデックスを定義する。かつ「商品コード」、「数量」、「製造年」の順でマルチカラムインデックスを定義するであることが求まる。
Regarding SQL1, since the target column 401 is “where search condition”, the target column number 402 is “1”, and the tuning 403 is “define a single column index”, the score value is +20, and the result is as follows: Become.
SQL1 = 100 + 20 = 120
Similarly, the score value of SQL2 is calculated as follows.
SQL2 = 100 + 20 = 120
Similarly, the result of calculating the score value is as follows.
# 2: A single column index is defined for each “year of manufacture” and “price”.
SQL1 = 100 + 20 = 120
SQL2 = 100 + 2 × 20 + 10 × (−5) = 90
#M: A multi-column index is defined in the order of “product code”, “quantity”, and “production year”.
SQL1 = 100 + 40 = 140
SQL2 = 100
#N: A single index is defined in the column “Production Year”. In addition, a multi-column index is defined in the order of “product code”, “quantity”, and “production year”.
SQL1 = 100 + 40 = 140
SQL2 = 100 + 20 = 120
When the last selected tuning result is compared with the target score value and evaluated, a single index is defined in the column “manufacturing year” as the optimum tuning item. In addition, it is determined that the multi-column index is defined in the order of “product code”, “quantity”, and “production year”.

このチューニング結果については、SQL2のチューニングでは「製造年」と「価格」にインデックスを定義した場合、update文の探索条件において、「価格」の検索に関しては性能が向上するが、インデックスを定義した「価格」の列自身を更新しているため、全体で考えた場合性能が劣化するという事実がスコア値に現れている。   As for this tuning result, when the index is defined for “year of manufacture” and “price” in the tuning of SQL2, in the search condition of the update statement, the performance is improved with respect to the search for “price”, but the index is defined as “ Since the “Price” column itself is updated, the fact that the performance deteriorates when considered as a whole appears in the score value.

また、SQL1については「商品コード」、「数量」、「製造年」の順でマルチカラムインデックスを定義することにより、インデックスだけで処理が可能となり、DBMS内部でソート処理を行わずにすむ為、order by句の性能が向上するのがスコア値に反映されている。なお、インデックスを定義するチューニングは更新系処理では性能劣化を引き起こす原因となるが、更新系のチューニング対象はSQL2のみであり、インデックスを定義した列は更新対象列でない為、性能劣化は発生しないという結果についてもスコア値に反映されている。   In addition, by defining a multi-column index in the order of “product code”, “quantity”, “manufacturing year” for SQL1, it becomes possible to perform processing only with the index, and it is not necessary to perform sort processing inside the DBMS. The performance of the order by clause is reflected in the score value. Note that tuning that defines an index causes performance degradation in update processing, but only SQL2 is the tuning target for the update system, and the performance definition does not occur because the column that defines the index is not the update target column. The result is also reflected in the score value.

図8は他の実施例としてチューニング対象となる問合わせシステム中の問合せ回答表の一具体例を示す図である。この問合せ回答表は問合せ日時801、問合せ者802、OS名803、製品名804、バージョン805、問合せ内容806、回答807、回答日時808から構成される。また、同図には問合せ日時801、OS名803、製品名804の3つの列に各々インデックスが定義されているものとする。   FIG. 8 is a diagram showing a specific example of an inquiry response table in an inquiry system to be tuned as another embodiment. This inquiry response table includes an inquiry date 801, an inquirer 802, an OS name 803, a product name 804, a version 805, an inquiry content 806, an answer 807, and an answer date 808. In the figure, it is assumed that indexes are defined in three columns of an inquiry date 801, an OS name 803, and a product name 804, respectively.

図9は図8の問合せシステムにおいて、図2のチューニングシステムを適用した場合の結果の一具体例を示す図である。最初に取得した統計情報からチューニング対象となるSQLを使用頻度の高いもので選出した結果、該当SQLとして以下2つを選出した。なお、カラムに対応する値の部分は可変であり、以下のSQLは代表例である。
SQL1:select 問合せ内容,回答 from 問合せ回答表 where OS名 = "OS2" and 製品名 = "製品3" and バージョン="5.0"
SQL2:insert into 問合せ回答表 values('2005/02/05',"tanaka","OS4","製品3","4.0","質問内容10","回答内容10",'2005/02/06')
更に、統計情報からSQL1とSQL2の使用頻度の比率が4:6であったと仮定して、それぞれの重み付けをSQL1が40%、SQL2が60%と決定する。これよりSQL1、SQL2のスコアの目標値は初期値を100として、
SQL1=140、SQL2=160と決定する。
FIG. 9 is a diagram showing a specific example of a result when the tuning system of FIG. 2 is applied to the inquiry system of FIG. As a result of selecting the SQL to be tuned with the most frequently used one from the statistical information acquired first, the following two were selected as the corresponding SQL. The value portion corresponding to the column is variable, and the following SQL is a representative example.
SQL1: select Query contents, answer from query answer table where OS name = "OS2" and product name = "product 3" and version = "5.0"
SQL2: insert into Query Response Table values ('2005/02/05', "tanaka", "OS4", "Product 3", "4.0", "Question Content 10", "Response Content 10", '2005/02 / 06 ')
Furthermore, assuming that the ratio of the usage frequencies of SQL1 and SQL2 is 4: 6 from the statistical information, the respective weights are determined to be 40% for SQL1 and 60% for SQL2. From this, SQL1 and SQL2 score target values are set to 100 as the initial value.
SQL1 = 140 and SQL2 = 160 are determined.

次に上述した在庫管理システムと同様に図3、図4及び図5の適用可能な全てのチューニング項目と全ての組み合わせについて、チューニング項目毎のスコア値を算出する。なお、問合わせ内容の追加件数は統計情報から10件と仮定する。
#1:「バージョン」にシングルカラムインデックスを定義する。
SQL1=100+20=120
SQL2=100+10×(−5)=50
#2:「OS名」、「製品名」、「バージョン」をマルチカラムインデックスで再定義する。
SQL1=100+30=130
SQL2=100+20=120
#m:「問合わせ日時」に定義しているインデックスを削除する。
SQL1=100
SQL2=100+1×30=130
#n:「OS名」、「製品名」、「バージョン」をマルチカラムインデックスで再定義する。かつ、「問合わせ日時」に定義しているインデックスを削除する。
SQL1=100+30=130
SQL2=100+20+1×30=150
最後に選出したチューニング結果を目標スコア値と比較して評価を行うと、最適なチューニング項目は、「OS名」、「製品名」、「バージョン」をマルチカラムインデックスで再定義する。かつ、「問合わせ日時」に定義しているインデックスを削除するであることが求まる。
Next, as with the inventory management system described above, score values for each tuning item are calculated for all applicable tuning items and all combinations shown in FIGS. It is assumed that the number of additional inquiry contents is 10 from the statistical information.
# 1: A single column index is defined for “version”.
SQL1 = 100 + 20 = 120
SQL2 = 100 + 10 × (−5) = 50
# 2: “OS name”, “product name”, and “version” are redefined with a multi-column index.
SQL1 = 100 + 30 = 130
SQL2 = 100 + 20 = 120
#M: Delete the index defined in “inquiry date”.
SQL1 = 100
SQL2 = 100 + 1 × 30 = 130
#N: “OS name”, “product name”, and “version” are redefined with a multi-column index. In addition, the index defined in the “query date and time” is deleted.
SQL1 = 100 + 30 = 130
SQL2 = 100 + 20 + 1 × 30 = 150
When the last selected tuning result is evaluated by comparing with the target score value, “OS name”, “product name”, and “version” are redefined as multi-column indexes as the optimum tuning items. In addition, it is determined that the index defined in “inquiry date” is to be deleted.

このチューニング結果について、SQL1のチューニングに関しては探索条件で使用する「バージョン」にインデックスが定義されていない為、「バージョン」にインデックスを定義することでSQL1の性能は向上するが、更新系のSQL2の性能が劣化することがスコア値からも明白である。そこで、SQL2の性能を考慮して現状のシングルカラムインデックスから「OS名」、「製品名」、「バージョン」のマルチカラムインデックスに定義変更することで、インデックスの数を減らし、SQL2に対しても性能向上が図れるというのがスコア値を通して確認できる。また、SQL2は挿入を行うSQLである為、インデックスを定義数が増加すると性能が劣化する。チューニング対象となる検索系のSQL1では「問合せ日時」を選択式や探索条件に使用していないので、「問合せ日時」のインデックスを削除しても性能に影響しないということがスコア値に現れている。   As for the tuning result, since the index is not defined in the “version” used in the search condition for the tuning of the SQL1, the performance of the SQL1 is improved by defining the index in the “version”, but the SQL2 of the update system is improved. It is clear from the score value that the performance deteriorates. Therefore, considering the performance of SQL2, by changing the definition from the current single column index to the multi-column index of “OS name”, “product name”, and “version”, the number of indexes is reduced, and SQL2 is also used. It can be confirmed through the score that performance can be improved. Also, since SQL2 is an SQL that performs insertion, the performance degrades when the number of index definitions increases. In the SQL 1 of the search system to be tuned, “query date” is not used in the selection formula or search condition, so that deleting the “query date” index does not affect the performance, which appears in the score value. .

本実施形態によれば、対象SQLをグループ単位で判定するため、実際に行うチューニングが各SQLに及ぼす影響を考慮しながら、SQLのグループとして最適となるチューニング方法を求めることができる。   According to the present embodiment, since the target SQL is determined in units of groups, it is possible to obtain a tuning method that is optimal for a SQL group while considering the influence of actual tuning on each SQL.

本発明におけるデータベース管理システムの性能チューニングシステムの一実施形態を適用したシステム構成例を示すブロック図である。It is a block diagram which shows the system configuration example to which one Embodiment of the performance tuning system of the database management system in this invention is applied. 図1のシステムによるチューニングシステムの全体的手順の一例を示すフローチャートである。It is a flowchart which shows an example of the whole procedure of the tuning system by the system of FIG. 図1中のSQLチューニング処理部で実施されるチューニングのスコアを算出するのに使用するチューニングテーブルの一例を示す図である。It is a figure which shows an example of the tuning table used in order to calculate the score of tuning implemented in the SQL tuning process part in FIG. 図3のチューニング方法のうち、「対象列にインデックスを定義する」に関する変動値表の一例を示す図である。FIG. 4 is a diagram illustrating an example of a variation value table related to “define an index in a target column” in the tuning method of FIG. 3. 図3のチューニング方法のうち、「対象列のインデックスを削除する」に関する変動値表の一例を示す図である。FIG. 4 is a diagram illustrating an example of a variation value table related to “delete target column index” in the tuning method of FIG. 3. チューニング対象となる在庫管理システム中の在庫管理表の一具体例を示す図である。It is a figure which shows one specific example of the inventory management table | surface in the inventory management system used as tuning object. 図6の在庫管理システムにおいて、図2のチューニングシステムを適用した場合の結果の一具体例を示す図である。FIG. 7 is a diagram illustrating a specific example of a result when the tuning system of FIG. 2 is applied to the inventory management system of FIG. 6. チューニング対象となる問合わせシステム中の問合せ回答表の一具体例を示す図である。It is a figure which shows one specific example of the inquiry reply table in the inquiry system used as tuning object. 図8の問合せシステムにおいて、図2のチューニングシステムを適用した場合の結果の一具体例を示す図である。FIG. 9 is a diagram illustrating a specific example of a result when the tuning system of FIG. 2 is applied to the inquiry system of FIG. 8.

符号の説明Explanation of symbols

101…業務プログラム、102…SQLコマンド、103…データベース管理システム(DBMS)、104…SQL解析・実行処理部、105…統計情報取得部、106…ジャーナル、107…統計情報、108…SQLチューニングツール、109…SQLコマンド選出処理部、110…SQLチューニング処理部、111…リレーショナルデータベース(RDB)。
DESCRIPTION OF SYMBOLS 101 ... Business program, 102 ... SQL command, 103 ... Database management system (DBMS), 104 ... SQL analysis / execution processing unit, 105 ... Statistical information acquisition unit, 106 ... Journal, 107 ... Statistical information, 108 ... SQL tuning tool, 109: SQL command selection processing unit, 110: SQL tuning processing unit, 111: Relational database (RDB).

Claims (3)

業務プログラムが発行したSQLコマンドのうちチューニング対象とする複数のSQLコマンドを選出するSQLコマンド選出処理部と、前記選出した複数のSQLコマンドに対し複数のチューニング方法で算出したスコア値によりチューニング方法を決定するSQLチューニング処理部を具備することを特徴とするチューニングシステム。   A SQL command selection processing unit that selects a plurality of SQL commands to be tuned from among SQL commands issued by the business program, and a tuning method is determined by score values calculated by a plurality of tuning methods for the selected SQL commands. A tuning system comprising an SQL tuning processing unit. 請求項1のシステムにおいて、統計情報を基にチューニング対象となる複数のSQLコマンドを選出することを特徴とするチューニングシステム。   The tuning system according to claim 1, wherein a plurality of SQL commands to be tuned are selected based on statistical information. 請求項1又は請求項2のシステムにおいて、チューニング対象となる複数のSQLコマンドに対し、優先度に基づいて性能チューニングの目標値を決定することを特徴とするチューニングシステム。
3. The system according to claim 1, wherein a target value for performance tuning is determined based on priority for a plurality of SQL commands to be tuned.
JP2005313684A 2005-10-28 2005-10-28 Performance tuning system for database management system Pending JP2007122405A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2005313684A JP2007122405A (en) 2005-10-28 2005-10-28 Performance tuning system for database management system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2005313684A JP2007122405A (en) 2005-10-28 2005-10-28 Performance tuning system for database management system

Publications (1)

Publication Number Publication Date
JP2007122405A true JP2007122405A (en) 2007-05-17

Family

ID=38146193

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2005313684A Pending JP2007122405A (en) 2005-10-28 2005-10-28 Performance tuning system for database management system

Country Status (1)

Country Link
JP (1) JP2007122405A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011107814A (en) * 2009-11-13 2011-06-02 Hitachi Ltd Database management method, database management device and database management program
JP6048997B1 (en) * 2016-06-16 2016-12-21 株式会社FiNC Health management server, health management server control method, and health management program
KR20190022434A (en) * 2017-02-20 2019-03-06 핑안 테크놀로지 (션젼) 컴퍼니 리미티드 Method of optimizing a database system, system, electronic device and storage medium
US11003649B2 (en) 2015-12-01 2021-05-11 Alibaba Group Holding Limited Index establishment method and device

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011107814A (en) * 2009-11-13 2011-06-02 Hitachi Ltd Database management method, database management device and database management program
US11003649B2 (en) 2015-12-01 2021-05-11 Alibaba Group Holding Limited Index establishment method and device
JP6048997B1 (en) * 2016-06-16 2016-12-21 株式会社FiNC Health management server, health management server control method, and health management program
JP2017224180A (en) * 2016-06-16 2017-12-21 株式会社FiNC Health management server, health management server control method, and health management program
KR20190022434A (en) * 2017-02-20 2019-03-06 핑안 테크놀로지 (션젼) 컴퍼니 리미티드 Method of optimizing a database system, system, electronic device and storage medium
JP2019508774A (en) * 2017-02-20 2019-03-28 平安科技(深▲せん▼)有限公司 Database system optimization method, system, electronic device and storage medium
KR102141083B1 (en) 2017-02-20 2020-08-05 핑안 테크놀로지 (션젼) 컴퍼니 리미티드 Optimization methods, systems, electronic devices and storage media of database systems

Similar Documents

Publication Publication Date Title
Benites et al. Haram: a hierarchical aram neural network for large-scale text classification
US7966315B2 (en) Multi-query optimization
US7447681B2 (en) Method, system and program for selection of database characteristics
US8458167B2 (en) Client-based index advisor
US20100185637A1 (en) Methods for matching metadata from disparate data sources
EP3456360A1 (en) Device and method for tuning relational database
CN106909642B (en) Database indexing method and system
US10210280B2 (en) In-memory database search optimization using graph community structure
CN106991141B (en) Association rule mining method based on deep pruning strategy
WO2016184159A1 (en) Big data calculation method and system
JP2007122405A (en) Performance tuning system for database management system
US20050108204A1 (en) System and method for managing OLAP summary tables
CN112162986B (en) Parallel top-k range skyline query method and system
CN107085603B (en) Data processing method and device
Arulraj et al. Predictive indexing
CN114090590B (en) Multi-object label data extraction method and system
CN105678430A (en) Improved user recommendation method based on neighbor project slope one algorithm
US8666986B2 (en) Grid-based data clustering method
US11386155B2 (en) Filter evaluation in a database system
Hong et al. Erasable pattern mining with quantitative information
CN111221864B (en) Intelligent index recommendation method based on mysql slow query log word frequency analysis
Margoor et al. Improving join reordering for large scale distributed computing
US8666972B2 (en) System and method for content management and determination of search conditions
Rao et al. Discovery of preliminary centroids using improved k-means clustering algorithm
CN116541420B (en) Vector data query method