JP2018124658A - Information processing device, program and information processing method - Google Patents

Information processing device, program and information processing method Download PDF

Info

Publication number
JP2018124658A
JP2018124658A JP2017014518A JP2017014518A JP2018124658A JP 2018124658 A JP2018124658 A JP 2018124658A JP 2017014518 A JP2017014518 A JP 2017014518A JP 2017014518 A JP2017014518 A JP 2017014518A JP 2018124658 A JP2018124658 A JP 2018124658A
Authority
JP
Japan
Prior art keywords
query
execution
progress
scan
server
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
JP2017014518A
Other languages
Japanese (ja)
Inventor
貴司 三浦
Takashi Miura
貴司 三浦
中村 実
Minoru Nakamura
実 中村
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.)
Fujitsu Ltd
Original Assignee
Fujitsu 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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP2017014518A priority Critical patent/JP2018124658A/en
Publication of JP2018124658A publication Critical patent/JP2018124658A/en
Pending legal-status Critical Current

Links

Images

Abstract

PROBLEM TO BE SOLVED: To shorten a period in which a resource is used.SOLUTION: A storage unit 1a stores data D1 to be processed by a plurality of processes contained in a query Q1. A processing unit 1b determines a monitoring object process whose processing load is estimated to be larger than a prescribed load among the plurality of processes on the basis of data D1 stored in the storage unit 1a. The processing unit 1b instructs both of a first device 2 and a second device 3 to start execution of the query Q1. The processing unit 1b obtains first progress information of the monitoring object process executed by the first device 2, and obtains second progress information of the monitoring object process executed by the second device 3. The processing unit 1b instructs stop of the execution of the query Q1 to one of the first device 2 and the second device 3 on the basis of the first progress information and the second progress information.SELECTED DRAWING: Figure 1

Description

本発明は情報処理装置、プログラムおよび情報処理方法に関する。   The present invention relates to an information processing apparatus, a program, and an information processing method.

情報処理の分野では、処理対象となるデータの規模が増している。処理対象のデータが大規模化すると、コンピュータなどによるデータ処理の時間が増す。そこで、データ処理を高速に行う方法が考えられている。   In the field of information processing, the scale of data to be processed is increasing. When the data to be processed becomes large, the time for data processing by a computer or the like increases. Therefore, a method of performing data processing at high speed has been considered.

例えば、マルチデータベースシステム(MDBS:Multi DataBase System)において、データ検索における照会応答時間を短縮する方法の提案がある。この提案では、MDBSは、複数の地点に存在する複数のデータベースに対する大域的なアクセスを可能にする。MDBSは、各地に点在する複数のテーブルに対する複数の結合演算を含む照会ツリーを、各結合演算を並列化できるように変換する。MDBSは、変換後のツリーによりデータ照会のうち複数の結合演算を並列に実行することで、照会応答時間を短縮する。   For example, in a multi-database system (MDBS: Multi DataBase System), there is a proposal of a method for reducing a query response time in data search. In this proposal, MDBS allows global access to multiple databases residing at multiple locations. The MDBS converts a query tree including a plurality of join operations for a plurality of tables scattered in various places so that each join operation can be parallelized. The MDBS shortens the query response time by executing a plurality of join operations among the data queries in parallel by the converted tree.

特開平8−328920号公報JP-A-8-328920

ところで、制御用の装置が、2つの装置それぞれにデータ処理に関するクエリ(処理命令の集合)を実行させ、早く実行を完了した方の実行結果を採用することで、応答時間の短縮を図ることも考えられる。   By the way, the control device causes each of the two devices to execute a query related to data processing (a set of processing instructions), and adopts the execution result of which the execution is completed earlier, thereby shortening the response time. Conceivable.

この場合、一方の装置で実行結果が得られると、他方の装置による処理は余計になる。そこで、実行結果が得られた後に、他方の装置による処理の実行を停止させることが考えられる。しかし、この方法では、一方の装置で実行結果が得られるまで、他方の装置で当該処理のためにリソースが使用され続けるという問題がある。   In this case, if an execution result is obtained by one device, the processing by the other device becomes unnecessary. Therefore, it is conceivable to stop execution of processing by the other device after the execution result is obtained. However, this method has a problem in that resources are continuously used for the processing in the other device until an execution result is obtained in one device.

1つの側面では、本発明は、リソースが使用される期間を短縮可能にすることを目的とする。   In one aspect, the present invention aims to make it possible to shorten the period during which resources are used.

1つの態様では、情報処理装置が提供される。情報処理装置は、記憶部と処理部とを有する。記憶部は、クエリに含まれる複数の処理による処理対象のデータを記憶する。処理部は、記憶部に記憶されたデータに基づいて複数の処理のうち処理負荷が所定の負荷よりも大きいと推定される監視対象処理を決定し、第1の装置および第2の装置の両方にクエリの実行開始を指示し、第1の装置により実行される監視対象処理の第1の進捗情報を取得し、第2の装置により実行される監視対象処理の第2の進捗情報を取得し、第1の進捗情報および第2の進捗情報に基づいて、第1の装置および第2の装置のうちの1の装置にクエリの実行停止を指示する。   In one aspect, an information processing apparatus is provided. The information processing apparatus includes a storage unit and a processing unit. The storage unit stores data to be processed by a plurality of processes included in the query. The processing unit determines a monitoring target process in which the processing load is estimated to be larger than a predetermined load among the plurality of processes based on the data stored in the storage unit, and both the first device and the second device To start execution of the query, obtain first progress information of the monitoring target process executed by the first device, and obtain second progress information of the monitoring target processing executed by the second device Based on the first progress information and the second progress information, one of the first device and the second device is instructed to stop execution of the query.

1つの側面では、リソースが使用される期間を短縮できる。   In one aspect, the period during which resources are used can be shortened.

第1の実施の形態の情報処理装置を示す図である。It is a figure which shows the information processing apparatus of 1st Embodiment. 第2の実施の形態の情報処理システムの例を示す図である。It is a figure which shows the example of the information processing system of 2nd Embodiment. DBサーバのハードウェア例を示す図である。It is a figure which shows the hardware example of DB server. システムの機能例を示す図である。It is a figure which shows the function example of a system. DBのテーブル例を示す図である。It is a figure which shows the example of a table of DB. クエリの例を示す図である。It is a figure which shows the example of a query. プランツリーの例を示す図である。It is a figure which shows the example of a plan tree. オフロード選択テーブルの例を示す図である。It is a figure which shows the example of an offload selection table. スキャン進捗率の差の例を示す図である。It is a figure which shows the example of the difference of a scan progress rate. DBサーバの処理の例を示すフローチャートである。It is a flowchart which shows the example of a process of DB server. クエリ実行制御の例を示すフローチャートである。It is a flowchart which shows the example of query execution control. サブ制御の例を示すフローチャートである。It is a flowchart which shows the example of sub control. クエリ実行制御の第1の例を示す図である。It is a figure which shows the 1st example of query execution control. クエリ実行制御の第2の例を示す図である。It is a figure which shows the 2nd example of query execution control. クエリ実行制御の第3の例を示す図である。It is a figure which shows the 3rd example of query execution control. クエリ実行制御の第4の例を示す図である。It is a figure which shows the 4th example of query execution control. クエリ実行制御の第5の例を示す図である。It is a figure which shows the 5th example of query execution control. クエリ実行制御の第6の例を示す図である。It is a figure which shows the 6th example of query execution control. リソース解放のタイミングの例を示す図である。It is a figure which shows the example of the timing of resource release. リソース解放のタイミングの比較例を示す図である。It is a figure which shows the comparative example of the timing of resource release.

以下、本実施の形態について図面を参照して説明する。
[第1の実施の形態]
図1は、第1の実施の形態の情報処理装置を示す図である。情報処理装置1は、第1の装置2、第2の装置3、端末装置4および記憶装置5とネットワーク6を介して接続されている。情報処理装置1は、端末装置4によるクエリQ1の入力を受け付ける。「クエリ」は、データに対する処理内容を示す命令の集合である。このため、クエリは、複数の命令に対応する複数の処理を含むといえる。「クエリ」は、「処理の要求」、「照会の要求」あるいは「問い合わせの要求」などと表すこともできる。
Hereinafter, the present embodiment will be described with reference to the drawings.
[First Embodiment]
FIG. 1 is a diagram illustrating the information processing apparatus according to the first embodiment. The information processing device 1 is connected to the first device 2, the second device 3, the terminal device 4, and the storage device 5 via a network 6. The information processing apparatus 1 receives an input of the query Q1 from the terminal device 4. A “query” is a set of instructions indicating the processing content for data. For this reason, it can be said that the query includes a plurality of processes corresponding to a plurality of instructions. The “query” can also be expressed as “processing request”, “query request”, or “query request”.

情報処理装置1は、第1の装置2および第2の装置3の両方に、クエリQ1を実行させる。情報処理装置1は、第1の装置2および第2の装置3のうち、早く実行完了した方の実行結果を採用する。   The information processing device 1 causes both the first device 2 and the second device 3 to execute the query Q1. The information processing apparatus 1 employs the execution result of the first apparatus 2 and the second apparatus 3 that has completed execution earlier.

ここで、例えば、両装置のハードウェア構成やソフトウェア構成の相違は、処理の速さに影響を及ぼし得る。第1の装置2が第1の種類のデータ処理を第2の装置3よりも高速に実行することもあれば、第2の装置3が第2の種類のデータ処理を第1の装置2よりも高速に実行することもある。しかし、あるクエリを両装置の何れの方が高速に実行できるかを事前に判断することは難しい。このため、情報処理装置1は、第1の装置2および第2の装置3の両方にクエリQ1を実行させた上で、早く実行完了した方から実行結果を取得し、端末装置4に応答する。このような運用において、情報処理装置1は、第1の装置2および第2の装置3によるリソース利用の効率化を図る機能を提供する。情報処理装置1は、記憶部1aおよび処理部1bを有する。   Here, for example, a difference in hardware configuration or software configuration between the two apparatuses may affect the processing speed. The first device 2 may execute the first type of data processing at a higher speed than the second device 3, or the second device 3 may execute the second type of data processing from the first device 2. Sometimes run faster. However, it is difficult to determine in advance which one of the two devices can execute a certain query at high speed. For this reason, the information processing apparatus 1 causes both the first apparatus 2 and the second apparatus 3 to execute the query Q1, acquires the execution result from the earlier completed execution, and responds to the terminal apparatus 4. . In such an operation, the information processing apparatus 1 provides a function for improving the efficiency of resource utilization by the first device 2 and the second device 3. The information processing apparatus 1 includes a storage unit 1a and a processing unit 1b.

記憶部1aは、RAM(Random Access Memory)などの揮発性記憶装置でもよいし、HDD(Hard Disk Drive)やフラッシュメモリなどの不揮発性記憶装置でもよい。処理部1bは、CPU(Central Processing Unit)、DSP(Digital Signal Processor)、ASIC(Application Specific Integrated Circuit)、FPGA(Field Programmable Gate Array)などを含み得る。処理部1bはプログラムを実行するプロセッサであってもよい。ここでいう「プロセッサ」には、複数のプロセッサの集合(マルチプロセッサ)も含まれ得る。   The storage unit 1a may be a volatile storage device such as a RAM (Random Access Memory) or a non-volatile storage device such as an HDD (Hard Disk Drive) or a flash memory. The processing unit 1b may include a CPU (Central Processing Unit), a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array), and the like. The processing unit 1b may be a processor that executes a program. As used herein, the “processor” may include a set of multiple processors (multiprocessor).

記憶部1aは、クエリQ1に含まれる複数の処理による処理対象のデータ(処理対象データ)D1を記憶する。例えば、クエリQ1は、処理proc1,proc2,proc3,proc4,・・・を含む。また、処理対象データD1は、データセットd1,d2,d3を含む。処理proc1は、データセットd1に対する処理である。処理proc2は、データセットd2に対する処理である。処理proc3は、データセットd3に対する処理である。例えば、処理対象データD1は、記憶装置5に記憶されたデータの母集団の一部でもよい。   The storage unit 1a stores data to be processed (processing target data) D1 by a plurality of processes included in the query Q1. For example, the query Q1 includes processes proc1, proc2, proc3, proc4,. The processing target data D1 includes data sets d1, d2, and d3. The process proc1 is a process for the data set d1. The process proc2 is a process for the data set d2. The process proc3 is a process for the data set d3. For example, the processing target data D1 may be a part of the population of data stored in the storage device 5.

処理部1bは、端末装置4によるクエリQ1の入力を受け付ける。処理部1bは、記憶部1aに記憶されたデータ(処理対象データD1)に基づいて、クエリQ1に含まれる複数の処理のうち処理負荷が所定の負荷よりも大きいと推定される監視対象処理を決定する。監視対象処理は、1つでもよいし、複数でもよい。また、処理部1bは、受け付けたクエリQ1に基づいて、クエリQ1に複数の処理により用いられる処理対象データD1を特定し、処理対象データD1を記憶装置5から取得し、記憶部1aに格納してもよい。   The processing unit 1b receives an input of the query Q1 from the terminal device 4. Based on the data (processing target data D1) stored in the storage unit 1a, the processing unit 1b performs a monitoring target process in which a processing load is estimated to be larger than a predetermined load among a plurality of processes included in the query Q1. decide. One or more monitoring target processes may be performed. Further, the processing unit 1b specifies the processing target data D1 used by the plurality of processes for the query Q1 based on the received query Q1, acquires the processing target data D1 from the storage device 5, and stores it in the storage unit 1a. May be.

ここで、「処理負荷」は、該当の処理を実行する装置に与える負荷を意味する。例えば、処理部1bは、複数の処理それぞれの演算コストを、複数の処理それぞれの処理負荷とすることが考えられる。処理部1bは、処理対象となるデータセットに対する演算のステップ数やステップ数に対応する指標などにより、各処理の演算コストを評価し得る。より具体的には、処理部1bは、データセットに含まれるレコード数などの情報量を演算コストとしてもよい。処理対象となる情報量が増すほど、演算コストも増す可能性が高いからである。なお、「レコード」は、データセットに属する情報の単位であり、例えば、データセットがテーブルの場合、テーブルの1行に相当する。   Here, “processing load” means a load applied to a device that executes the corresponding process. For example, the processing unit 1b may consider the calculation cost of each of the plurality of processes as the processing load of each of the plurality of processes. The processing unit 1b can evaluate the calculation cost of each process based on the number of calculation steps for the data set to be processed and an index corresponding to the number of steps. More specifically, the processing unit 1b may use the information amount such as the number of records included in the data set as the calculation cost. This is because the calculation cost is likely to increase as the amount of information to be processed increases. The “record” is a unit of information belonging to the data set. For example, when the data set is a table, it corresponds to one row of the table.

一例では、「所定の負荷」は、レコード数の閾値によって定められる。処理部1bは、データセットd1,d2,d3それぞれのレコード数を閾値と比較する。ここでは、データセットd1のレコード数は、閾値より大きい。データセットd2のレコード数は、閾値より大きい。データセットd3のレコード数は、閾値より小さい。この場合、処理部1bは、データセットd1を用いる処理proc1、および、データセットd2を用いる処理proc2を、監視対象処理と決定する。   In one example, the “predetermined load” is determined by a threshold for the number of records. The processing unit 1b compares the number of records in each of the data sets d1, d2, and d3 with a threshold value. Here, the number of records in the data set d1 is larger than the threshold value. The number of records in the data set d2 is larger than the threshold value. The number of records in the data set d3 is smaller than the threshold value. In this case, the processing unit 1b determines that the process proc1 using the data set d1 and the process proc2 using the data set d2 are monitoring target processes.

処理部1bは、第1の装置2および第2の装置3の両方にクエリQ1の実行開始を指示する。例えば、処理部1bは、クエリQ1の実行開始を指示する所定の命令を、第1の装置2および第2の装置3の両方に送信することで、クエリQ1の実行開始を指示する。   The processing unit 1b instructs both the first device 2 and the second device 3 to start executing the query Q1. For example, the processing unit 1b instructs the start of execution of the query Q1 by transmitting a predetermined command for instructing the start of execution of the query Q1 to both the first device 2 and the second device 3.

第1の装置2は、実行開始の指示を受け付けると、クエリQ1の実行を開始する。第2の装置3は、実行開始の指示を受け付けると、クエリQ1の実行を開始する。クエリQ1に含まれる複数の処理それぞれは、第1の装置2および第2の装置3それぞれにより個別に実行される。なお、処理部1bは、第1の装置2および第2の装置3に、処理対象データD1を提供してもよい。   When the first device 2 receives an instruction to start execution, the first device 2 starts executing the query Q1. When the second device 3 receives an instruction to start execution, the second device 3 starts executing the query Q1. Each of the plurality of processes included in the query Q1 is individually executed by the first device 2 and the second device 3, respectively. The processing unit 1b may provide the processing target data D1 to the first device 2 and the second device 3.

処理部1bは、第1の装置2により実行される監視対象処理の第1の進捗情報を取得する。また、処理部1bは、第2の装置3により実行される監視対象処理の第2の進捗情報を取得する。ここで、進捗情報は、例えば、監視対象処理の進捗率を示す。一例では、進捗率は、監視対象処理により用いられるデータセットの全レコード数Nおよび処理済レコード数nに対し、n/N×100(%)である。   The processing unit 1 b acquires first progress information of the monitoring target process executed by the first device 2. In addition, the processing unit 1 b acquires second progress information of the monitoring target process executed by the second device 3. Here, the progress information indicates, for example, the progress rate of the monitoring target process. In one example, the progress rate is n / N × 100 (%) with respect to the total number of records N and the number of processed records n of the data set used by the monitoring target process.

例えば、処理部1bは、監視対象処理の進捗を第1の装置2に問い合わせることで、第1の進捗情報を取得してもよい。あるいは、処理部1bは、第1の装置2による監視対象処理の進捗に応じて、監視対象処理で用いられるデータセットに含まれるレコードを、順番に、第1の装置2に提供することも考えられる。この場合、処理部1bは、第1の装置2に対するレコードの提供状況から第1の進捗情報を取得してもよい。同様に、処理部1bは、第2の装置3へ問い合わせることで第2の進捗情報を取得する。または、処理部1bは、第2の装置3に対するレコードの提供状況から第2の進捗情報を取得してもよい。   For example, the processing unit 1b may acquire the first progress information by inquiring the first device 2 about the progress of the monitoring target process. Alternatively, the processing unit 1b may provide the first device 2 with records included in the data set used in the monitoring target process in order according to the progress of the monitoring target process by the first device 2. It is done. In this case, the processing unit 1b may obtain the first progress information from the record provision status with respect to the first device 2. Similarly, the processing unit 1b acquires the second progress information by making an inquiry to the second device 3. Alternatively, the processing unit 1b may acquire the second progress information from the record provision status with respect to the second device 3.

そして、処理部1bは、第1の進捗情報および第2の進捗情報に基づいて、第1の装置2および第2の装置3のうちの1の装置にクエリQ1の実行停止を指示する。例えば、処理部1bは、第1の進捗情報および第2の進捗情報に基づいて、一方の装置で全ての監視対象処理の進捗率が100%に達したか否かを判定する。処理部1bは、一方の装置で全ての監視対象処理の進捗率が100%に達したと判定すると、他方の装置に対して、クエリQ1の実行停止を指示する。また、処理部1bは、一方の装置で全ての監視対象処理の進捗率が100%に達していないと判定すると、両方の装置によるクエリQ1の実行を継続させる。なお、「全ての監視対象処理の進捗率が100%に達したこと」は、「全ての監視対象処理の実行が完了したこと」ともいえる。また、例えば、処理部1bは、クエリQ1の実行停止を指示する所定の命令を、第1の装置2および第2の装置3のうちの1の装置に送信することで、当該1の装置に、クエリQ1の実行停止を指示する。   Then, the processing unit 1b instructs one of the first device 2 and the second device 3 to stop execution of the query Q1 based on the first progress information and the second progress information. For example, based on the first progress information and the second progress information, the processing unit 1b determines whether the progress rate of all the monitoring target processes has reached 100% in one device. If the processing unit 1b determines that the progress rate of all the monitoring target processes has reached 100% in one device, the processing unit 1b instructs the other device to stop executing the query Q1. If the processing unit 1b determines that the progress rate of all the monitoring target processes has not reached 100% in one device, the processing unit 1b continues execution of the query Q1 by both devices. Note that “the progress rate of all the monitoring target processes has reached 100%” can be said to be “the execution of all the monitoring target processes has been completed”. Further, for example, the processing unit 1b transmits a predetermined instruction instructing to stop the execution of the query Q1 to one of the first device 2 and the second device 3, thereby allowing the first device to Instruct to stop execution of query Q1.

監視対象処理が処理proc1,proc2の場合の制御例は次の通りである。なお、以下の説明で「時刻」という場合、ある程度(微小な)幅のある時間範囲を表すと考えてもよい。図1下部の制御例では、左側から右側へ向かう方向が時間軸の正方向である。   A control example when the monitoring target process is the process proc1, proc2 is as follows. In the following description, the term “time” may be considered to represent a time range having a certain (minute) width. In the control example at the bottom of FIG. 1, the direction from the left side to the right side is the positive direction of the time axis.

時刻T1において、処理部1bは、第1の装置2および第2の装置3の両方に、クエリQ1の実行開始を指示する。時刻T1以降、処理部1bは、監視対象処理proc1,proc2それぞれについて第1の進捗情報を、定期的に取得する。また、処理部1bは、監視対象処理proc1,proc2それぞれについて第2の進捗情報を、定期的に取得する。例えば、処理部1bは、第1の進捗情報および第2の進捗情報を定期的に取得するたびに、第1の進捗情報および第2の進捗情報に基づいて、クエリQ1の実行に関する停止判定を行う。停止判定の条件は、前述の「一方の装置で全ての監視対象処理が実行完了されたこと」である。   At time T1, the processing unit 1b instructs both the first device 2 and the second device 3 to start executing the query Q1. After time T1, the processing unit 1b periodically acquires first progress information for each of the monitoring target processes proc1 and proc2. In addition, the processing unit 1b periodically acquires second progress information for each of the monitoring target processes proc1 and proc2. For example, each time the processing unit 1b periodically acquires the first progress information and the second progress information, the processing unit 1b makes a stop determination related to the execution of the query Q1 based on the first progress information and the second progress information. Do. The condition for the stop determination is the above-mentioned “all monitoring target processes have been executed in one apparatus”.

時刻T2において、処理部1bは、第1の装置2による処理proc1の第1の進捗情報(aとする)、および、第1の装置2による処理proc2の第1の進捗情報(bとする)を取得する。例えば、a=50%であり、b=100%であるとする。また、時刻T2において、処理部1bは、第2の装置3による処理proc1の第1の進捗情報(cとする)、および、第2の装置3による処理proc2の第2の進捗情報(dとする)を取得する。例えば、c=100%であり、d=100%であるとする。   At time T2, the processing unit 1b has first progress information (referred to as “a”) of the processing proc1 performed by the first device 2 and first progress information (referred to as “b”) of the processing proc2 performed by the first device 2. To get. For example, assume that a = 50% and b = 100%. Further, at time T2, the processing unit 1b receives the first progress information (c) of the process proc1 by the second device 3 and the second progress information (d and d) of the process proc2 by the second device 3. To get). For example, suppose c = 100% and d = 100%.

処理部1bは、第1の進捗情報(a,b)および第2の進捗情報(c,d)に基づいて停止判定を行う。この場合、処理部1bは、第2の装置3において、全ての監視対象処理の進捗率が100%に達したと判定する。このため、処理部1bは、クエリQ1の実行停止を第1の装置2に指示する。   The processing unit 1b performs stop determination based on the first progress information (a, b) and the second progress information (c, d). In this case, the processing unit 1b determines that the progress rate of all the monitoring target processes has reached 100% in the second device 3. Therefore, the processing unit 1b instructs the first device 2 to stop executing the query Q1.

第1の装置2は、クエリQ1の実行停止の指示を受け付けると、クエリQ1の実行を停止する。一方、第2の装置3は、クエリQ1の実行を継続する。
時刻T3において、第2の装置3は、クエリQ1の実行を完了する。第2の装置3は、クエリQ1の実行を完了したことを、処理部1bに通知する。処理部1bは、第2の装置3からクエリQ1の実行結果を取得する。処理部1bは、クエリQ1の実行結果を端末装置4に送信する。そして、端末装置4は、クエリQ1の実行結果を受信する。
When receiving an instruction to stop execution of query Q1, first device 2 stops execution of query Q1. On the other hand, the second device 3 continues to execute the query Q1.
At time T3, the second device 3 completes the execution of the query Q1. The second device 3 notifies the processing unit 1b that the execution of the query Q1 has been completed. The processing unit 1b acquires the execution result of the query Q1 from the second device 3. The processing unit 1b transmits the execution result of the query Q1 to the terminal device 4. The terminal device 4 receives the execution result of the query Q1.

ここで、上記の例において、処理部1bによる停止判定を行わずに、第1の装置2によるクエリQ1の実行を継続させることを考える。この場合、第1の装置2によるクエリQ1の実行が完了する時刻は、時刻T3よりも後の時刻である可能性が高いと推定される。理由は次の通りである。   Here, in the above example, it is considered that the execution of the query Q1 by the first device 2 is continued without performing the stop determination by the processing unit 1b. In this case, it is estimated that the time when the execution of the query Q1 by the first device 2 is completed is likely to be a time later than the time T3. The reason is as follows.

クエリQ1の総実行所要時間に占める各処理の実行所要時間の割合は、処理負荷(演算コスト)の大きな処理ほど、大きいと考えられる。すなわち、上記の例の場合、処理proc1,proc2それぞれの実行所要時間の割合は、処理proc3の実行所要時間の割合に比べて大きい。この関係性は第1の装置2および第2の装置3に対して共通である。このため、処理proc1,proc2の両方または一方(上記例では処理proc1)の実行完了が遅延している第1の装置2では、クエリQ1の総実行所要時間が、第2の装置3よりも長い可能性が高いと推定される。よって、第1の装置2によるクエリQ1の実行が完了する時刻は、時刻T3よりも後の時刻である可能性が高いと推定される。   The ratio of the time required for executing each process to the total time required for executing the query Q1 is considered to be larger as the process with a higher processing load (calculation cost). That is, in the case of the above example, the ratio of the required execution times of the processes proc1 and proc2 is larger than the ratio of the required execution times of the process proc3. This relationship is common to the first device 2 and the second device 3. For this reason, in the first apparatus 2 in which execution completion of both or one of the processes proc1 and proc2 (process proc1 in the above example) is delayed, the total execution time of the query Q1 is longer than that of the second apparatus 3. It is estimated that the possibility is high. Therefore, it is estimated that the time when the execution of the query Q1 by the first device 2 is completed is likely to be a time later than the time T3.

このような分析結果によれば、時刻T2以降も第1の装置2によるクエリQ1の実行を継続することは非効率的である。特に、第2の装置3によるクエリQ1の実行結果を得られた後に(時刻T3以後に)、第1の装置2によるクエリQ1の実行を停止させるのでは遅過ぎる。第1の装置2により、クエリQ1の処理実行のためにリソースが余計に利用され、第1の装置2を別の処理に活用する機会が減るし、また、第1の装置2による余計なリソース利用により、余計な電力消費も発生するからである。そこで、処理部1bは、時刻T2において第1の装置2によるクエリQ1の実行を停止させる。   According to such an analysis result, it is inefficient to continue the execution of the query Q1 by the first device 2 after the time T2. In particular, after the execution result of the query Q1 by the second device 3 is obtained (after time T3), it is too late to stop the execution of the query Q1 by the first device 2. The first device 2 uses extra resources for executing the processing of the query Q1, reduces the opportunity to use the first device 2 for other processing, and also adds extra resources by the first device 2. This is because extra power consumption occurs due to use. Therefore, the processing unit 1b stops the execution of the query Q1 by the first device 2 at time T2.

これにより、第1の装置2においてクエリQ1の処理のためにリソースが利用される期間を短縮できる。図1の例でいえば、第1の装置2によるクエリQ1の実行を時刻T3に停止させる場合に比べて、時間差ΔT=T3−T2の分だけ、第1の装置2におけるクエリQ1の処理のためのリソースの利用期間を短縮できることになる。その結果、第1の装置2の空いたリソースを別の処理に活用可能となる。また、クエリQ1の実行に伴う第1の装置2の電力消費を低減できる。   As a result, the period during which resources are used for processing the query Q1 in the first device 2 can be shortened. In the example of FIG. 1, the processing of the query Q1 in the first device 2 is performed by the time difference ΔT = T3−T2 as compared with the case where the execution of the query Q1 by the first device 2 is stopped at the time T3. This makes it possible to shorten the resource usage period. As a result, the free resources of the first device 2 can be used for another process. Further, the power consumption of the first device 2 associated with the execution of the query Q1 can be reduced.

図1の例では、処理部1bにより、第1の装置2によるクエリQ1の実行を停止させる例を示したが、別のクエリでは、逆に、第2の装置3によるクエリの実行を停止させ、第1の装置2による当該クエリの実行を継続させることもある。この場合、第2の装置3による余計なリソース利用の期間を短縮できることになる。   In the example of FIG. 1, the example in which the processing unit 1b stops the execution of the query Q1 by the first device 2 is shown. However, in another query, conversely, the execution of the query by the second device 3 is stopped. The execution of the query by the first device 2 may be continued. In this case, it is possible to shorten the period of extra resource use by the second device 3.

こうして、第1の装置2および第2の装置3のリソースを効率的に利用可能となる。
なお、処理部1bは、クエリQ1に含まれる複数の処理のうち、初期段階に実行され得る幾つかの処理を抽出し、初期段階に実行され得る幾つかの処理の中から、監視対象処理を決定してもよい。例えば、処理部1bは、クエリQ1の構文から、クエリQ1に含まれる複数の処理のうち、第1の処理よりも早く実行される第2の処理を特定し、第2の処理を監視対象処理と決定してもよい。より具体的には、クエリQ1がデータベースに対する問い合わせを記述したSQL(Structured Query Language)文である場合が考えられる。この場合、処理部1bは、クエリQ1により示される一連の処理の初期に行われる複数のテーブルスキャンを、SQL文の構文を基に特定し、複数のテーブルスキャンの中から監視対象処理を特定してもよい。このようにすれば、一方の装置によるクエリQ1の実行停止を一層早めることができる。
Thus, the resources of the first device 2 and the second device 3 can be used efficiently.
The processing unit 1b extracts some processes that can be executed in the initial stage from among the plurality of processes included in the query Q1, and selects the monitoring target process from among the several processes that can be executed in the initial stage. You may decide. For example, the processing unit 1b specifies the second process that is executed earlier than the first process from the plurality of processes included in the query Q1 from the syntax of the query Q1, and sets the second process as the monitoring target process. May be determined. More specifically, it is conceivable that the query Q1 is an SQL (Structured Query Language) statement describing a query to the database. In this case, the processing unit 1b specifies a plurality of table scans performed at the beginning of a series of processes indicated by the query Q1, based on the syntax of the SQL statement, and specifies a monitoring target process from the plurality of table scans. May be. In this way, the execution stop of the query Q1 by one apparatus can be further accelerated.

また、記憶部1aおよび処理部1bの機能は、第1の装置2(または第2の装置3)に設けられてもよい。すなわち、第1の装置2(または第2の装置3)が情報処理装置1と同じ機能を有してもよい。情報処理装置1と第1の装置2とが同一の装置であってもよい)。あるいは、情報処理装置1と第2の装置3とが同一の装置であってもよい。また、第1の装置2(または第2の装置3)は、複数の他の装置を用いて、クエリQ1の処理を分散して実行するものでもよい。   The functions of the storage unit 1a and the processing unit 1b may be provided in the first device 2 (or the second device 3). That is, the first device 2 (or the second device 3) may have the same function as the information processing device 1. The information processing device 1 and the first device 2 may be the same device). Alternatively, the information processing device 1 and the second device 3 may be the same device. In addition, the first device 2 (or the second device 3) may execute the processing of the query Q1 in a distributed manner using a plurality of other devices.

以下では、関係データベース(RDB:Relational DataBase)に対する問い合わせを実行するデータベース管理システム(DBMS:DataBase Management System)を例示することで、情報処理装置1の機能を更に具体的に説明する。   Hereinafter, the function of the information processing apparatus 1 will be described more specifically by exemplifying a database management system (DBMS: DataBase Management System) that executes an inquiry to a relational database (RDB: Relational DataBase).

[第2の実施の形態]
図2は、第2の実施の形態の情報処理システムの例を示す図である。第2の実施の形態の情報処理システムは、データベース(DB:DataBase)サーバ100、マスタサーバ200、スレーブサーバ300,400,500およびクライアント600を含む。DBサーバ100、クライアント600は、ネットワーク10に接続されている。
[Second Embodiment]
FIG. 2 is a diagram illustrating an example of an information processing system according to the second embodiment. The information processing system according to the second embodiment includes a database (DB) server 100, a master server 200, slave servers 300, 400, 500, and a client 600. The DB server 100 and the client 600 are connected to the network 10.

マスタサーバ200およびスレーブサーバ300,400,500は、クラスタ20を形成する。クラスタ20は、ネットワーク21を含む。マスタサーバ200およびスレーブサーバ300,400,500は、ネットワーク21に接続されている。また、ネットワーク21は、ネットワーク10と接続される。ネットワーク10,21は、例えば、LAN(Local Area Network)である。   The master server 200 and the slave servers 300, 400, 500 form a cluster 20. The cluster 20 includes a network 21. Master server 200 and slave servers 300, 400, 500 are connected to network 21. The network 21 is connected to the network 10. The networks 10 and 21 are, for example, LANs (Local Area Networks).

DBサーバ100は、DBMSの機能を有するサーバコンピュータである。DBサーバ100は、DBに対する問い合わせ内容を示すクエリをクライアント600から受信し、クエリに応じた処理をDBに対して実行する。DBサーバ100は、問い合わせに対する応答として、処理の実行結果を、クライアント600に応答する。DBサーバ100は、ストレージ30に接続されている。ストレージ30は、HDDやSSD(Solid State Drive)などの複数の記憶装置を備え、複数の記憶装置を用いてDBを記憶する。ストレージ30は、DBサーバ100に(直接またはネットワークを介して)外付けされてもよいし、DBサーバ100に内蔵されてもよい。   The DB server 100 is a server computer having a DBMS function. The DB server 100 receives from the client 600 a query indicating the inquiry content for the DB, and executes a process corresponding to the query for the DB. The DB server 100 responds to the client 600 with the processing execution result as a response to the inquiry. The DB server 100 is connected to the storage 30. The storage 30 includes a plurality of storage devices such as HDDs and SSDs (Solid State Drives), and stores the DB using the plurality of storage devices. The storage 30 may be externally attached to the DB server 100 (directly or via a network), or may be built in the DB server 100.

クラスタ20は、DBサーバ100とともにDBアクセスに利用されるサブシステムである。クラスタ20のうちマスタサーバ200は、DBサーバ100からクエリの実行指示およびクエリに応じた処理対象のデータを受信し、スレーブサーバ300,400,500に処理を割り振る。スレーブサーバ300,400,500は、マスタサーバ200により割り振られた処理を実行し、実行結果をマスタサーバ200に送信する。マスタサーバ200は、スレーブサーバ300,400,500それぞれから実行結果を受信し、複数の実行結果をマージし、マージ後の実行結果を、DBサーバ100に送信する。   The cluster 20 is a subsystem that is used for DB access together with the DB server 100. The master server 200 in the cluster 20 receives a query execution instruction and data to be processed according to the query from the DB server 100 and allocates processing to the slave servers 300, 400, and 500. The slave servers 300, 400, and 500 execute the process allocated by the master server 200 and transmit the execution result to the master server 200. The master server 200 receives the execution results from each of the slave servers 300, 400, and 500, merges a plurality of execution results, and transmits the execution results after merging to the DB server 100.

クライアント600は、ユーザにより利用されるクライアントコンピュータである。クライアント600は、ユーザによるクエリの入力を受け付け、入力されたクエリをDBサーバ100に送信する。ユーザは、SQLを用いてクライアント600にクエリを入力する。クライアント600は、クエリの実行結果をDBサーバ100から受信し、受信した実行結果をディスプレイにより表示する。   A client 600 is a client computer used by a user. The client 600 receives a query input from the user and transmits the input query to the DB server 100. The user inputs a query to the client 600 using SQL. The client 600 receives the execution result of the query from the DB server 100, and displays the received execution result on the display.

ここで、第2の実施の形態の情報処理システムでは、DBサーバ100のDBアクセス処理をクラスタ20でも実行可能である。すなわち、DBサーバ100は、自身の処理を、クラスタ20にオフロードさせることができる。オフロードにより、DBサーバ100の負荷を低減可能である。DBサーバ100は、DBを管理するDBMSを有するサーバであり、ネイティブと呼ばれることがある。ネイティブのDBMS機能を提供するソフトウェアの一例として、PostgreSQLが挙げられる(ただし、他のソフトウェアでもよい)。ネイティブ側のDBサーバは複数のサーバコンピュータにより構成されてもよい(例えば、ネイティブ側でも複数のDBサーバによる負荷分散や可用性向上を図ることもある)。また、クラスタ20は、オフロード先のサブシステムであり、アクセラレータと呼ばれることがある。アクセラレータ機能を提供するソフトウェアの一例として、Sparkが挙げられる(ただし、他のソフトウェアでもよい)。   Here, in the information processing system according to the second embodiment, the DB access processing of the DB server 100 can also be executed by the cluster 20. That is, the DB server 100 can offload its own processing to the cluster 20. The load on the DB server 100 can be reduced by offloading. The DB server 100 is a server having a DBMS that manages a DB, and is sometimes called native. One example of software that provides a native DBMS function is PostgreSQL (however, other software may be used). The native-side DB server may be composed of a plurality of server computers (for example, the native-side DB server may be used to distribute load and improve availability). The cluster 20 is an offload destination subsystem and may be called an accelerator. An example of software that provides an accelerator function is Spark (however, other software may be used).

DBサーバ100は、クエリに対応する処理(クエリ処理と称する)を、クラスタ20に割り振る(オフロードする)ことで、当該処理の高速化を図れる。しかし、全てのクエリ処理をオフロードすればよいわけではない。例えば、クエリ処理の対象のテーブルのサイズやテーブルに対する処理の種別(例えば、インデックス(索引)スキャンか否かなど)によっては、クラスタ20よりもDBサーバ100の方が高速に処理を実行できることもある。   The DB server 100 can speed up the processing by allocating (offloading) processing (referred to as query processing) corresponding to the query to the cluster 20. However, not all query processing needs to be offloaded. For example, the DB server 100 may be able to execute processing at a higher speed than the cluster 20 depending on the size of the table to be subjected to query processing and the type of processing for the table (for example, whether or not index scanning is performed). .

具体的には、クラスタ20では、クエリ処理が比較的大きなサイズのテーブルに対する処理である場合や、インデックススキャンを使用しない場合(シーケンシャルスキャンの場合)に、DBサーバ100よりも処理を高速に実行できる可能性がある。大量データに対する順次処理を、クラスタ20の複数のスレーブサーバにより分担して効率的に実行できるからである。他方、DBサーバ100では、クエリ処理が比較的小さなサイズのテーブルに対する処理である場合や、インデックススキャンを使用する場合に、クラスタ20よりも処理を高速に実行できる可能性がある。処理対象のデータサイズが比較的小さい場合、クラスタ20における分散化のための処理のオーバヘッドが本来の処理に比べて大きくなり得るからである。ただし、クラスタ20により用いられるアルゴリズムはブラックボックスであることが多い。このため、具体的なクエリに対して、DBサーバ100(ネイティブ)およびクラスタ20(アクセラレータ)の何れの方が処理を高速に実行できるかを、事前に評価することは難しい。   Specifically, in the cluster 20, when the query process is a process for a relatively large table, or when an index scan is not used (in the case of a sequential scan), the process can be executed faster than the DB server 100. there is a possibility. This is because sequential processing for a large amount of data can be efficiently executed by being shared by a plurality of slave servers of the cluster 20. On the other hand, in the DB server 100, there is a possibility that the process can be executed faster than the cluster 20 when the query process is a process for a relatively small size table or when an index scan is used. This is because when the data size to be processed is relatively small, the overhead of processing for distribution in the cluster 20 can be larger than the original processing. However, the algorithm used by the cluster 20 is often a black box. For this reason, it is difficult to evaluate in advance which one of the DB server 100 (native) and the cluster 20 (accelerator) can execute processing at a high speed for a specific query.

DBサーバ100は、DBサーバ100およびクラスタ20におけるこのような性質を考慮して、クエリに対する応答性能を高める機能を提供する。
図3は、DBサーバのハードウェア例を示す図である。DBサーバ100は、プロセッサ101、RAM102、HDD103、HBA(Host Bus Adapter)104、画像信号処理部105、入力信号処理部106、媒体リーダ107および通信インタフェース108を有する。各ハードウェアはDBサーバ100のバスに接続されている。
The DB server 100 provides a function for improving the response performance to a query in consideration of such properties in the DB server 100 and the cluster 20.
FIG. 3 is a diagram illustrating a hardware example of the DB server. The DB server 100 includes a processor 101, a RAM 102, an HDD 103, an HBA (Host Bus Adapter) 104, an image signal processing unit 105, an input signal processing unit 106, a medium reader 107, and a communication interface 108. Each hardware is connected to the bus of the DB server 100.

プロセッサ101は、DBサーバ100の情報処理を制御するハードウェアである。プロセッサ101は、マルチプロセッサであってもよい。プロセッサ101は、例えばCPU、DSP、ASICまたはFPGAなどである。プロセッサ101は、CPU、DSP、ASIC、FPGAなどのうちの2以上の要素の組み合わせであってもよい。   The processor 101 is hardware that controls information processing of the DB server 100. The processor 101 may be a multiprocessor. The processor 101 is, for example, a CPU, DSP, ASIC, or FPGA. The processor 101 may be a combination of two or more elements of CPU, DSP, ASIC, FPGA, and the like.

RAM102は、DBサーバ100の主記憶装置である。RAM102は、プロセッサ101に実行させるOS(Operating System)のプログラムやアプリケーションプログラムの少なくとも一部を一時的に記憶する。また、RAM102は、プロセッサ101による処理に用いる各種データを記憶する。   The RAM 102 is a main storage device of the DB server 100. The RAM 102 temporarily stores at least part of an OS (Operating System) program and application programs to be executed by the processor 101. The RAM 102 stores various data used for processing by the processor 101.

HDD103は、DBサーバ100の補助記憶装置である。HDD103は、内蔵した磁気ディスクに対して、磁気的にデータの書き込みおよび読み出しを行う。HDD103は、OSのプログラム、アプリケーションプログラム、および各種データを記憶する。DBサーバ100は、フラッシュメモリやSSDなどの他の種類の補助記憶装置を備えてもよく、複数の補助記憶装置を備えてもよい。   The HDD 103 is an auxiliary storage device of the DB server 100. The HDD 103 magnetically writes and reads data to and from the built-in magnetic disk. The HDD 103 stores an OS program, application programs, and various data. The DB server 100 may include other types of auxiliary storage devices such as flash memory and SSD, or may include a plurality of auxiliary storage devices.

HBA104は、ストレージ30との接続に用いられる接続インタフェースである。HBA104は、例えば、ファイバチャネル(FC:Fibre Channel)やSAS(Serial Attached SCSI、SCSIはSmall Computer System Interfaceの略)のインタフェースである。   The HBA 104 is a connection interface used for connection with the storage 30. The HBA 104 is, for example, a fiber channel (FC) or SAS (Serial Attached SCSI, SCSI is an abbreviation for Small Computer System Interface) interface.

画像信号処理部105は、プロセッサ101からの命令に従って、DBサーバ100に接続されたディスプレイ11に画像を出力する。ディスプレイ11として、CRT(Cathode Ray Tube)ディスプレイや液晶ディスプレイなどを用いることができる。   The image signal processing unit 105 outputs an image to the display 11 connected to the DB server 100 in accordance with an instruction from the processor 101. As the display 11, a CRT (Cathode Ray Tube) display, a liquid crystal display, or the like can be used.

入力信号処理部106は、DBサーバ100に接続された入力デバイス12から入力信号を取得し、プロセッサ101に出力する。入力デバイス12として、例えば、マウスやタッチパネルなどのポインティングデバイス、キーボードなどを用いることができる。   The input signal processing unit 106 acquires an input signal from the input device 12 connected to the DB server 100 and outputs it to the processor 101. As the input device 12, for example, a pointing device such as a mouse or a touch panel, a keyboard, or the like can be used.

媒体リーダ107は、記録媒体13に記録されたプログラムやデータを読み取る装置である。記録媒体13として、例えば、フレキシブルディスク(FD:Flexible Disk)やHDDなどの磁気ディスク、CD(Compact Disc)やDVD(Digital Versatile Disc)などの光ディスク、光磁気ディスク(MO:Magneto-Optical disk)を使用できる。また、記録媒体13として、例えば、フラッシュメモリカードなどの不揮発性の半導体メモリを使用することもできる。媒体リーダ107は、例えば、プロセッサ101からの命令に従って、記録媒体13から読み取ったプログラムやデータをRAM102またはHDD103に格納する。   The medium reader 107 is a device that reads a program and data recorded on the recording medium 13. As the recording medium 13, for example, a magnetic disk such as a flexible disk (FD) or an HDD, an optical disk such as a CD (Compact Disc) or a DVD (Digital Versatile Disc), or a magneto-optical disk (MO) is used. Can be used. Further, as the recording medium 13, for example, a non-volatile semiconductor memory such as a flash memory card can be used. For example, the medium reader 107 stores a program or data read from the recording medium 13 in the RAM 102 or the HDD 103 in accordance with an instruction from the processor 101.

通信インタフェース108は、ネットワーク10を介して他の装置と通信を行う。通信インタフェース108は、有線通信インタフェースでもよいし、無線通信インタフェースでもよい。   The communication interface 108 communicates with other devices via the network 10. The communication interface 108 may be a wired communication interface or a wireless communication interface.

なお、マスタサーバ200、スレーブサーバ300,400,500およびクライアント600もDBサーバ100と同様のハードウェアを用いて実現できる。
図4は、システムの機能例を示す図である。DBサーバ100は、記憶部110、通信処理部120、進捗監視部130、クエリ実行部140および連携制御部150を有する。
The master server 200, the slave servers 300, 400, 500, and the client 600 can also be realized using the same hardware as the DB server 100.
FIG. 4 is a diagram illustrating an example of functions of the system. The DB server 100 includes a storage unit 110, a communication processing unit 120, a progress monitoring unit 130, a query execution unit 140, and a cooperation control unit 150.

記憶部110は、クエリ処理の進捗に関する情報を記憶する。また、記憶部110は、オフロードを行うか否かの決定に用いられる情報(オフロード選択テーブル)を記憶する。   The storage unit 110 stores information related to the progress of query processing. The storage unit 110 also stores information (offload selection table) used for determining whether to perform offloading.

通信処理部120は、クライアント600からクエリを受信する。また、通信処理部120は、クエリ処理の実行結果を、クライアント600に送信する。
進捗監視部130は、クエリの内容に応じて、クエリに含まれる複数の処理のうち、進捗の監視対象とする監視対象処理を決定する。進捗監視部130は、DBサーバ100による監視対象処理の進捗、および、クラスタ20による監視対象処理の進捗を監視する。進捗監視部130は、DBサーバ100による監視対象処理の進捗およびクラスタ20による監視対象処理の進捗の監視に応じて、何れか一方によるクエリ処理を停止するように制御する。具体的には、進捗監視部130は、DBサーバ100およびクラスタ20のうち監視対象処理を早く実行した一方の実行結果を取得し、他方によるクエリ処理を停止するように制御する。
The communication processing unit 120 receives a query from the client 600. In addition, the communication processing unit 120 transmits the execution result of the query process to the client 600.
The progress monitoring unit 130 determines a monitoring target process to be monitored for progress among a plurality of processes included in the query according to the content of the query. The progress monitoring unit 130 monitors the progress of the monitoring target process by the DB server 100 and the progress of the monitoring target process by the cluster 20. The progress monitoring unit 130 controls to stop the query processing by either one according to the progress of the monitoring target process by the DB server 100 and the progress of the monitoring target process by the cluster 20. Specifically, the progress monitoring unit 130 obtains the execution result of one of the DB server 100 and the cluster 20 that has executed the monitoring target process earlier, and controls to stop the query process by the other.

進捗監視部130は、クエリ処理の対象のテーブルのデータを、ストレージ30に記憶されたDB31から取得し、クエリ実行部140および連携制御部150に提供する。また、進捗監視部130は、クエリ実行部140および連携制御部150によるクエリ処理の実行結果を取得し、通信処理部120に提供する。   The progress monitoring unit 130 acquires the data of the table to be subjected to query processing from the DB 31 stored in the storage 30 and provides the data to the query execution unit 140 and the cooperation control unit 150. In addition, the progress monitoring unit 130 acquires the execution result of the query processing by the query execution unit 140 and the cooperation control unit 150 and provides the result to the communication processing unit 120.

クエリ実行部140は、クエリ処理を実行する。クエリ実行部140は、DBMSにおけるSQLの実行エンジンである。
連携制御部150は、クラスタ20との連携を制御する。連携制御部150は、クエリ処理の実行をマスタサーバ200に依頼する。連携制御部150は、クエリ処理対象のテーブルのデータを、マスタサーバ200に提供する。また、連携制御部150は、クエリ処理の実行結果をマスタサーバ200から取得する。
The query execution unit 140 executes query processing. The query execution unit 140 is an SQL execution engine in the DBMS.
The cooperation control unit 150 controls cooperation with the cluster 20. The cooperation control unit 150 requests the master server 200 to execute query processing. The cooperation control unit 150 provides the master server 200 with data of the table to be processed by the query processing. In addition, the cooperation control unit 150 acquires the execution result of the query process from the master server 200.

マスタサーバ200は、分散制御部210を有する。分散制御部210は、スレーブサーバ300,400,500を用いたクエリの分散実行を制御する。分散制御部210は、連携制御部150からクエリ処理の依頼、および、クエリ処理対象のテーブルのデータを受信し、スレーブサーバ300,400,500それぞれにクエリ処理の各部分を割り振る。例えば、分散制御部210は、スレーブサーバ300,400,500それぞれにクエリ処理の異なる部分を割り振ることで、クエリ処理を高速化し得る。分散制御部210は、スレーブサーバ300,400,500からクエリ処理の実行結果を取得し、マージする。分散制御部210は、マージ後の実行結果を連携制御部150に応答する。   The master server 200 has a distributed control unit 210. The distribution control unit 210 controls distributed execution of queries using the slave servers 300, 400, and 500. The distribution control unit 210 receives the query processing request and the query processing target table data from the cooperation control unit 150, and allocates each part of the query processing to each of the slave servers 300, 400, and 500. For example, the distributed control unit 210 can speed up the query processing by allocating different portions of the query processing to the slave servers 300, 400, and 500, respectively. The distribution control unit 210 acquires query processing execution results from the slave servers 300, 400, and 500 and merges them. The distribution control unit 210 responds to the cooperation control unit 150 with the execution result after merging.

スレーブサーバ300は、分散実行部310を有する。スレーブサーバ400は、分散実行部410を有する。スレーブサーバ500は、分散実行部510を有する。分散実行部310,410,510は、分散制御部210により割り振られたクエリ処理の一部分を実行し、実行結果を分散制御部210に応答する。なお、マスタサーバ200も分散実行部の機能を有してもよい。   The slave server 300 includes a distributed execution unit 310. The slave server 400 has a distributed execution unit 410. The slave server 500 has a distributed execution unit 510. The distributed execution units 310, 410, and 510 execute part of the query processing allocated by the distribution control unit 210, and return an execution result to the distribution control unit 210. Note that the master server 200 may also have the function of a distributed execution unit.

ここで、記憶部110は、RAM102またはHDD103に確保された記憶領域として実現される。通信処理部120、進捗監視部130、クエリ実行部140および連携制御部150の機能は、プロセッサ101がRAM102に記憶されたプログラムを実行することで発揮される。ただし、通信処理部120、進捗監視部130、クエリ実行部140および連携制御部150は、FPGAやASICなどのハードワイヤードロジックにより実現されてもよい。   Here, the storage unit 110 is realized as a storage area secured in the RAM 102 or the HDD 103. The functions of the communication processing unit 120, the progress monitoring unit 130, the query execution unit 140, and the cooperation control unit 150 are exhibited when the processor 101 executes a program stored in the RAM 102. However, the communication processing unit 120, the progress monitoring unit 130, the query execution unit 140, and the cooperation control unit 150 may be realized by a hard wired logic such as an FPGA or an ASIC.

更に、分散制御部210の機能は、マスタサーバ200が備えるプロセッサが、マスタサーバ200が備えるRAMに記憶されたプログラムを実行することで発揮される。分散実行部310の機能は、スレーブサーバ300が備えるプロセッサが、スレーブサーバ300が備えるRAMに記憶されたプログラムを実行することで発揮される。分散実行部410の機能は、スレーブサーバ400が備えるプロセッサが、スレーブサーバ400が備えるRAMに記憶されたプログラムを実行することで発揮される。分散実行部510の機能は、スレーブサーバ500が備えるプロセッサが、スレーブサーバ500が備えるRAMに記憶されたプログラムを実行することで発揮される。   Furthermore, the function of the distributed control unit 210 is exhibited when a processor included in the master server 200 executes a program stored in a RAM included in the master server 200. The functions of the distributed execution unit 310 are exhibited when a processor included in the slave server 300 executes a program stored in a RAM included in the slave server 300. The function of the distributed execution unit 410 is exhibited when a processor included in the slave server 400 executes a program stored in a RAM included in the slave server 400. The functions of the distributed execution unit 510 are exhibited when a processor included in the slave server 500 executes a program stored in a RAM included in the slave server 500.

図5は、DBのテーブル例を示す図である。DB31は、テーブル31a,31b,31c,31d,・・・を含む。図5では、DB31に含まれる複数のテーブルのうち、テーブル31a,31bの内容が例示されている。   FIG. 5 is a diagram illustrating an example of a DB table. The DB 31 includes tables 31a, 31b, 31c, 31d,. FIG. 5 illustrates the contents of the tables 31 a and 31 b among the plurality of tables included in the DB 31.

テーブル31aのテーブル名は、“tbl1”である。テーブル31aは、nameおよびageの項目(あるいは属性)を含む。nameの項目には、人物の名前が登録される。ageの項目には、人物の年齢が登録される。例えば、テーブル31aには、nameが“Alice”、ageが“31”という行(あるいは、タプル)が登録されている。これは、“Alice”という人物の年齢が“31”歳であることを示す。なお、1つの行を1つのレコードと称してもよい。   The table name of the table 31a is “tbl1”. The table 31a includes items (or attributes) of name and age. The name of the person is registered in the name item. The age of a person is registered in the item “age”. For example, a row (or tuple) in which name is “Alice” and age is “31” is registered in the table 31a. This indicates that the age of the person “Alice” is “31” years old. One row may be referred to as one record.

テーブル31bのテーブル名は、“tbl2”である。テーブル31bは、nameおよびstateの項目を含む。nameの項目には、人物の名前が登録される。stateの項目には、人物が属する地方の略称が登録される。例えば、テーブル31bには、nameが“Alice”、stateが“NY”という行が登録されている。これは、“Alice”という人物が属する地方の略称が“NY”(New Yorkの略)であることを示す。   The table name of the table 31b is “tbl2”. The table 31b includes items of name and state. The name of the person is registered in the name item. In the “state” item, a local abbreviation to which the person belongs is registered. For example, in the table 31b, a line where name is “Alice” and state is “NY” is registered. This indicates that the local abbreviation to which the person “Alice” belongs is “NY” (New York).

なお、テーブル31cのテーブル名は、“tbl3”であるとする。また、テーブル31dのテーブル名は、“tbl4”であるとする。
図6は、クエリの例を示す図である。クエリ40は、SQLを用いて記述されている。クエリ40は、複数の処理に対応する複数のコマンドを含む。クエリ40は、テーブル31a,31bをnameで結合し、結合後のテーブルからageが“40”以上である行(name,age,stateの組)を取り出す(選択する)操作である。クエリ40の例では、進捗監視部130は、SQLの構文により、クエリ40のプランツリーを生成する。プランツリーは、クエリの実行プランを表す情報である。
It is assumed that the table name of the table 31c is “tbl3”. Further, the table name of the table 31d is assumed to be “tbl4”.
FIG. 6 is a diagram illustrating an example of a query. The query 40 is described using SQL. The query 40 includes a plurality of commands corresponding to a plurality of processes. The query 40 is an operation of joining the tables 31a and 31b with the name and taking out (selecting) a row (a set of name, age, and state) whose age is “40” or more from the joined table. In the example of the query 40, the progress monitoring unit 130 generates a plan tree of the query 40 using the SQL syntax. The plan tree is information that represents a query execution plan.

図7は、プランツリーの例を示す図である。プランツリー50は、クエリ40に対応するプランツリーである。プランツリー50は、ノード51,52,53,54を含む。ノード51,52それぞれは、ノード53とエッジで接続される。ノード53は、ノード54とエッジで接続される。   FIG. 7 is a diagram illustrating an example of a plan tree. The plan tree 50 is a plan tree corresponding to the query 40. The plan tree 50 includes nodes 51, 52, 53, and 54. Each of the nodes 51 and 52 is connected to the node 53 by an edge. The node 53 is connected to the node 54 at the edge.

ノード51は、テーブル31aに対するage“40”以上である行のスキャンを表す。ここで、「スキャン」は、該当の条件に合致する行(条件がない場合は全部の行)をテーブルから抽出する処理である。ノード52は、テーブル31bに対するフルスキャン(全行のスキャン)を表す。ノード53は、ノード51,52のスキャン結果に対するnameによる結合演算(JOIN)を表す。ノード54は、結合結果に対するname,age,stateの選択演算(SELECT)を表す。ノード51,52はリーフ、または、葉ノードと呼ばれる。   The node 51 represents a scan of a row that is age “40” or more with respect to the table 31a. Here, “scan” is a process of extracting from the table the rows that match the corresponding condition (or all rows if there is no condition). The node 52 represents a full scan (scan of all rows) for the table 31b. The node 53 represents a join operation (JOIN) by name for the scan results of the nodes 51 and 52. The node 54 represents a name, age, and state selection operation (SELECT) for the combined result. Nodes 51 and 52 are called leaves or leaf nodes.

プランツリー50によれば、DBサーバ100またはクラスタ20によりクエリ40を実行する場合、まず、テーブル31a,31bのスキャン(ノード51,52に相当)が実行される。次に、結合演算(ノード53に相当)が実行される。その後、選択演算(ノード54に相当)が実行される。なお、テーブル31a,31bに対して何れの種別(インデックススキャンまたはシーケンシャルスキャン)のスキャンを行うかは、クエリの内容に応じて、クエリ実行部140および分散制御部210により決定される。同じクエリであれば、クエリ実行部140および分散制御部210は同じ種別のスキャンを採用する。   According to the plan tree 50, when the query 40 is executed by the DB server 100 or the cluster 20, first, the scans of the tables 31a and 31b (corresponding to the nodes 51 and 52) are executed. Next, a join operation (corresponding to the node 53) is executed. Thereafter, a selection operation (corresponding to the node 54) is executed. Note that which type (index scan or sequential scan) of the tables 31a and 31b is to be scanned is determined by the query execution unit 140 and the distribution control unit 210 according to the contents of the query. For the same query, the query execution unit 140 and the distribution control unit 210 employ the same type of scan.

ここで、DBに対するクエリ処理において、テーブルスキャンは、結合演算や選択演算に比べて演算コストが大きい傾向にある。例えば、テーブルによっては数万から数千万の行を含み、大量のデータに対するスキャンが行われ得るからである。そこで、進捗監視部130は、比較的負荷の大きなテーブルスキャンを、プランツリー50から特定し、監視対象とする。このとき、進捗監視部130は、プランツリー50に含まれる複数のテーブルスキャンのうち、監視対象とするテーブルスキャンを、スキャン対象のテーブルの情報量に基づいて更に絞り込む。   Here, in the query processing for the DB, the table scan tends to have a higher operation cost than the join operation or the selection operation. For example, some tables include tens of thousands to tens of millions of rows, and a large amount of data can be scanned. Accordingly, the progress monitoring unit 130 identifies a table scan with a relatively large load from the plan tree 50 and sets it as a monitoring target. At this time, the progress monitoring unit 130 further narrows down the table scans to be monitored among the plurality of table scans included in the plan tree 50 based on the information amount of the table to be scanned.

具体的には、進捗監視部130は、クエリによる処理対象である複数のテーブルのうち、サイズが最大のテーブルを基準テーブルとする。進捗監視部130は、当該複数のテーブルのうち、次の条件(1)または条件(2)を満たすテーブルを、監視対象テーブルと決定する。ここで、「サイズが最大」とは、「行数が最大」であることを示す。   Specifically, the progress monitoring unit 130 sets a table having the largest size among a plurality of tables to be processed by the query as a reference table. The progress monitoring unit 130 determines a table that satisfies the following condition (1) or condition (2) among the plurality of tables as a monitoring target table. Here, “maximum size” indicates “maximum number of rows”.

条件(1)は、「最大行数のテーブル(基準テーブル)であること」である。
条件(2)は、「閾値Y=(最大行数のテーブルの行数X)*(コスト値C)以上の行数をもつテーブルであること」である。ここで、コスト値Cとして、例えば、シーケンシャルスキャンによる演算コストに対するインデックススキャンの演算コストの比を用いることが考えられる。例えば、シーケンシャルスキャンの演算コストを“1.0”としたときのインデックススキャンの演算コストが“0.005”であれば、コスト値Cは、“0.005”である。
The condition (1) is “to be a table of maximum number of rows (reference table)”.
The condition (2) is “threshold Y = (number of rows in the table with the maximum number of rows X) * the table having the number of rows equal to or more than the cost value C”). Here, as the cost value C, for example, the ratio of the calculation cost of the index scan to the calculation cost of the sequential scan can be considered. For example, if the calculation cost of the index scan is “0.005” when the calculation cost of the sequential scan is “1.0”, the cost value C is “0.005”.

1つの例として、テーブル31aが1000万行であり、テーブル31bが5万行である場合を考える。この場合、プランツリー50によれば、テーブル31a,31bによるスキャンを含む。このうち、最大行数のテーブルは、テーブル31aである。また、最大行数Xは1000万である。したがって、閾値Y=XC=1000万*0.005=5万である。この場合、テーブル31bの行数は、5万行であるので、閾値Y以上であり、条件(2)を満たす。よって、進捗監視部130は、テーブル31a,31bを監視対象テーブルと決定する。   As an example, consider a case where the table 31a has 10 million rows and the table 31b has 50,000 rows. In this case, according to the plan tree 50, scanning by the tables 31a and 31b is included. Among these, the table with the maximum number of rows is the table 31a. The maximum number of rows X is 10 million. Therefore, the threshold Y = XC = 10 million * 0.005 = 50,000. In this case, since the number of rows in the table 31b is 50,000, it is equal to or greater than the threshold Y and satisfies the condition (2). Therefore, the progress monitoring unit 130 determines the tables 31a and 31b as monitoring target tables.

監視対象テーブルに対するテーブルスキャンは、監視対象処理に相当する。すなわち、進捗監視部130は、監視対象テーブルを決定することで、監視対象処理を決定しているともいえる。   A table scan for the monitoring target table corresponds to monitoring target processing. That is, it can be said that the progress monitoring unit 130 determines the monitoring target process by determining the monitoring target table.

図8は、オフロード選択テーブルの例を示す図である。オフロード選択テーブル111は、記憶部110に格納される。オフロード選択テーブル111は、使用テーブル、スキャン種別、スキャン進捗率の差およびオフロード選択フラグの項目を含む。   FIG. 8 is a diagram illustrating an example of an offload selection table. The offload selection table 111 is stored in the storage unit 110. The offload selection table 111 includes items of a use table, a scan type, a scan progress rate difference, and an offload selection flag.

使用テーブルの項目には、過去に実行済のクエリにおける監視対象テーブルのテーブル名が登録される。スキャン種別の項目には、当該監視対象テーブルに対するテーブルスキャンで使用されたスキャン種別が登録される。スキャン種別“seq”は、シーケンシャルスキャンを表す。スキャン種別“ind”は、インデックススキャンを表す。スキャン進捗率の差の項目には、当該監視対象テーブルに対するDBサーバ100のスキャン進捗率と、クラスタ20のスキャン進捗率との最終的な差が登録される。スキャン進捗率は、スキャン対象のテーブルの全行数のうち、スキャン済の行数の割合(百分率とする)である。スキャン進捗率の差は、“(アクセラレータの進捗率)−(ネイティブの進捗率)”である。したがって、スキャン進捗率の差が正(全て正)の値であれば、アクセラレータ側の方が早く監視対象処理を完了したことになる。一方、スキャン進捗率の差が負(全て負)の値であれば、ネイティブ側の方が早く監視対象処理を完了したことになる。オフロード選択フラグの項目には、次回以降にオフロードを行うか否かを示すフラグが登録される。オフロード選択フラグ“TRUE”は、オフロードを行うことを示す。「オフロードを行う」とは、クラスタ20に該当のクエリ処理を割り振り、DBサーバ100では、当該クエリ処理を実行しないことを示す。オフロード選択フラグ“FALSE”は、オフロードを行わないことを示す。「オフロードを行わない」とは、クラスタ20に該当のクエリ処理を割り振らず、DBサーバ100で当該クエリ処理を実行することを示す。オフロード選択フラグは、該当行の実績において、DBサーバ100およびクラスタ20のうち、クエリの実行停止を指示した方を識別可能な識別情報であるといえる。   In the use table field, the table name of the monitoring target table in the query executed in the past is registered. The scan type used in the table scan for the monitoring target table is registered in the scan type item. The scan type “seq” represents a sequential scan. The scan type “ind” represents an index scan. In the item of the difference in scan progress rate, the final difference between the scan progress rate of the DB server 100 and the scan progress rate of the cluster 20 with respect to the monitoring target table is registered. The scan progress rate is the ratio (percentage) of the number of scanned rows out of the total number of rows in the table to be scanned. The difference between the scan progress rates is “(accelerator progress rate) − (native progress rate)”. Therefore, if the difference in scan progress rate is a positive value (all positive), the accelerator side has completed the monitoring target process earlier. On the other hand, if the difference in the scan progress rate is negative (all negative), the native side has completed the monitoring target process earlier. In the item of the offload selection flag, a flag indicating whether or not to perform offloading from the next time is registered. The offload selection flag “TRUE” indicates that offloading is performed. “Perform offload” indicates that the corresponding query process is allocated to the cluster 20 and the DB server 100 does not execute the query process. The offload selection flag “FALSE” indicates that offloading is not performed. “Do not perform offload” indicates that the DB server 100 executes the query process without allocating the query process to the cluster 20. It can be said that the offload selection flag is identification information that can identify one of the DB server 100 and the cluster 20 that has instructed the execution stop of the query in the record of the corresponding row.

ここで、使用テーブル、スキャン種別およびスキャン進捗率の差の項目には、複数の値(値の個数は、各項目で同じ)が登録され得る。使用テーブル、スキャン種別およびスキャン進捗率の差の項目に複数の値が登録される場合、複数の値は、順番通りに対応付けられる。   Here, a plurality of values (the number of values is the same for each item) can be registered in the items of the difference between the usage table, the scan type, and the scan progress rate. When a plurality of values are registered in the items of the difference between the usage table, the scan type, and the scan progress rate, the plurality of values are associated in order.

例えば、オフロード選択テーブル111には、使用テーブルが“tbl1,tbl2,tbl3”、スキャン種別が“seq,ind,seq”、スキャン進捗率の差が“30,20,50”、オフロード選択フラグが“TRUE”という情報が登録されている。   For example, in the offload selection table 111, the usage table is “tbl1, tbl2, tbl3”, the scan type is “seq, ind, seq”, the difference in scan progress rate is “30, 20, 50”, the offload selection flag Is registered as “TRUE”.

これは、テーブル名“tbl1”(テーブル31a)、“tbl2”(テーブル31b)、“tbl3”(テーブル31c)の3つの監視対象テーブルに対するテーブルスキャンを含むクエリが過去に実行された実績があることを示す。当該実績では、テーブル31aに対してシーケンシャルスキャンを実行し、スキャン進捗率の差が“30”であったことを示す。また、当該実績では、テーブル31bに対してインデックススキャンを実行し、スキャン進捗率の差が“20”であったことを示す。更に、当該実績では、テーブル31cに対してシーケンシャルスキャンを実行し、スキャン進捗率の差が“50”であったことを示す。そして、次回以降に、テーブル31aに対するシーケンシャルスキャン、テーブル31bに対するインデックススキャン、テーブル31cに対するシーケンシャルスキャンを行うクエリを受け付けた場合に、オフロードを行うことを示す。   This is because a query including a table scan for the three monitoring target tables having the table names “tbl1” (table 31a), “tbl2” (table 31b), and “tbl3” (table 31c) has been executed in the past. Indicates. This result shows that the sequential scan is executed on the table 31a and the difference in scan progress rate is “30”. In addition, the result shows that an index scan is performed on the table 31b, and the difference in scan progress rate is “20”. Further, the result shows that the sequential scan is executed on the table 31c, and the difference in the scan progress rate is “50”. Then, after the next time, when a query for performing a sequential scan with respect to the table 31a, an index scan with respect to the table 31b, and a sequential scan with respect to the table 31c is received, it indicates that offloading is performed.

また、例えば、オフロード選択テーブル111には、使用テーブルが“tbl2,tbl3”、スキャン種別が“ind,ind”、スキャン進捗率の差が“−30,−50”、オフロード選択フラグが“FALSE”という情報が登録されている。   Further, for example, in the offload selection table 111, the usage table is “tbl2, tbl3”, the scan type is “ind, ind”, the difference in scan progress rate is “−30, −50”, and the offload selection flag is “ The information “FALSE” is registered.

これは、テーブル名“tbl2”(テーブル31b)、“tbl3”(テーブル31c)の2つのテーブルに対する監視対象テーブルに対するテーブルスキャンを含むクエリが過去に実行された実績があることを示す。当該実績では、テーブル31bに対してインデックススキャンを実行し、スキャン進捗率の差が“−30”であったことを示す。また、当該実績では、テーブル31cに対してインデックススキャンを実行し、スキャン進捗率の差が“−50”であったことを示す。そして、次回以降に、テーブル31bに対するインデックススキャン、テーブル31cに対するインデックススキャンを行うクエリを受け付けた場合に、オフロードを行わないことを示す。   This indicates that there has been a past execution result of a query including a table scan for the monitoring target table with respect to the two tables having the table names “tbl2” (table 31b) and “tbl3” (table 31c). The result shows that the index scan is executed on the table 31b and the difference in scan progress rate is “−30”. In addition, the result shows that the index scan is performed on the table 31c, and the difference in the scan progress rate is “−50”. Then, when a query for performing an index scan for the table 31b and an index scan for the table 31c is received after the next time, it indicates that offloading is not performed.

図9は、スキャン進捗率の差の例を示す図である。進捗監視部130は、過去に実行された実績のあるクエリに対して、DBサーバ100(ネイティブ)およびクラスタ20(アクセラレータ)による最終的な進捗率の差を求める。進捗率の差は、前述のように、“(アクセラレータの進捗率)−(ネイティブの進捗率)”である。したがって、監視対象処理の最終的な進捗率の差が正(監視対象処理が複数の場合、全て正)であれば、アクセラレータによる処理の方が、ネイティブによる処理よりも速いことになる。一方、監視対象処理の最終的な進捗率の差が負(監視対象処理が複数の場合、全て負)であれば、ネイティブによる処理の方が、アクセラレータによる処理よりも速いことになる。   FIG. 9 is a diagram illustrating an example of a difference in scan progress rate. The progress monitoring unit 130 obtains a difference between final progress rates of the DB server 100 (native) and the cluster 20 (accelerator) with respect to a query that has been executed in the past. As described above, the difference between the progress rates is “(accelerator progress rate) − (native progress rate)”. Therefore, if the difference in the final progress rate of the monitoring target process is positive (if there are a plurality of monitoring target processes, all are positive), the processing by the accelerator is faster than the processing by the native. On the other hand, if the difference in the final progress rate of the monitoring target process is negative (all negative when there are a plurality of monitoring target processes), the native process is faster than the accelerator process.

以下では主に、スキャン進捗率の差を、“(アクセラレータの進捗率)−(ネイティブの進捗率)”する例を示すが、“(ネイティブの進捗率)−(アクセラレータの進捗率)”としてもよい。この場合、スキャン進捗率の差の正の値および負の値の解釈が逆転することになる。   In the following, an example in which the difference in scan progress rate is “(accelerator progress rate) − (native progress rate)” is shown, but “(native progress rate) − (accelerator progress rate)” is also shown. Good. In this case, the interpretation of the positive value and the negative value of the difference in scan progress rate is reversed.

次に、DBサーバ100による処理手順を説明する。
図10は、DBサーバの処理の例を示すフローチャートである。以下、図10に示す処理をステップ番号に沿って説明する。
Next, a processing procedure by the DB server 100 will be described.
FIG. 10 is a flowchart illustrating an example of processing of the DB server. In the following, the process illustrated in FIG. 10 will be described in order of step number.

(S1)通信処理部120は、クライアント600からクエリを受信する。
(S2)進捗監視部130は、通信処理部120により受信されたクエリを取得し、クエリ実行制御を行う。処理の詳細は後述される。進捗監視部130は、クエリ実行制御により、DBサーバ100またはクラスタ20によるクエリの実行結果を取得し、通信処理部120に提供する。
(S1) The communication processing unit 120 receives a query from the client 600.
(S2) The progress monitoring unit 130 acquires the query received by the communication processing unit 120 and performs query execution control. Details of the processing will be described later. The progress monitoring unit 130 acquires the execution result of the query by the DB server 100 or the cluster 20 by query execution control, and provides it to the communication processing unit 120.

(S3)通信処理部120は、クライアント600にクエリの実行結果を送信する。
図11は、クエリ実行制御の例を示すフローチャートである。以下、図11に示す処理をステップ番号に沿って説明する。以下の手順は、図10のステップS2に相当する。
(S3) The communication processing unit 120 transmits a query execution result to the client 600.
FIG. 11 is a flowchart illustrating an example of query execution control. In the following, the process illustrated in FIG. 11 will be described in order of step number. The following procedure corresponds to step S2 in FIG.

(S11)進捗監視部130は、クエリのSQL構文に基づいて、プランツリーを作成し、プランツリーを基にテーブルスキャンで使用されるテーブル(使用テーブル)を特定する。進捗監視部130は、ストレージ30に記憶されたDB31から使用テーブルを取得する。進捗監視部130は、取得した使用テーブルを記憶部110に格納する。   (S11) The progress monitoring unit 130 creates a plan tree based on the SQL syntax of the query, and identifies a table (used table) used in the table scan based on the plan tree. The progress monitoring unit 130 acquires a usage table from the DB 31 stored in the storage 30. The progress monitoring unit 130 stores the acquired use table in the storage unit 110.

(S12)進捗監視部130は、所定行数以上の使用テーブルを監視対象テーブルと決定する。具体的には、進捗監視部130は、前述のように次の条件(1)または条件(2)を満たすテーブルを監視対象テーブルと決定する。条件(1)は、「最大行数のテーブル(基準テーブル)であること」である。条件(2)は、「閾値Y=(最大行数のテーブルの行数X)*(コスト値C)以上の行数をもつテーブルであること」である。   (S12) The progress monitoring unit 130 determines a use table having a predetermined number of rows or more as a monitoring target table. Specifically, the progress monitoring unit 130 determines a table that satisfies the following condition (1) or condition (2) as a monitoring target table as described above. The condition (1) is “to be a table of maximum number of rows (reference table)”. The condition (2) is “threshold Y = (number of rows in the table with the maximum number of rows X) * the table having the number of rows equal to or more than the cost value C”).

(S13)進捗監視部130は、監視対象テーブルのスキャン種別を特定する。監視対象テーブルが複数の場合、進捗監視部130は、監視対象テーブル毎にスキャン種別を特定する。スキャン種別は、クエリの内容に応じてクエリ実行部140(またはDBMSの所定の機能)により決定される。進捗監視部130は、監視対象テーブルに対して選択されるスキャン種別を、クエリ実行部140(またはDBMSの所定の機能)に問い合わせることで、当該スキャン種別を取得してもよい。   (S13) The progress monitoring unit 130 identifies the scan type of the monitoring target table. When there are a plurality of monitoring target tables, the progress monitoring unit 130 identifies a scan type for each monitoring target table. The scan type is determined by the query execution unit 140 (or a predetermined function of the DBMS) according to the content of the query. The progress monitoring unit 130 may acquire the scan type by inquiring of the query execution unit 140 (or a predetermined function of the DBMS) about the scan type selected for the monitoring target table.

(S14)進捗監視部130は、記憶部110に記憶されたオフロード選択テーブル111を参照して、オフロード選択テーブル111に今回クエリの処理内容と完全一致するタプル(完全一致タプルと称する)があるか否かを判定する。ここで、処理内容とは、監視対象テーブルおよびスキャン種別である。監視対象テーブルが今回クエリと全て同じで、各監視対象テーブルに対するスキャン種別も今回クエリと全て同じである場合に、オフロード選択テーブル111に完全一致タプルがあることになる。オフロード選択テーブル111に完全一致タプルがある場合、進捗監視部130は、ステップS15に処理を進める。オフロード選択テーブル111に完全一致タプルがない場合、進捗監視部130は、ステップS16に処理を進める。   (S14) The progress monitoring unit 130 refers to the offload selection table 111 stored in the storage unit 110, and the offload selection table 111 has a tuple that completely matches the processing content of the current query (referred to as a complete match tuple). It is determined whether or not there is. Here, the processing contents are a monitoring target table and a scan type. When all the monitoring target tables are the same as the current query and the scan types for the respective monitoring target tables are all the same as the current query, the offload selection table 111 has a complete match tuple. If there is a complete match tuple in the offload selection table 111, the progress monitoring unit 130 proceeds to step S15. If there is no complete match tuple in the offload selection table 111, the progress monitoring unit 130 proceeds to step S16.

(S15)進捗監視部130は、オフロード選択テーブル111の完全一致タプルにおけるオフロード選択フラグに応じた依頼先に、クエリ処理の実行開始を指示する。具体的には、該当のオフロード選択フラグが“FALSE”の場合、進捗監視部130は、クエリ実行部140に、クエリ処理の実行開始を指示する。また、該当のオフロード選択フラグが“TRUE”の場合、進捗監視部130は、クエリ処理の実行開始の指示をマスタサーバ200に送るよう連携制御部150に指示する。そして、進捗監視部130は、ステップS21に処理を進める。   (S15) The progress monitoring unit 130 instructs the request destination according to the offload selection flag in the complete match tuple of the offload selection table 111 to start executing query processing. Specifically, when the corresponding offload selection flag is “FALSE”, the progress monitoring unit 130 instructs the query execution unit 140 to start executing query processing. Further, when the corresponding offload selection flag is “TRUE”, the progress monitoring unit 130 instructs the cooperation control unit 150 to send an instruction to start execution of query processing to the master server 200. Then, the progress monitoring unit 130 proceeds with the process to step S21.

(S16)進捗監視部130は、オフロード選択テーブル111を参照して、オフロード選択テーブル111に今回クエリの処理内容と部分一致するタプル(部分一致タプルと称する)があるか否かを判定する。オフロード選択テーブル111の行のうち、使用テーブルが今回クエリの監視対象テーブルと一部分であり、当該使用テーブルに対するスキャン種別も今回クエリの当該一部分に対応する監視対象テーブルに対するスキャン種別と同じである行が、部分一致タプルである。オフロード選択テーブル111に部分一致タプルがある場合、進捗監視部130は、ステップS17に処理を進める。オフロード選択テーブル111に部分一致タプルがない場合、進捗監視部130は、ステップS18に処理を進める。なお、部分一致タプルに対応する過去実績の監視対象処理は、今回クエリにおける複数の監視対象処理のうちの第1の部分であるといえる。一方、今回クエリにおける複数の監視対象処理のうちの第1の部分以外の第2の部分は、新規部分であるといえる。   (S16) The progress monitoring unit 130 refers to the offload selection table 111 and determines whether the offload selection table 111 has a tuple that partially matches the processing content of the current query (referred to as a partial match tuple). . Of the rows of the offload selection table 111, the usage table is a part of the current query monitoring target table, and the scan type for the usage table is the same as the scan type for the monitoring target table corresponding to the current query part. Is a partially matched tuple. If there is a partial match tuple in the offload selection table 111, the progress monitoring unit 130 proceeds with the process to step S17. If there is no partial match tuple in the offload selection table 111, the progress monitoring unit 130 proceeds to step S18. Note that the past performance monitoring target process corresponding to the partial match tuple can be said to be the first part of the plurality of monitoring target processes in the current query. On the other hand, it can be said that the second part other than the first part of the plurality of monitoring target processes in the current query is a new part.

(S17)進捗監視部130は、クエリ実行制御におけるサブ制御を実行する。サブ制御の詳細は後述される。そして、進捗監視部130は、ステップS20に処理を進める。
(S18)進捗監視部130は、ネイティブ(DBサーバ100)とアクセラレータ(クラスタ20)との両方にクエリ処理の実行開始を指示し、両方の進捗情報の取得を開始する。具体的には、進捗監視部130は、クエリ処理の実行開始をクエリ実行部140に指示する。また、進捗監視部130は、クエリ処理の実行開始の指示をマスタサーバ200に送るよう連携制御部150に指示する。また、進捗監視部130は、クエリ実行部140および連携制御部150に、クエリ処理の使用テーブルを提供する。クエリ実行部140は、提供された使用テーブルに基づいてクエリ処理を実行する。連携制御部150は、クエリ処理の実行開始の指示、および、提供された使用テーブルを、マスタサーバ200に送信する。
(S17) The progress monitoring unit 130 executes sub-control in query execution control. Details of the sub-control will be described later. Then, the progress monitoring unit 130 proceeds with the process to step S20.
(S18) The progress monitoring unit 130 instructs both the native (DB server 100) and the accelerator (cluster 20) to start executing query processing, and starts acquiring the progress information of both. Specifically, the progress monitoring unit 130 instructs the query execution unit 140 to start executing query processing. In addition, the progress monitoring unit 130 instructs the cooperation control unit 150 to send an instruction to start execution of query processing to the master server 200. The progress monitoring unit 130 also provides a query processing usage table to the query execution unit 140 and the cooperation control unit 150. The query execution unit 140 executes query processing based on the provided usage table. The cooperation control unit 150 transmits an instruction to start executing query processing and the provided usage table to the master server 200.

(S19)進捗監視部130は、ステップS13で特定した全ての監視対象テーブルに対する一方のスキャンが完了すると、クエリ処理の実行停止を他方に指示する。例えば、クエリ実行部140の方が、クラスタ20よりも先に、全ての監視対象テーブルに対するスキャンを完了したとする。この場合、進捗監視部130は、クエリ処理の実行停止の指示をマスタサーバ200に送るよう連携制御部150に指示する。連携制御部150は、当該指示に応じて、マスタサーバ200にクエリ処理の実行停止の指示を送信する。また、例えば、クラスタ20の方が、クエリ実行部140よりも先に、全ての監視対象テーブルに対するスキャンを完了したとする。この場合、進捗監視部130は、クエリ処理の実行停止を、クエリ実行部140に指示する。クエリ実行部140は、当該指示に応じて該当のクエリ処理の実行を停止する。   (S19) The progress monitoring unit 130 instructs the other to stop the execution of the query process when one of the scans for all the monitoring target tables identified in step S13 is completed. For example, it is assumed that the query execution unit 140 completes scanning of all the monitoring target tables before the cluster 20. In this case, the progress monitoring unit 130 instructs the cooperation control unit 150 to send a query processing execution stop instruction to the master server 200. In response to the instruction, the cooperation control unit 150 transmits an instruction to stop execution of query processing to the master server 200. For example, it is assumed that the cluster 20 has completed scanning of all the monitoring target tables before the query execution unit 140. In this case, the progress monitoring unit 130 instructs the query execution unit 140 to stop execution of query processing. The query execution unit 140 stops the execution of the corresponding query process in response to the instruction.

(S20)進捗監視部130は、オフロード選択テーブル111に今回の実績を登録する。具体的には、進捗監視部130は、オフロード選択テーブル111に、今回のクエリの使用テーブル、スキャン種別を登録する。また、進捗監視部130は、ステップS19における両方の最終的なスキャン進捗率(一方での監視対象テーブルに対するスキャン進捗率が全て100%)を基に、スキャン進捗率の差を計算し、オフロード選択テーブル111に登録する。スキャン進捗率の差は、“(アクセラレータの進捗率)−(ネイティブの進捗率)”である。したがって、進捗監視部130は、スキャン進捗率の差が全て正の値の場合、オフロード選択テーブル111にオフロード選択フラグ“TRUE”を登録する。また、進捗監視部130は、スキャン進捗率の差が全て負の値の場合、オフロード選択テーブル111にオフロード選択フラグ“FALSE”を登録する。   (S20) The progress monitoring unit 130 registers the current performance in the offload selection table 111. Specifically, the progress monitoring unit 130 registers the current query use table and scan type in the offload selection table 111. Further, the progress monitoring unit 130 calculates the difference between the scan progress rates based on both final scan progress rates in step S19 (all of the scan progress rates for the monitoring target table are 100%), and performs offloading. Register in the selection table 111. The difference between the scan progress rates is “(accelerator progress rate) − (native progress rate)”. Accordingly, the progress monitoring unit 130 registers the offload selection flag “TRUE” in the offload selection table 111 when all the differences in the scan progress rates are positive values. In addition, the progress monitoring unit 130 registers an offload selection flag “FALSE” in the offload selection table 111 when all the scan progress rate differences are negative values.

(S21)進捗監視部130は、クエリ実行部140または連携制御部150のうち、クエリ処理を実行完了した方からクエリ処理の実行結果を取得し、取得した実行結果を通信処理部120に提供する。そして、進捗監視部130は、クエリ実行制御の処理を終了する。ここで、連携制御部150から取得されるクエリ処理の実行結果は、連携制御部150がマスタサーバ200から取得したクラスタ20によるクエリ処理の実行結果である。   (S21) The progress monitoring unit 130 acquires the execution result of the query process from the query execution unit 140 or the cooperation control unit 150 that has completed the execution of the query process, and provides the acquired execution result to the communication processing unit 120. . Then, the progress monitoring unit 130 ends the query execution control process. Here, the execution result of the query process acquired from the cooperation control unit 150 is the execution result of the query process by the cluster 20 acquired from the master server 200 by the cooperation control unit 150.

ここで、ステップS18では、例えば、進捗監視部130は、監視対象テーブルに対するテーブルスキャンの進捗をクエリ実行部140に問い合わせることで、クエリ実行部140によるスキャン進捗率を取得してもよい。また、進捗監視部130は、監視対象テーブルに対するテーブルスキャンの進捗を、連携制御部150を介して、クラスタ20に問い合わせることで、クラスタ20によるスキャン進捗率を取得してもよい。   Here, in step S <b> 18, for example, the progress monitoring unit 130 may obtain the scan progress rate by the query execution unit 140 by inquiring the query execution unit 140 about the progress of the table scan for the monitoring target table. Further, the progress monitoring unit 130 may obtain the scan progress rate by the cluster 20 by inquiring the cluster 20 via the cooperation control unit 150 about the progress of the table scan for the monitoring target table.

あるいは、進捗監視部130は、クエリ実行部140によるテーブルスキャンの進捗に応じて、監視対象テーブルに含まれるレコードを、順番に、クエリ実行部140に提供することも考えられる。この場合、進捗監視部130は、クエリ実行部140に対するレコードの提供状況から、クエリ実行部140によるスキャン進捗率を取得してもよい。また、進捗監視部130は、クラスタ20によるテーブルスキャンの進捗に応じて、監視対象テーブルに含まれるレコードを、順番に、連携制御部150を介してクラスタ20に提供することも考えられる。この場合、進捗監視部130は、クラスタ20に対するレコードの提供状況から、クラスタ20によるスキャン進捗率を取得してもよい。   Alternatively, the progress monitoring unit 130 may provide the query execution unit 140 with the records included in the monitoring target table in order according to the progress of the table scan by the query execution unit 140. In this case, the progress monitoring unit 130 may obtain the scan progress rate by the query execution unit 140 from the record provision status to the query execution unit 140. In addition, the progress monitoring unit 130 may provide the records included in the monitoring target table in order to the cluster 20 via the cooperation control unit 150 according to the progress of the table scan by the cluster 20. In this case, the progress monitoring unit 130 may acquire the scan progress rate by the cluster 20 from the record provision status for the cluster 20.

図12は、サブ制御の例を示すフローチャートである。以下、図12に示す処理をステップ番号に沿って説明する。以下の手順は、図11のステップS17に相当する。
(S31)進捗監視部130は、ネイティブ(DBサーバ100)とアクセラレータ(クラスタ20)との両方にクエリ処理の実行開始を指示する。具体的には、進捗監視部130は、クエリ処理の実行開始をクエリ実行部140に指示する。また、進捗監視部130は、クエリ処理の実行開始の指示をマスタサーバ200に送るよう連携制御部150に指示する。また、進捗監視部130は、クエリ実行部140および連携制御部150に、クエリ処理の使用テーブルを提供する。クエリ実行部140は、提供された使用テーブルに基づいてクエリ処理を実行する。連携制御部150は、クエリ処理の実行開始の指示、および、提供された使用テーブルを、マスタサーバ200に送信する。
FIG. 12 is a flowchart illustrating an example of sub-control. In the following, the process illustrated in FIG. 12 will be described in order of step number. The following procedure corresponds to step S17 in FIG.
(S31) The progress monitoring unit 130 instructs both the native (DB server 100) and the accelerator (cluster 20) to start executing query processing. Specifically, the progress monitoring unit 130 instructs the query execution unit 140 to start executing query processing. In addition, the progress monitoring unit 130 instructs the cooperation control unit 150 to send an instruction to start execution of query processing to the master server 200. The progress monitoring unit 130 also provides a query processing usage table to the query execution unit 140 and the cooperation control unit 150. The query execution unit 140 executes query processing based on the provided usage table. The cooperation control unit 150 transmits an instruction to start executing query processing and the provided usage table to the master server 200.

(S32)進捗監視部130は、複数の監視対象テーブルに対するテーブルスキャンを、過去の実績に対する部分一致部分と、新規部分との2つに分けて監視し、各監視対象テーブルに対するスキャン進捗率の取得を開始する。   (S32) The progress monitoring unit 130 monitors table scans for a plurality of monitoring target tables in two parts, a partially matched part and a new part with respect to past results, and acquires a scan progress rate for each monitoring target table. To start.

(S33)進捗監視部130は、ネイティブおよびアクセラレータの両方で部分一致部分のスキャン進捗率が新規部分よりも先に100%に到達したか否かを判定する。ネイティブおよびアクセラレータの両方で部分一致部分のスキャン進捗率が新規部分よりも先に100%に到達した場合、進捗監視部130は、ステップS34に処理を進める。ネイティブおよびアクセラレータの両方で部分一致部分のスキャン進捗率が新規部分よりも先に100%に到達していない場合、進捗監視部130は、ステップS35に処理を進める。   (S33) The progress monitoring unit 130 determines whether the scan progress rate of the partially matching portion has reached 100% before the new portion in both the native and the accelerator. When the scan progress rate of the partially matching part reaches 100% before the new part in both the native and the accelerator, the progress monitoring unit 130 advances the process to step S34. If the scan progress rate of the partially matching part has not reached 100% before the new part in both the native and the accelerator, the progress monitoring unit 130 advances the process to step S35.

なお、部分一致部分および新規部分の両方または何れかが複数の監視対象テーブルに対するテーブルスキャン(監視対象処理)を含むこともある。例えば、部分一致部分が複数の監視対象テーブルに対する複数のテーブルスキャンを含む場合、進捗監視部130は、当該複数のテーブルスキャンの全てのスキャン進捗率が100%になったとき、部分一致部分のスキャン進捗率が100%になったとみなす。新規部分についても同様である。   Note that either or both of the partially matching part and the new part may include table scans (monitoring target processing) for a plurality of monitoring target tables. For example, when the partially matching portion includes a plurality of table scans for a plurality of monitoring target tables, the progress monitoring unit 130 scans the partially matching portion when all the scan progress rates of the plurality of table scans become 100%. The progress rate is considered to be 100%. The same applies to the new part.

(S34)進捗監視部130は、ネイティブおよびアクセラレータのうち、新規部分のスキャン進捗率の低い方に、クエリ処理の実行停止を指示する。考慮すべきスキャン進捗率が複数の場合、進捗監視部130は、スキャン進捗率の平均値の低い方にクエリの処理の実行停止を指示してもよい。例えば、クラスタ20の方が新規部分のスキャン進捗率が低い場合、進捗監視部130は、クエリ処理の実行停止の指示をマスタサーバ200に送るよう連携制御部150に指示する。連携制御部150は、当該指示に応じて、マスタサーバ200にクエリ処理の実行停止の指示を送信する。また、例えば、クエリ実行部140の方が新規部分のスキャン進捗率が低い場合、進捗監視部130は、クエリ処理の実行停止をクエリ実行部140に指示する。クエリ実行部140は、当該指示に応じて、該当のクエリ処理の実行を停止する。そして、進捗監視部130は、処理を終了する。   (S34) The progress monitoring unit 130 instructs the execution stop of the query processing to the lower of the scan progress rate of the new part among the native and the accelerator. When there are a plurality of scan progress rates to be considered, the progress monitoring unit 130 may instruct the lowering of the average value of the scan progress rates to stop execution of query processing. For example, when the cluster 20 has a lower scan progress rate of the new part, the progress monitoring unit 130 instructs the cooperation control unit 150 to send an instruction to stop executing query processing to the master server 200. In response to the instruction, the cooperation control unit 150 transmits an instruction to stop execution of query processing to the master server 200. Further, for example, when the query execution unit 140 has a lower scan progress rate of the new part, the progress monitoring unit 130 instructs the query execution unit 140 to stop executing the query process. In response to the instruction, the query execution unit 140 stops executing the corresponding query process. Then, the progress monitoring unit 130 ends the process.

(S35)進捗監視部130は、ネイティブおよびアクセラレータの少なくとも一方で新規部分のスキャン進捗率が部分一致部分よりも先に100%に到達したか否かを判定する。ネイティブおよびアクセラレータの少なくとも一方で新規部分のスキャン進捗率が部分一致部分よりも先に100%に到達した場合、進捗監視部130は、ステップS36に処理を進める。ネイティブおよびアクセラレータの少なくとも一方で新規部分のスキャン進捗率が部分一致部分よりも先に100%に到達していない場合、進捗監視部130は、ステップS33に処理を進める(スキャン進捗率の監視を継続する)。   (S35) The progress monitoring unit 130 determines whether or not the scan progress rate of the new part has reached 100% before the partial matching part in at least one of the native and the accelerator. If the scan progress rate of the new part reaches 100% before the partially matched part in at least one of the native and the accelerator, the progress monitoring unit 130 advances the process to step S36. If the scan progress rate of the new part has not reached 100% before the partially matched part in at least one of the native and the accelerator, the progress monitoring unit 130 proceeds to step S33 (continues monitoring of the scan progress rate) To do).

なお、部分一致部分および新規部分の両方または何れかが複数の監視対象テーブルに対するテーブルスキャン(監視対象処理)を含むこともある。例えば、部分一致部分が複数の監視対象テーブルに対する複数のテーブルスキャンを含む場合、進捗監視部130は、当該複数のテーブルスキャンの全てのスキャン進捗率が100%になったとき、部分一致部分のスキャン進捗率が100%になったとみなす。新規部分についても同様である。   Note that either or both of the partially matching part and the new part may include table scans (monitoring target processing) for a plurality of monitoring target tables. For example, when the partially matching portion includes a plurality of table scans for a plurality of monitoring target tables, the progress monitoring unit 130 scans the partially matching portion when all the scan progress rates of the plurality of table scans become 100%. The progress rate is considered to be 100%. The same applies to the new part.

(S36)進捗監視部130は、現スキャン進捗率の差の絶対値が、記憶部110に記憶されたオフロード選択テーブル111の部分一致タプルにおけるスキャン進捗率の差の絶対値以上であるか否かを判定する。現スキャン進捗率の差の絶対値が、部分一致タプルにおけるスキャン進捗率の差の絶対値以上の場合、進捗監視部130は、ステップS37に処理を進める。現スキャン進捗率の差の絶対値が、部分一致タプルにおけるスキャン進捗率の差の絶対値以上でない場合、進捗監視部130は、ステップS33に処理を進める(スキャン進捗率の監視を継続する)。ここで、部分一致タプルが複数の場合、進捗監視部130は一致する監視対象テーブルの数が最大の部分一致タプルを選択する。   (S36) The progress monitoring unit 130 determines whether or not the absolute value of the difference in the current scan progress rate is greater than or equal to the absolute value of the difference in scan progress rate in the partial match tuple of the offload selection table 111 stored in the storage unit 110. Determine whether. If the absolute value of the current scan progress rate difference is equal to or greater than the absolute value of the scan progress rate difference in the partial match tuple, the progress monitoring unit 130 proceeds to step S37. When the absolute value of the current scan progress rate difference is not equal to or greater than the absolute value of the scan progress rate difference in the partial match tuple, the progress monitoring unit 130 proceeds to step S33 (continues monitoring of the scan progress rate). Here, when there are a plurality of partial match tuples, the progress monitoring unit 130 selects a partial match tuple having the largest number of matching monitoring target tables.

なお、考慮すべきスキャン進捗率の差が複数の場合もある。この場合、進捗監視部130は、全ての現スキャン進捗率の差の絶対値が、対応する部分一致タプルのスキャン進捗率の差の絶対値以上である場合に、ステップS36 Yesであり、そうでない場合に、ステップS36 Noとする。   There may be a plurality of scan progress rate differences to be considered. In this case, the progress monitoring unit 130 determines that the absolute value of all the current scan progress rate differences is equal to or greater than the absolute value of the scan progress rate differences of the corresponding partial match tuples. In this case, step S36 is No.

更に、進捗監視部130は、現スキャン進捗率の差の符号(正または負)と、部分一致タプルにおけるスキャン進捗率の差の符号(正または負)との一致を確認してもよい。進捗監視部130は、符号が一致する場合に、両方の差の絶対値を比較し、符号が一致しない場合に、ステップS33に処理を進めてもよい。   Further, the progress monitoring unit 130 may confirm the coincidence between the sign (positive or negative) of the difference in the current scan progress rate and the sign (positive or negative) of the difference in the scan progress rate in the partial match tuple. The progress monitoring unit 130 may compare the absolute values of both differences if the signs match, and may proceed to step S33 if the signs do not match.

(S37)進捗監視部130は、新規部分のスキャン進捗率が100%に到達した依頼先は、部分一致タプルのオフロード選択フラグにより特定される実行継続先(過去の実績でクエリ処理を停止させなかった方)と一致するか否かを判定する。一致する場合、進捗監視部130は、ステップS38に処理を進める。一致しない場合、進捗監視部130は、ステップS33に処理を進める(スキャン進捗率の監視を継続する)。   (S37) The progress monitoring unit 130 determines that the request destination where the scan progress rate of the new part has reached 100% is the execution continuation destination specified by the offload selection flag of the partial match tuple (stops query processing based on past results) Judgment is made whether or not it matches. If they match, the progress monitoring unit 130 proceeds to step S38. If they do not match, the progress monitoring unit 130 proceeds to step S33 (continues to monitor the scan progress rate).

(S38)進捗監視部130は、部分一致部分のスキャン進捗率の低い方にクエリ処理の実行停止を指示する。考慮すべきスキャン進捗率が複数の場合、進捗監視部130は、スキャン進捗率の平均値の低い方にクエリの処理の実行停止を指示してもよい。ここでは、ステップS37で特定される実行継続先とは異なる方に実行停止の指示が行われることが期待される。例えば、クラスタ20によるクエリ処理の実行停止を指示する場合、進捗監視部130は、クエリ処理の実行停止の指示をマスタサーバ200に送るよう連携制御部150に指示する。連携制御部150は、当該指示に応じて、マスタサーバ200にクエリ処理の実行停止の指示を送信する。また、クエリ実行部140によるクエリ処理を停止させる場合、進捗監視部130は、該当のクエリ処理の実行停止をクエリ実行部140に指示する。クエリ実行部140は、当該指示に応じて、該当のクエリ処理の実行を停止する。そして、進捗監視部130は、サブ制御の処理を終了する。   (S38) The progress monitoring unit 130 instructs the execution stop of the query processing to the one with the lower scan progress rate of the partially matched portion. When there are a plurality of scan progress rates to be considered, the progress monitoring unit 130 may instruct the lowering of the average value of the scan progress rates to stop execution of query processing. Here, it is expected that an instruction to stop execution will be given to a direction different from the execution continuation destination specified in step S37. For example, when instructing to stop execution of query processing by the cluster 20, the progress monitoring unit 130 instructs the cooperation control unit 150 to send an instruction to stop execution of query processing to the master server 200. In response to the instruction, the cooperation control unit 150 transmits an instruction to stop execution of query processing to the master server 200. When the query processing by the query execution unit 140 is stopped, the progress monitoring unit 130 instructs the query execution unit 140 to stop execution of the corresponding query process. In response to the instruction, the query execution unit 140 stops executing the corresponding query process. Then, the progress monitoring unit 130 ends the sub control process.

ここで、ステップS36,S37の判定は、部分一致部分における現テーブルスキャンのスキャン進捗率に対して過去の実績を流用できることを確認する処理であるといえる。すなわち、ネイティブおよびアクセラレータの両方で新規部分に対応する監視対象処理が完了している場合、部分一致部分に対応する監視対象処理に対する過去の実績を基にネイティブおよびアクセラレータの何れか一方のクエリ実行を停止させることが考えられる。   Here, it can be said that the determinations in steps S36 and S37 are processes for confirming that past results can be used for the scan progress rate of the current table scan in the partially matched portion. In other words, if the monitoring target process corresponding to the new part is completed in both the native and accelerator, the query execution of either the native or accelerator is executed based on the past results for the monitoring target process corresponding to the partial matching part. It is possible to stop.

このとき、過去の実績においてクエリ実行を停止させなかった方(部分一致タプルのオフロード選択フラグにより特定可能)で今回の新規部分に対する監視対象処理が完了している場合、部分一致タプルで示される結果を今回のクエリ処理に流用できる可能性がある。今回クエリで未完了である部分一致部分に対応する監視対象処理については、過去の実績においてオフロード選択フラグにより特定されるクエリ実行を停止させなかった実行主体側(実行継続先)の方が、他方よりも早く実行完了できると推定されるからである。   At this time, when the monitoring target process for the new part is completed by the person who has not stopped the query execution in the past results (which can be specified by the offload selection flag of the partial match tuple), the partial match tuple is indicated. The result may be diverted to this query processing. For the monitoring target process corresponding to the partially matched part that is not completed in the current query, the execution subject side (execution destination) that did not stop the query execution specified by the offload selection flag in the past results, This is because it is estimated that the execution can be completed earlier than the other.

したがって、この場合、進捗監視部130は、部分一致部分に対するスキャン進捗率の差の絶対値よりも、当該部分一致部分に対する現スキャン進捗率の差の絶対値の方が大きい場合に、部分一致部分のスキャン進捗率の低い方にクエリ処理の実行停止を指示する。今回の進捗率の差の幅が過去の実績以上であれば、部分一致タプルの実績を適用してもよいと考えられるからである。   Therefore, in this case, the progress monitoring unit 130 determines that the partial match portion is larger when the absolute value of the current scan progress rate difference with respect to the partial match portion is larger than the absolute value of the scan progress rate difference with respect to the partial match portion. Is instructed to stop the execution of query processing to the one with the lower scan progress rate. This is because it is considered that the results of partial match tuples may be applied if the width of the difference in the progress rate this time is greater than the past results.

このとき、ステップS38の「部分一致部分のスキャン進捗率の低い方」は、部分一致タプルのオフロード選択フラグで示される過去の実績でクエリ実行を停止させた方(本例において、オフロード選択フラグ“FALSE”ならネイティブ、同“TRUE”ならアクセラレータ)に一致することが期待される。また、ステップS36で例示したように、ステップS36でスキャン進捗率の差の符号の一致も確認していると、「部分一致部分のスキャン進捗率の低い方」は部分一致タプルのオフロード選択フラグで示される過去の実績でクエリ実行を停止させた方に一致する。   At this time, “the one with the lower scan progress rate of the partially matched portion” in step S38 is the one in which the query execution is stopped based on the past results indicated by the offload selection flag of the partially matched tuple (in this example, the offload selection is selected). The flag “FALSE” is expected to match the native, and the same “TRUE” to the accelerator). Further, as exemplified in step S36, when the coincidence of the signs of the scan progress rate differences is also confirmed in step S36, “the lower scan progress rate of the partially matched portion” is the offload selection flag of the partially matched tuple. It matches the person who stopped query execution in the past results shown by.

なお、ステップS36,37の実行順は逆でもよい。
次に、以上の手順によるDBサーバ100によるクエリ実行制御の具体例を説明する。
図13は、クエリ実行制御の第1の例を示す図である。図13の左側から右側へ向かう方向が時間軸の正方向である(以降の図でも同様である)。
The execution order of steps S36 and 37 may be reversed.
Next, a specific example of query execution control by the DB server 100 according to the above procedure will be described.
FIG. 13 is a diagram illustrating a first example of query execution control. The direction from the left side to the right side in FIG. 13 is the positive direction of the time axis (the same applies to the following drawings).

時刻T11において、DBサーバ100は、クライアント600によるクエリの入力を受け付ける。該当のクエリの内容に対応する実績は、オフロード選択テーブル111に未だ記録されていないものとする。DBサーバ100は、クエリからプランツリーを作成し、監視対象テーブルを決定する。ここでは、監視対象テーブルは、テーブル31a,31bであるとする。DBサーバ100は、DBサーバ100のクエリ実行部140(ネイティブのDBMS)およびクラスタ20(アクセラレータ)の両方に、受け付けたクエリの実行開始を指示する。クエリ実行部140は、実行開始の指示を受け付けるとクエリの実行を開始する。クラスタ20は、実行開始の指示を受け付けるとクエリの実行を開始する。DBサーバ100は、クエリ実行部140およびクラスタ20それぞれによるテーブル31a,31bのテーブルスキャンの進捗の監視を開始する。   At time T <b> 11, the DB server 100 receives a query input from the client 600. It is assumed that the record corresponding to the content of the corresponding query has not yet been recorded in the offload selection table 111. The DB server 100 creates a plan tree from the query and determines a monitoring target table. Here, it is assumed that the monitoring target tables are the tables 31a and 31b. The DB server 100 instructs both the query execution unit 140 (native DBMS) and the cluster 20 (accelerator) of the DB server 100 to start executing the accepted query. When the query execution unit 140 receives an instruction to start execution, the query execution unit 140 starts executing the query. When the cluster 20 receives an instruction to start execution, the cluster 20 starts executing the query. The DB server 100 starts monitoring the progress of table scans of the tables 31a and 31b by the query execution unit 140 and the cluster 20, respectively.

時刻T12において、DBサーバ100は、クエリ実行部140について、テーブル31aのスキャン進捗率60%であり、テーブル31bのスキャン進捗率100%を検出する。また、DBサーバ100は、クラスタ20についてテーブル31aのスキャン進捗率100%、テーブル31bのスキャン進捗率100%を検出する。このため、DBサーバ100は、クエリ実行部140に、該当のクエリの実行停止を指示する。クエリ実行部140は、該当のクエリの実行を停止する。クラスタ20は、該当のクエリの実行を継続する。   At time T12, the DB server 100 detects the scan progress rate 60% of the table 31a and the scan progress rate 100% of the table 31b for the query execution unit 140. Further, the DB server 100 detects the scan progress rate 100% of the table 31a and the scan progress rate 100% of the table 31b for the cluster 20. For this reason, the DB server 100 instructs the query execution unit 140 to stop executing the corresponding query. The query execution unit 140 stops executing the corresponding query. The cluster 20 continues to execute the corresponding query.

時刻T13において、クラスタ20は、クエリの実行を完了する。DBサーバ100は、クラスタ20からクエリの実行結果を取得し、クライアント600に送信する。
このように、DBサーバ100は、DBサーバ100におけるクエリ処理を、時刻T12で停止させることができる。その結果、時刻T12の段階で、DBサーバ100における当該クエリ処理のためのリソースを解放させることができる。
At time T13, the cluster 20 completes the execution of the query. The DB server 100 acquires a query execution result from the cluster 20 and transmits it to the client 600.
Thus, the DB server 100 can stop the query processing in the DB server 100 at time T12. As a result, the resource for the query processing in the DB server 100 can be released at the stage of time T12.

図14は、クエリ実行制御の第2の例を示す図である。図14の例では、DBサーバ100に入力されるクエリの内容は、テーブル31a(テーブル名“tbl1”)に対するシーケンシャルスキャン、および、テーブル31c(テーブル名“tbl3”)に対するシーケンシャルスキャンを含むとする。監視対象テーブルは、テーブル31a,31cであるとする。   FIG. 14 is a diagram illustrating a second example of query execution control. In the example of FIG. 14, it is assumed that the contents of the query input to the DB server 100 include a sequential scan for the table 31a (table name “tbl1”) and a sequential scan for the table 31c (table name “tbl3”). The monitoring target tables are assumed to be tables 31a and 31c.

更に、テーブル31aに対するシーケンシャルスキャンおよびテーブル31cに対するシーケンシャルスキャンを行ったクエリの過去の実績(入力されるクエリに対する完全一致タプル)が、オフロード選択テーブル111に登録されているものとする。例えば、DBサーバ100は次の制御を行う。   Furthermore, it is assumed that past results (complete match tuples for input queries) of queries that have been subjected to sequential scan for the table 31a and sequential scan for the table 31c are registered in the offload selection table 111. For example, the DB server 100 performs the following control.

時刻T21において、DBサーバ100は、クライアント600によるクエリの入力を受け付ける。DBサーバ100は、当該クエリがテーブル31a,31cそれぞれに対するシーケンシャルスキャンを含むことを特定する。また、DBサーバ100は、当該クエリにおける監視対象テーブルをテーブル31a,31cと決定する。DBサーバ100は、オフロード選択テーブル111を参照して、テーブル31aに対するシーケンシャルスキャン、および、テーブル31cに対するシーケンシャルスキャンを行ったクエリの実績に対応する行を特定する。特定された行は、入力されたクエリの内容に対する完全一致タプルである。そして、DBサーバ100は、特定された行に設定されたオフロード選択フラグが“TRUE”であることを特定する。   At time T <b> 21, the DB server 100 receives a query input from the client 600. The DB server 100 specifies that the query includes a sequential scan for each of the tables 31a and 31c. Further, the DB server 100 determines the monitoring target tables in the query as the tables 31a and 31c. The DB server 100 refers to the offload selection table 111 and identifies a row corresponding to the results of a query that has performed a sequential scan on the table 31a and a sequential scan on the table 31c. The identified row is an exact match tuple for the entered query content. Then, the DB server 100 specifies that the offload selection flag set in the specified row is “TRUE”.

このため、DBサーバ100は、今回受け付けたクエリの実行開始をクラスタ20に指示する。また、DBサーバ100は、当該クエリの実行開始をDBサーバ100に指示しない。したがって、DBサーバ100では当該クエリを最初から実行しないことになる。   For this reason, the DB server 100 instructs the cluster 20 to start executing the currently accepted query. Further, the DB server 100 does not instruct the DB server 100 to start executing the query. Therefore, the DB server 100 does not execute the query from the beginning.

時刻T22において、クラスタ20は、クエリの実行を完了する。DBサーバ100は、クラスタ20からクエリの実行結果を取得し、クライアント600に送信する。
このように、DBサーバ100は、過去の実績を基に、DBサーバ100またはクラスタ20の一方に対してクエリの実行開始の指示を行わないよう制御することもできる。これにより、DBサーバ100による余計な処理の実行を抑えられる。その結果、当該処理によりDBサーバ100で余計なリソースが使用されることを抑えられる。
At time T22, the cluster 20 completes the execution of the query. The DB server 100 acquires a query execution result from the cluster 20 and transmits it to the client 600.
As described above, the DB server 100 can also perform control so as not to instruct execution of a query to either the DB server 100 or the cluster 20 based on the past results. Thereby, execution of the unnecessary process by the DB server 100 can be suppressed. As a result, it is possible to suppress the use of extra resources in the DB server 100 by the processing.

図15は、クエリ実行制御の第3の例を示す図である。図15の例では、DBサーバ100に入力されるクエリの内容は、テーブル31b(テーブル名“tbl2”)に対するインデックススキャン、テーブル31c(テーブル名“tbl3”)に対するインデックススキャン、および、テーブル31d(テーブル名“tbl4”)に対するシーケンシャルスキャンを含むとする。監視対象テーブルは、テーブル31b,31c,31dであるとする。   FIG. 15 is a diagram illustrating a third example of query execution control. In the example of FIG. 15, the contents of the query input to the DB server 100 include an index scan for the table 31b (table name “tbl2”), an index scan for the table 31c (table name “tbl3”), and a table 31d (table Assume that a sequential scan for the name “tbl4”) is included. Assume that the monitoring target tables are tables 31b, 31c, and 31d.

また、テーブル31b,31cそれぞれに対するインデックスキャン、および、テーブル31dに対するシーケンシャルスキャンを行ったクエリの過去の実績(入力されるクエリの内容に対する完全一致タプル)が、オフロード選択テーブル111に登録されていないものとする。更に、テーブル31bに対するインデックススキャンおよびテーブル31cに対するインデックススキャンを行ったクエリの過去の実績(入力されたクエリの内容に対する部分一致タプル)が、オフロード選択テーブル111に登録されているものとする。例えば、DBサーバ100は次の制御を行う。   In addition, past results of queries that have been index-scanned for each of the tables 31b and 31c and a sequential scan for the table 31d (a complete match tuple for the contents of the input query) are not registered in the offload selection table 111. Shall. Furthermore, it is assumed that the past results (partial match tuples for the contents of the input query) of the queries that have performed the index scan on the table 31b and the index scan on the table 31c are registered in the offload selection table 111. For example, the DB server 100 performs the following control.

時刻T31において、DBサーバ100は、クライアント600によるクエリの入力を受け付ける。DBサーバ100は、当該クエリがテーブル31b,31cそれぞれに対するインデックススキャン、および、テーブル31dに対するシーケンシャルスキャンを含むことを特定する。また、DBサーバ100は、当該クエリにおける監視対象テーブルをテーブル31b,31c,31dと決定する。DBサーバ100は、オフロード選択テーブル111を参照して、テーブル31b,31cそれぞれに対するシーケンシャルスキャンを行ったクエリの実績に対応する行を特定する。特定された行は、入力されたクエリの内容に対する部分一致タプルである。   At time T <b> 31, the DB server 100 accepts a query input from the client 600. The DB server 100 specifies that the query includes an index scan for each of the tables 31b and 31c and a sequential scan for the table 31d. Further, the DB server 100 determines the monitoring target tables in the query as the tables 31b, 31c, and 31d. The DB server 100 refers to the offload selection table 111 and identifies a row corresponding to the performance of the query that performed the sequential scan for each of the tables 31b and 31c. The identified line is a partial match tuple for the contents of the input query.

DBサーバ100は、DBサーバ100のクエリ実行部140およびクラスタ20の両方に、受け付けたクエリの実行開始を指示する。クエリ実行部140は、実行開始の指示を受け付けるとクエリの実行を開始する。クラスタ20は、実行開始の指示を受け付けるとクエリの実行を開始する。DBサーバ100は、クエリ実行部140およびクラスタ20それぞれによるテーブル31a,31bのテーブルスキャンの進捗の監視を開始する。この場合、DBサーバ100は、複数の監視対象テーブルのうち、部分一致部分(テーブル31b,31c)と、新規部分(テーブル31d)とに対するテーブルスキャンを分けて監視する。   The DB server 100 instructs both the query execution unit 140 and the cluster 20 of the DB server 100 to start executing the accepted query. When the query execution unit 140 receives an instruction to start execution, the query execution unit 140 starts executing the query. When the cluster 20 receives an instruction to start execution, the cluster 20 starts executing the query. The DB server 100 starts monitoring the progress of table scans of the tables 31a and 31b by the query execution unit 140 and the cluster 20, respectively. In this case, the DB server 100 separately monitors table scans for the partially matched portions (tables 31b and 31c) and the new portion (table 31d) among the plurality of monitoring target tables.

時刻T32において、DBサーバ100は、クエリ実行部140について、テーブル31bのスキャン進捗率100%、テーブル31cのスキャン進捗率100%、および、テーブル31dのスキャン進捗率80%を検出する。また、DBサーバ100は、クラスタ20について、テーブル31bのスキャン進捗率100%、テーブル31cのスキャン進捗率100%、および、テーブル31dのスキャン進捗率90%を検出する。   At time T32, the DB server 100 detects the scan progress rate 100% of the table 31b, the scan progress rate 100% of the table 31c, and the scan progress rate 80% of the table 31d for the query execution unit 140. Further, the DB server 100 detects the scan progress rate 100% of the table 31b, the scan progress rate 100% of the table 31c, and the scan progress rate 90% of the table 31d for the cluster 20.

この場合、複数の監視対象テーブルのうち、部分一致部分(テーブル31b,31c)に対するスキャン進捗率がクエリ実行部140およびクラスタ20の両方で全て100%である。このため、DBサーバ100は、複数の監視対象テーブルのうちの新規部分(テーブル31d)のスキャン進捗率が低い方に、クエリの実行停止を指示する。この例では、クエリ実行部140によるテーブル31dのスキャン進捗率の方が、クラスタ20によるテーブル31dのスキャン進捗率よりも低い。したがって、DBサーバ100は、クエリ実行部140に、当該クエリの実行停止を指示する。クエリ実行部140は、実行停止の指示を受け付けると、当該クエリの実行を停止する。   In this case, the scan progress rates for the partially matched portions (tables 31b and 31c) among the plurality of monitoring target tables are all 100% in both the query execution unit 140 and the cluster 20. For this reason, the DB server 100 instructs the query execution stop to the lower scan progress rate of the new part (table 31d) among the plurality of monitoring target tables. In this example, the scan progress rate of the table 31d by the query execution unit 140 is lower than the scan progress rate of the table 31d by the cluster 20. Therefore, the DB server 100 instructs the query execution unit 140 to stop executing the query. When the query execution unit 140 receives an instruction to stop execution, the query execution unit 140 stops execution of the query.

時刻T33において、クラスタ20は、クエリの実行を完了する。DBサーバ100は、クラスタ20からクエリの実行結果を取得し、クライアント600に送信する。
このように、DBサーバ100は、DBサーバ100におけるクエリ処理を、時刻T32で停止させることができる。その結果、時刻T32の段階で、DBサーバ100における当該クエリ処理のためのリソースを解放させることができる。特に、過去の実績を用いることで、図13の場合に比べて、複数の監視対象テーブルの全てのスキャン進捗率が100%に到達する前に、ネイティブまたはアクセラレータのうちの一方のクエリの実行を停止させることができる。その結果、リソースの解放を一層早めることができる。
At time T33, the cluster 20 completes the execution of the query. The DB server 100 acquires a query execution result from the cluster 20 and transmits it to the client 600.
Thus, the DB server 100 can stop the query processing in the DB server 100 at time T32. As a result, resources for the query processing in the DB server 100 can be released at the stage of time T32. In particular, by using the past results, the execution of one of the native or accelerator queries is executed before all the scan progress rates of the plurality of monitoring target tables reach 100% as compared with the case of FIG. Can be stopped. As a result, resource release can be further accelerated.

図16は、クエリ実行制御の第4の例を示す図である。図16の例では、DBサーバ100に入力されるクエリの内容は、テーブル31b(テーブル名“tbl2”)に対するインデックススキャン、テーブル31c(テーブル名“tbl3”)に対するインデックススキャン、および、テーブル31d(テーブル名“tbl4”)に対するシーケンシャルスキャンを含むとする。監視対象テーブルは、テーブル31b,31c,31dであるとする。   FIG. 16 is a diagram illustrating a fourth example of query execution control. In the example of FIG. 16, the contents of the query input to the DB server 100 include an index scan for the table 31b (table name “tbl2”), an index scan for the table 31c (table name “tbl3”), and a table 31d (table Assume that a sequential scan for the name “tbl4”) is included. Assume that the monitoring target tables are tables 31b, 31c, and 31d.

また、テーブル31b,31cそれぞれに対するインデックスキャン、および、テーブル31dに対するシーケンシャルスキャンを行ったクエリの過去の実績(入力されるクエリの内容に対する完全一致タプル)が、オフロード選択テーブル111に登録されていないものとする。更に、テーブル31bに対するインデックススキャンおよびテーブル31cに対するインデックススキャンを行ったクエリの過去の実績(入力されたクエリの内容に対する部分一致タプル)が、オフロード選択テーブル111に登録されているものとする。例えば、DBサーバ100は次の制御を行う。   In addition, past results of queries that have been index-scanned for each of the tables 31b and 31c and a sequential scan for the table 31d (a complete match tuple for the contents of the input query) are not registered in the offload selection table 111. Shall. Furthermore, it is assumed that the past results (partial match tuples for the contents of the input query) of the queries that have performed the index scan on the table 31b and the index scan on the table 31c are registered in the offload selection table 111. For example, the DB server 100 performs the following control.

時刻T41において、DBサーバ100は、クライアント600によるクエリの入力を受け付ける。DBサーバ100は、当該クエリがテーブル31b,31cそれぞれに対するインデックススキャン、および、テーブル31dに対するシーケンシャルスキャンを含むことを特定する。また、DBサーバ100は、当該クエリにおける監視対象テーブルをテーブル31b,31c,31dと決定する。DBサーバ100は、オフロード選択テーブル111を参照して、テーブル31b,31cそれぞれに対するシーケンシャルスキャンを行ったクエリの実績に対応する行を特定する。特定された行は、入力されたクエリの内容に対する部分一致タプルである。   At time T <b> 41, the DB server 100 accepts a query input from the client 600. The DB server 100 specifies that the query includes an index scan for each of the tables 31b and 31c and a sequential scan for the table 31d. Further, the DB server 100 determines the monitoring target tables in the query as the tables 31b, 31c, and 31d. The DB server 100 refers to the offload selection table 111 and identifies a row corresponding to the performance of the query that performed the sequential scan for each of the tables 31b and 31c. The identified line is a partial match tuple for the contents of the input query.

DBサーバ100は、DBサーバ100のクエリ実行部140およびクラスタ20の両方に、受け付けたクエリの実行開始を指示する。クエリ実行部140は、実行開始の指示を受け付けるとクエリの実行を開始する。クラスタ20は、実行開始の指示を受け付けるとクエリの実行を開始する。DBサーバ100は、クエリ実行部140およびクラスタ20それぞれによるテーブル31a,31bのテーブルスキャンの進捗の監視を開始する。この場合、DBサーバ100は、複数の監視対象テーブルのうち、部分一致部分(テーブル31b,31c)と、新規部分(テーブル31d)とに対するテーブルスキャンを分けて監視する。   The DB server 100 instructs both the query execution unit 140 and the cluster 20 of the DB server 100 to start executing the accepted query. When the query execution unit 140 receives an instruction to start execution, the query execution unit 140 starts executing the query. When the cluster 20 receives an instruction to start execution, the cluster 20 starts executing the query. The DB server 100 starts monitoring the progress of table scans of the tables 31a and 31b by the query execution unit 140 and the cluster 20, respectively. In this case, the DB server 100 separately monitors table scans for the partially matched portions (tables 31b and 31c) and the new portion (table 31d) among the plurality of monitoring target tables.

時刻T42において、DBサーバ100は、クエリ実行部140について、テーブル31bのスキャン進捗率90%、テーブル31cのスキャン進捗率70%、および、テーブル31dのスキャン進捗率100%を検出する。また、DBサーバ100は、クラスタ20について、テーブル31bのスキャン進捗率30%、テーブル31cのスキャン進捗率20%、および、テーブル31dのスキャン進捗率100%を検出する。   At time T42, the DB server 100 detects the scan progress rate 90% of the table 31b, the scan progress rate 70% of the table 31c, and the scan progress rate 100% of the table 31d for the query execution unit 140. Further, the DB server 100 detects the scan progress rate 30% of the table 31b, the scan progress rate 20% of the table 31c, and the scan progress rate 100% of the table 31d for the cluster 20.

この場合、複数の監視対象テーブルのうち、新規部分(テーブル31d)に対するスキャン進捗率がクエリ実行部140およびクラスタ20の両方で100%である。このため、DBサーバ100は、複数の監視対象テーブルのうちの部分一致部分(テーブル31b,31c)の現スキャン進捗率の差の絶対値を、オフロード選択テーブル111の部分一致タプルに登録されたスキャン進捗率の差の絶対値と比較する。   In this case, the scan progress rate for the new part (table 31d) among the plurality of monitoring target tables is 100% in both the query execution unit 140 and the cluster 20. For this reason, the DB server 100 registers the absolute value of the difference in the current scan progress rates of the partially matched portions (tables 31b and 31c) among the plurality of monitoring target tables in the partially matched tuple of the offload selection table 111. Compare with absolute value of scan progress rate difference.

テーブル31bについて、現スキャン進捗率の差は、30%−90%=−60%である。したがって、テーブル31bについて、現スキャン進捗率の差の絶対値は60%である。テーブル31cについて、現スキャン進捗率の差は、20%−70%=−50%である。したがって、テーブル31cについて、現スキャン進捗率の差の絶対値は50%である。   For the table 31b, the difference in the current scan progress rate is 30% −90% = − 60%. Therefore, for the table 31b, the absolute value of the difference in the current scan progress rate is 60%. For the table 31c, the difference in the current scan progress rate is 20% −70% = − 50%. Therefore, for the table 31c, the absolute value of the difference in the current scan progress rate is 50%.

一方、オフロード選択テーブル111の部分一致タプルに含まれるテーブル31bのスキャン進捗率の差の絶対値は30%である。また、当該部分一致タプルに含まれるテーブル31cのスキャン進捗率の差の絶対値は50%である。   On the other hand, the absolute value of the difference in the scan progress rates of the table 31b included in the partial match tuple of the offload selection table 111 is 30%. Further, the absolute value of the difference in the scan progress rates of the table 31c included in the partial match tuple is 50%.

この場合、テーブル31bについて、現スキャン進捗率の差の絶対値(60%)≧部分一致タプルにおけるスキャン進捗率の差の絶対値(30%)を満たす。また、テーブル31cについて、現スキャン進捗率の差の絶対値(50%)≧部分一致タプルにおけるスキャン進捗率の差の絶対値(50%)を満たす。よって、DBサーバ100は、部分一致部分(テーブル31b,31c)の現スキャン進捗率の差の絶対値が、部分一致タプルに登録されたスキャン進捗率の差の絶対値以上であると判定する。   In this case, the absolute value (60%) of the difference in the current scan progress rate ≧ the absolute value (30%) of the difference in the scan progress rate in the partial match tuple is satisfied for the table 31b. For the table 31c, the absolute value (50%) of the difference in current scan progress rate ≧ the absolute value (50%) of the difference in scan progress rate in the partially matched tuple is satisfied. Therefore, the DB server 100 determines that the absolute value of the difference in the current scan progress rates of the partially matched portions (tables 31b and 31c) is greater than or equal to the absolute value of the difference in the scan progress rates registered in the partially matched tuple.

更に、新規部分(テーブル31d)のスキャン進捗率が100%に達した依頼先は、部分一致タプルにおけるオフロード選択フラグ“FALSE”により特定される実行継続先であるクエリ実行部140(DBサーバ100)に一致している。このため、DBサーバ100は、複数の監視対象テーブルのうちの部分一致部分(テーブル31b,31c)のスキャン進捗率が低い方に、クエリの実行停止を指示する。この例では、クラスタ20によるテーブル31b,31cのスキャン進捗率の方が、クエリ実行部140によるテーブル31b,31cのスキャン進捗率よりも低い(例えば、前述のように、スキャン進捗率の平均値で比較してもよい)。したがって、DBサーバ100は、クラスタ20に、当該クエリの実行停止を指示する。クラスタ20は、実行停止の指示を受け付けると、当該クエリの実行を停止する。ここでは、未完了の監視対象処理に関する過去の実績から、オフロード選択フラグ“FALSE”により特定される実行継続先であるクエリ実行部140とは異なる方(クラスタ20)に対して、実行停止の指示が行われることが期待される。   Further, the request destination at which the scan progress rate of the new part (table 31d) has reached 100% is the query execution unit 140 (DB server 100) which is the execution continuation destination specified by the offload selection flag “FALSE” in the partial match tuple. ). For this reason, the DB server 100 instructs the query execution stop to the lower scan progress rate of the partially matched portions (tables 31b and 31c) among the plurality of monitoring target tables. In this example, the scan progress rates of the tables 31b and 31c by the cluster 20 are lower than the scan progress rates of the tables 31b and 31c by the query execution unit 140 (for example, as described above, the average value of the scan progress rates) You may compare). Therefore, the DB server 100 instructs the cluster 20 to stop executing the query. When receiving an execution stop instruction, the cluster 20 stops the execution of the query. Here, based on the past performance regarding the unfinished monitoring target process, the execution is stopped for the one (cluster 20) different from the query execution unit 140 that is the execution continuation destination specified by the offload selection flag “FALSE”. It is expected that instructions will be given.

時刻T43において、クエリ実行部140は、クエリの実行を完了する。DBサーバ100は、クエリ実行部140からクエリの実行結果を取得し、クライアント600に送信する。   At time T43, the query execution unit 140 completes the execution of the query. The DB server 100 acquires a query execution result from the query execution unit 140 and transmits it to the client 600.

このように、DBサーバ100は、クラスタ20におけるクエリ処理を、時刻T42で停止させることができる。その結果、時刻T42の段階で、クラスタ20における当該クエリ処理のためのリソースを解放させることができる。特に、過去の実績を用いることで、図13の場合に比べて、複数の監視対象テーブルの全てのスキャン進捗率が100%に到達する前に、ネイティブまたはアクセラレータのうちの一方のクエリの実行を停止させることができる。その結果、リソースの解放を一層早めることができる。   Thus, the DB server 100 can stop the query processing in the cluster 20 at time T42. As a result, resources for the query processing in the cluster 20 can be released at the stage of time T42. In particular, by using the past results, the execution of one of the native or accelerator queries is executed before all the scan progress rates of the plurality of monitoring target tables reach 100% as compared with the case of FIG. Can be stopped. As a result, resource release can be further accelerated.

図17は、クエリ実行制御の第5の例を示す図である。図17の例では、DBサーバ100に入力されるクエリの内容は、テーブル31b(テーブル名“tbl2”)に対するインデックススキャン、テーブル31c(テーブル名“tbl3”)に対するインデックススキャン、および、テーブル31d(テーブル名“tbl4”)に対するシーケンシャルスキャンを含むとする。監視対象テーブルは、テーブル31b,31c,31dであるとする。   FIG. 17 is a diagram illustrating a fifth example of query execution control. In the example of FIG. 17, the contents of the query input to the DB server 100 include an index scan for the table 31b (table name “tbl2”), an index scan for the table 31c (table name “tbl3”), and a table 31d (table Assume that a sequential scan for the name “tbl4”) is included. Assume that the monitoring target tables are tables 31b, 31c, and 31d.

また、テーブル31b,31cそれぞれに対するインデックスキャン、および、テーブル31dに対するシーケンシャルスキャンを行ったクエリの過去の実績(入力されるクエリの内容に対する完全一致タプル)が、オフロード選択テーブル111に登録されていないものとする。更に、テーブル31bに対するインデックススキャンおよびテーブル31cに対するインデックススキャンを行ったクエリの過去の実績(入力されたクエリの内容に対する部分一致タプル)が、オフロード選択テーブル111に登録されているものとする。例えば、DBサーバ100は次の制御を行う。   In addition, past results of queries that have been index-scanned for each of the tables 31b and 31c and a sequential scan for the table 31d (a complete match tuple for the contents of the input query) are not registered in the offload selection table 111. Shall. Furthermore, it is assumed that the past results (partial match tuples for the contents of the input query) of the queries that have performed the index scan on the table 31b and the index scan on the table 31c are registered in the offload selection table 111. For example, the DB server 100 performs the following control.

時刻T51において、DBサーバ100は、クライアント600によるクエリの入力を受け付ける。DBサーバ100は、当該クエリがテーブル31b,31cそれぞれに対するインデックススキャン、および、テーブル31dに対するシーケンシャルスキャンを含むことを特定する。また、DBサーバ100は、当該クエリにおける監視対象テーブルをテーブル31b,31c,31dと決定する。DBサーバ100は、オフロード選択テーブル111を参照して、テーブル31b,31cそれぞれに対するシーケンシャルスキャンを行ったクエリの実績に対応する行を特定する。特定された行は、入力されたクエリの内容に対する部分一致タプルである。   At time T <b> 51, the DB server 100 accepts a query input from the client 600. The DB server 100 specifies that the query includes an index scan for each of the tables 31b and 31c and a sequential scan for the table 31d. Further, the DB server 100 determines the monitoring target tables in the query as the tables 31b, 31c, and 31d. The DB server 100 refers to the offload selection table 111 and identifies a row corresponding to the performance of the query that performed the sequential scan for each of the tables 31b and 31c. The identified line is a partial match tuple for the contents of the input query.

DBサーバ100は、DBサーバ100のクエリ実行部140およびクラスタ20の両方に、受け付けたクエリの実行開始を指示する。クエリ実行部140は、実行開始の指示を受け付けるとクエリの実行を開始する。クラスタ20は、実行開始の指示を受け付けるとクエリの実行を開始する。DBサーバ100は、クエリ実行部140およびクラスタ20それぞれによるテーブル31a,31bのテーブルスキャンの進捗の監視を開始する。この場合、DBサーバ100は、複数の監視対象テーブルのうち、部分一致部分(テーブル31b,31c)と、新規部分(テーブル31d)とに対するテーブルスキャンを分けて監視する。   The DB server 100 instructs both the query execution unit 140 and the cluster 20 of the DB server 100 to start executing the accepted query. When the query execution unit 140 receives an instruction to start execution, the query execution unit 140 starts executing the query. When the cluster 20 receives an instruction to start execution, the cluster 20 starts executing the query. The DB server 100 starts monitoring the progress of table scans of the tables 31a and 31b by the query execution unit 140 and the cluster 20, respectively. In this case, the DB server 100 separately monitors table scans for the partially matched portions (tables 31b and 31c) and the new portion (table 31d) among the plurality of monitoring target tables.

時刻T52において、DBサーバ100は、クエリ実行部140について、テーブル31bのスキャン進捗率90%、テーブル31cのスキャン進捗率70%、および、テーブル31dのスキャン進捗率100%を検出する。また、DBサーバ100は、クラスタ20について、テーブル31bのスキャン進捗率30%、テーブル31cのスキャン進捗率20%、および、テーブル31dのスキャン進捗率40%を検出する。   At time T52, the DB server 100 detects the scan progress rate 90% of the table 31b, the scan progress rate 70% of the table 31c, and the scan progress rate 100% of the table 31d for the query execution unit 140. Further, the DB server 100 detects the scan progress rate 30% of the table 31b, the scan progress rate 20% of the table 31c, and the scan progress rate 40% of the table 31d for the cluster 20.

この場合、複数の監視対象テーブルのうち、新規部分(テーブル31d)に対するスキャン進捗率がクエリ実行部140で100%である。このため、DBサーバ100は、複数の監視対象テーブルのうちの部分一致部分(テーブル31b,31c)の現スキャン進捗率の差の絶対値を、オフロード選択テーブル111の部分一致タプルに登録されたスキャン進捗率の差の絶対値と比較する。   In this case, the scan progress rate for the new part (table 31d) among the plurality of monitoring target tables is 100% in the query execution unit 140. For this reason, the DB server 100 registers the absolute value of the difference in the current scan progress rates of the partially matched portions (tables 31b and 31c) among the plurality of monitoring target tables in the partially matched tuple of the offload selection table 111. Compare with absolute value of scan progress rate difference.

テーブル31bについて、現スキャン進捗率の差は、30%−90%=−60%である。したがって、テーブル31bについて、現スキャン進捗率の差の絶対値は60%である。テーブル31cについて、現スキャン進捗率の差は、20%−70%=−50%である。したがって、テーブル31cについて、現スキャン進捗率の差の絶対値は50%である。   For the table 31b, the difference in the current scan progress rate is 30% −90% = − 60%. Therefore, for the table 31b, the absolute value of the difference in the current scan progress rate is 60%. For the table 31c, the difference in the current scan progress rate is 20% −70% = − 50%. Therefore, for the table 31c, the absolute value of the difference in the current scan progress rate is 50%.

一方、オフロード選択テーブル111の部分一致タプルに含まれるテーブル31bのスキャン進捗率の差の絶対値は30%である。また、当該部分一致タプルに含まれるテーブル31cのスキャン進捗率の差の絶対値は50%である。   On the other hand, the absolute value of the difference in the scan progress rates of the table 31b included in the partial match tuple of the offload selection table 111 is 30%. Further, the absolute value of the difference in the scan progress rates of the table 31c included in the partial match tuple is 50%.

この場合、テーブル31bについて、現スキャン進捗率の差の絶対値(60%)≧部分一致タプルにおけるスキャン進捗率の差の絶対値(30%)を満たす。また、テーブル31cについて、現スキャン進捗率の差の絶対値(50%)≧部分一致タプルにおけるスキャン進捗率の差の絶対値(50%)を満たす。よって、DBサーバ100は、部分一致部分(テーブル31b,31c)の現スキャン進捗率の差の絶対値が、部分一致タプルに登録されたスキャン進捗率の差の絶対値以上であると判定する。   In this case, the absolute value (60%) of the difference in the current scan progress rate ≧ the absolute value (30%) of the difference in the scan progress rate in the partial match tuple is satisfied for the table 31b. For the table 31c, the absolute value (50%) of the difference in current scan progress rate ≧ the absolute value (50%) of the difference in scan progress rate in the partially matched tuple is satisfied. Therefore, the DB server 100 determines that the absolute value of the difference in the current scan progress rates of the partially matched portions (tables 31b and 31c) is greater than or equal to the absolute value of the difference in the scan progress rates registered in the partially matched tuple.

更に、新規部分(テーブル31d)のスキャン進捗率が100%に達した依頼先は、部分一致タプルにおけるオフロード選択フラグ“FALSE”により特定される実行継続先であるクエリ実行部140(DBサーバ100)に一致している。このため、DBサーバ100は、複数の監視対象テーブルのうちの部分一致部分(テーブル31b,31c)のスキャン進捗率が低い方に、クエリの実行停止を指示する。この例では、クラスタ20によるテーブル31b,31cのスキャン進捗率の方が、クエリ実行部140によるテーブル31b,31cのスキャン進捗率よりも低い(例えば、前述のように、スキャン進捗率の平均値で比較してもよい)。したがって、DBサーバ100は、クラスタ20に、当該クエリの実行停止を指示する。クラスタ20は、実行停止の指示を受け付けると、当該クエリの実行を停止する。ここでは、未完了の監視対象処理に関する過去の実績から、オフロード選択フラグ“FALSE”により特定される実行継続先であるクエリ実行部140とは異なる方(クラスタ20)に対して、実行停止の指示が行われることが期待される。   Further, the request destination at which the scan progress rate of the new part (table 31d) has reached 100% is the query execution unit 140 (DB server 100) which is the execution continuation destination specified by the offload selection flag “FALSE” in the partial match tuple. ). For this reason, the DB server 100 instructs the query execution stop to the lower scan progress rate of the partially matched portions (tables 31b and 31c) among the plurality of monitoring target tables. In this example, the scan progress rates of the tables 31b and 31c by the cluster 20 are lower than the scan progress rates of the tables 31b and 31c by the query execution unit 140 (for example, as described above, the average value of the scan progress rates) You may compare). Therefore, the DB server 100 instructs the cluster 20 to stop executing the query. When receiving an execution stop instruction, the cluster 20 stops the execution of the query. Here, based on the past performance regarding the unfinished monitoring target process, the execution is stopped for the one (cluster 20) different from the query execution unit 140 that is the execution continuation destination specified by the offload selection flag “FALSE”. It is expected that instructions will be given.

時刻T53において、クエリ実行部140は、クエリの実行を完了する。DBサーバ100は、クエリ実行部140からクエリの実行結果を取得し、クライアント600に送信する。   At time T53, the query execution unit 140 completes the execution of the query. The DB server 100 acquires a query execution result from the query execution unit 140 and transmits it to the client 600.

このように、DBサーバ100は、クラスタ20におけるクエリ処理を、時刻T52で停止させることができる。その結果、時刻T52の段階で、クラスタ20における当該クエリ処理のためのリソースを解放させることができる。特に、過去の実績を用いることで、図13の場合に比べて、複数の監視対象テーブルの全てのスキャン進捗率が100%に到達する前に、ネイティブまたはアクセラレータのうちの一方のクエリの実行を停止させることができる。その結果、リソースの解放を一層早めることができる。   Thus, the DB server 100 can stop the query processing in the cluster 20 at time T52. As a result, resources for the query processing in the cluster 20 can be released at the stage of time T52. In particular, by using the past results, the execution of one of the native or accelerator queries is executed before all the scan progress rates of the plurality of monitoring target tables reach 100% as compared with the case of FIG. Can be stopped. As a result, resource release can be further accelerated.

特に、DBサーバ100において、テーブル31dのスキャン進捗率が100%に到達していれば、クラスタ20においてテーブル31dのスキャン進捗率が100%に到達していなくても、クラスタ20によるクエリの実行を停止させることができる。したがって、リソースの解放を一層早めることができる。   In particular, in the DB server 100, if the scan progress rate of the table 31d has reached 100%, the query execution by the cluster 20 is executed even if the scan progress rate of the table 31d has not reached 100% in the cluster 20. Can be stopped. Therefore, the release of resources can be further accelerated.

図18は、クエリ実行制御の第6の例を示す図である。図18の例では、DBサーバ100に入力されるクエリの内容は、テーブル31b(テーブル名“tbl2”)に対するインデックススキャン、テーブル31c(テーブル名“tbl3”)に対するインデックススキャン、および、テーブル31d(テーブル名“tbl4”)に対するシーケンシャルスキャンを含むとする。監視対象テーブルは、テーブル31b,31c,31dであるとする。   FIG. 18 is a diagram illustrating a sixth example of query execution control. In the example of FIG. 18, the contents of the query input to the DB server 100 include an index scan for the table 31b (table name “tbl2”), an index scan for the table 31c (table name “tbl3”), and a table 31d (table Assume that a sequential scan for the name “tbl4”) is included. Assume that the monitoring target tables are tables 31b, 31c, and 31d.

また、テーブル31b,31cそれぞれに対するインデックスキャン、および、テーブル31dに対するシーケンシャルスキャンを行ったクエリの過去の実績(入力されるクエリの内容に対する完全一致タプル)が、オフロード選択テーブル111に登録されていないものとする。更に、テーブル31bに対するインデックススキャンおよびテーブル31cに対するインデックススキャンを行ったクエリの過去の実績(入力されたクエリの内容に対する部分一致タプル)が、オフロード選択テーブル111に登録されているものとする。例えば、DBサーバ100は次の制御を行う。   In addition, past results of queries that have been index-scanned for each of the tables 31b and 31c and a sequential scan for the table 31d (a complete match tuple for the contents of the input query) are not registered in the offload selection table 111. Shall. Furthermore, it is assumed that the past results (partial match tuples for the contents of the input query) of the queries that have performed the index scan on the table 31b and the index scan on the table 31c are registered in the offload selection table 111. For example, the DB server 100 performs the following control.

時刻T61において、DBサーバ100は、クライアント600によるクエリの入力を受け付ける。DBサーバ100は、当該クエリがテーブル31b,31cそれぞれに対するインデックススキャン、および、テーブル31dに対するシーケンシャルスキャンを含むことを特定する。また、DBサーバ100は、当該クエリにおける監視対象テーブルをテーブル31b,31c,31dと決定する。DBサーバ100は、オフロード選択テーブル111を参照して、テーブル31b,31cそれぞれに対するシーケンシャルスキャンを行ったクエリの実績に対応する行を特定する。特定された行は、入力されたクエリの内容に対する部分一致タプルである。   At time T <b> 61, the DB server 100 accepts a query input from the client 600. The DB server 100 specifies that the query includes an index scan for each of the tables 31b and 31c and a sequential scan for the table 31d. Further, the DB server 100 determines the monitoring target tables in the query as the tables 31b, 31c, and 31d. The DB server 100 refers to the offload selection table 111 and identifies a row corresponding to the performance of the query that performed the sequential scan for each of the tables 31b and 31c. The identified line is a partial match tuple for the contents of the input query.

DBサーバ100は、DBサーバ100のクエリ実行部140およびクラスタ20の両方に、受け付けたクエリの実行開始を指示する。クエリ実行部140は、実行開始の指示を受け付けるとクエリの実行を開始する。クラスタ20は、実行開始の指示を受け付けるとクエリの実行を開始する。DBサーバ100は、クエリ実行部140およびクラスタ20それぞれによるテーブル31a,31bのテーブルスキャンの進捗の監視を開始する。この場合、DBサーバ100は、複数の監視対象テーブルのうち、部分一致部分(テーブル31b,31c)と、新規部分(テーブル31d)とに対するテーブルスキャンを分けて監視する。   The DB server 100 instructs both the query execution unit 140 and the cluster 20 of the DB server 100 to start executing the accepted query. When the query execution unit 140 receives an instruction to start execution, the query execution unit 140 starts executing the query. When the cluster 20 receives an instruction to start execution, the cluster 20 starts executing the query. The DB server 100 starts monitoring the progress of table scans of the tables 31a and 31b by the query execution unit 140 and the cluster 20, respectively. In this case, the DB server 100 separately monitors table scans for the partially matched portions (tables 31b and 31c) and the new portion (table 31d) among the plurality of monitoring target tables.

時刻T62において、DBサーバ100は、クエリ実行部140について、テーブル31bのスキャン進捗率90%、テーブル31cのスキャン進捗率70%、および、テーブル31dのスキャン進捗率60%を検出する。また、DBサーバ100は、クラスタ20について、テーブル31bのスキャン進捗率30%、テーブル31cのスキャン進捗率20%、および、テーブル31dのスキャン進捗率100%を検出する。   At time T62, the DB server 100 detects the scan progress rate 90% of the table 31b, the scan progress rate 70% of the table 31c, and the scan progress rate 60% of the table 31d for the query execution unit 140. Further, the DB server 100 detects the scan progress rate 30% of the table 31b, the scan progress rate 20% of the table 31c, and the scan progress rate 100% of the table 31d for the cluster 20.

この場合、複数の監視対象テーブルのうち、新規部分(テーブル31d)に対するスキャン進捗率がクラスタ20で100%である。このため、DBサーバ100は、複数の監視対象テーブルのうちの部分一致部分(テーブル31b,31c)の現スキャン進捗率の差の絶対値を、オフロード選択テーブル111の部分一致タプルに登録されたスキャン進捗率の差の絶対値と比較する。   In this case, the scan progress rate for the new part (table 31d) among the plurality of monitoring target tables is 100% in the cluster 20. For this reason, the DB server 100 registers the absolute value of the difference in the current scan progress rates of the partially matched portions (tables 31b and 31c) among the plurality of monitoring target tables in the partially matched tuple of the offload selection table 111. Compare with absolute value of scan progress rate difference.

テーブル31bについて、現スキャン進捗率の差は、30%−90%=−60%である。したがって、テーブル31bについて、現スキャン進捗率の差の絶対値は60%である。テーブル31cについて、現スキャン進捗率の差は、20%−70%=−50%である。したがって、テーブル31cについて、現スキャン進捗率の差の絶対値は50%である。   For the table 31b, the difference in the current scan progress rate is 30% −90% = − 60%. Therefore, for the table 31b, the absolute value of the difference in the current scan progress rate is 60%. For the table 31c, the difference in the current scan progress rate is 20% −70% = − 50%. Therefore, for the table 31c, the absolute value of the difference in the current scan progress rate is 50%.

一方、オフロード選択テーブル111の部分一致タプルに含まれるテーブル31bのスキャン進捗率の差の絶対値は30%である。また、当該部分一致タプルに含まれるテーブル31cのスキャン進捗率の差の絶対値は50%である。   On the other hand, the absolute value of the difference in the scan progress rates of the table 31b included in the partial match tuple of the offload selection table 111 is 30%. Further, the absolute value of the difference in the scan progress rates of the table 31c included in the partial match tuple is 50%.

この場合、テーブル31bについて、現スキャン進捗率の差の絶対値(60%)≧部分一致タプルにおけるスキャン進捗率の差の絶対値(30%)を満たす。また、テーブル31cについて、現スキャン進捗率の差の絶対値(50%)≧部分一致タプルにおけるスキャン進捗率の差の絶対値(50%)を満たす。よって、DBサーバ100は、部分一致部分(テーブル31b,31c)の現スキャン進捗率の差の絶対値が、部分一致タプルに登録されたスキャン進捗率の差の絶対値以上であると判定する。   In this case, the absolute value (60%) of the difference in the current scan progress rate ≧ the absolute value (30%) of the difference in the scan progress rate in the partial match tuple is satisfied for the table 31b. For the table 31c, the absolute value (50%) of the difference in current scan progress rate ≧ the absolute value (50%) of the difference in scan progress rate in the partially matched tuple is satisfied. Therefore, the DB server 100 determines that the absolute value of the difference in the current scan progress rates of the partially matched portions (tables 31b and 31c) is greater than or equal to the absolute value of the difference in the scan progress rates registered in the partially matched tuple.

更に、新規部分(テーブル31d)のスキャン進捗率が100%に達した依頼先は、クラスタ20である。クラスタ20は、部分一致タプルにおけるオフロード選択フラグ“FALSE”により特定される実行継続先であるクエリ実行部140(DBサーバ100)に一致していない。このため、DBサーバ100は、時刻T62の段階では、クエリ実行部140およびクラスタ20の両方によるクエリ処理を継続させると判定し、各監視対象テーブルのテーブルスキャンの監視を継続する。この段階では、ネイティブおよびアクセラレータの何れの方が全ての監視対象処理を早く完了できるかを適切に判定できないからである。すなわち、この段階では、クエリ実行部140によるテーブル31dのスキャン(比較的大きな負荷の処理)が完了していないため、今後、クエリ実行部140によるテーブル31b,31cのスキャンに、過去の実績よりも時間がかかる可能性を否定できない。したがって、このような場合には、DBサーバ100は、両方のクエリ処理を継続させ、スキャン進捗率の監視を継続する。   Furthermore, the cluster 20 is the request destination for which the scan progress rate of the new part (table 31d) has reached 100%. The cluster 20 does not match the query execution unit 140 (DB server 100), which is the execution continuation destination specified by the offload selection flag “FALSE” in the partial match tuple. For this reason, at the stage of time T62, the DB server 100 determines that the query processing by both the query execution unit 140 and the cluster 20 is continued, and continues monitoring the table scan of each monitoring target table. This is because at this stage, it is impossible to appropriately determine which one of the native and the accelerator can complete all the monitoring target processes earlier. That is, at this stage, the query execution unit 140 has not completed scanning of the table 31d (relatively large load processing), so that the query execution unit 140 will scan the tables 31b and 31c in the future rather than past results. The possibility of taking time cannot be denied. Therefore, in such a case, the DB server 100 continues both query processes and continues to monitor the scan progress rate.

こうして、何れによるクエリ処理を停止させれば有利であるかを判定できない場合には、両方によるクエリ処理を継続し、監視を継続することで、適切なタイミングで、ネイティブおよびアクセラレータの何れかによるクエリ処理を停止させることができる。   In this way, if it is not possible to determine which query processing is advantageous, it is possible to continue query processing by both and continue monitoring so that queries by either native or accelerator can be performed at an appropriate timing. Processing can be stopped.

図19は、リソース解放のタイミングの例を示す図である。図19(A)は、アクセラレータ側のクエリの実行を停止させる場合を例示している。図19(B)は、ネイティブ側のクエリの実行を停止させる場合を例示している。   FIG. 19 is a diagram illustrating an example of resource release timing. FIG. 19A illustrates a case where execution of a query on the accelerator side is stopped. FIG. 19B illustrates a case where execution of a query on the native side is stopped.

図19(A)の例でいえば、時刻T71に、ネイティブおよびアクセラレータの両方がクエリの実行を開始する。そして、時刻T72に、アクセラレータ側のクエリの実行が停止される。更に、時刻T73に、ネイティブ側のクエリの実行が完了する。このように、ネイティブ側のクエリの実行が完了する時刻T73よりも前の時刻T72に、アクセラレータ側のクエリの実行が停止される。こうして、アクセラレータ側のクエリ処理に伴うリソースを、時刻T72において解放させることができる。特に、テーブルスキャンというクエリの初期段階に実行される処理を進捗の監視対象とすることで、アクセラレータ側のクエリの実行を初期段階で停止させることができ、比較的早い段階でリソースを解放させることができる。   In the example of FIG. 19A, both the native and the accelerator start executing a query at time T71. Then, at time T72, the execution of the query on the accelerator side is stopped. Further, at time T73, execution of the native-side query is completed. In this way, the execution of the accelerator-side query is stopped at time T72 before the time T73 when the execution of the native-side query is completed. In this way, resources associated with accelerator side query processing can be released at time T72. In particular, the processing executed at the initial stage of a query called table scan can be monitored for progress, so that the execution of queries on the accelerator side can be stopped at the initial stage, and resources can be released at a relatively early stage. Can do.

図19(B)の例でいえば、時刻T71aに、ネイティブおよびアクセラレータの両方がクエリの実行を開始する。そして、時刻T72aに、ネイティブ側のクエリの実行が停止される。更に、時刻T73aに、アクセラレータ側のクエリの実行が完了する。このように、アクセラレータ側のクエリの実行が完了する時刻T73aよりも前の時刻T72aに、ネイティブ側のクエリの実行が停止される。こうして、ネイティブ側のクエリ処理に伴うリソースを、時刻T72aにおいて解放させることができる。図19(A)の場合と同様に、テーブルスキャンを進捗の監視対象とすることで、ネイティブ側のクエリの実行を初期段階で停止させることができ、比較的早い段階でリソースを解放させることができる。   In the example of FIG. 19B, both the native and the accelerator start executing the query at time T71a. At time T72a, execution of the native-side query is stopped. Further, at time T73a, the execution of the query on the accelerator side is completed. As described above, the execution of the query on the native side is stopped at the time T72a before the time T73a at which the execution of the query on the accelerator side is completed. In this way, resources associated with native-side query processing can be released at time T72a. As in the case of FIG. 19A, by executing the table scan as the progress monitoring target, it is possible to stop the execution of the query on the native side at the initial stage and to release the resource at a relatively early stage. it can.

一方、DBサーバ100によるクエリ実行制御を行わない方法も考えられる。
図20は、リソース解放のタイミングの比較例を示す図である。図20では、ネイティブおよびアクセラレータのうち、何れか一方がクエリに含まれる全ての処理を完了した段階で、他方のクエリの実行を停止させる例である。図20(A)は、アクセラレータ側のクエリの実行を停止させる場合を示している。図20(B)は、ネイティブ側のクエリの実行を停止させる場合を示している。
On the other hand, a method in which the DB server 100 does not perform query execution control is also conceivable.
FIG. 20 is a diagram illustrating a comparative example of resource release timing. FIG. 20 shows an example in which execution of the other query is stopped when one of the native and accelerators completes all the processes included in the query. FIG. 20A shows a case where execution of the query on the accelerator side is stopped. FIG. 20B shows a case where execution of a query on the native side is stopped.

図20(A)の例でいえば、時刻T81に、ネイティブおよびアクセラレータの両方がクエリの実行を開始する。そして、時刻T82に、ネイティブ側のクエリの実行が完了する。このため、時刻T82に、未完了であるアクセラレータ側のクエリの実行が停止される。   In the example of FIG. 20A, both the native and the accelerator start executing the query at time T81. At time T82, the execution of the native query is completed. For this reason, at time T82, execution of the incomplete accelerator-side query is stopped.

図20(B)の例でいえば、時刻T81aに、ネイティブおよびアクセラレータの両方がクエリの実行を開始する。そして、時刻T82aに、アクセラレータ側のクエリの実行が完了する。このため、時刻T82aに、未完了であるネイティブ側のクエリの実行が停止される。   In the example of FIG. 20B, both the native and the accelerator start executing the query at time T81a. Then, at time T82a, execution of the query on the accelerator side is completed. For this reason, at time T82a, execution of the incomplete native-side query is stopped.

図20(A)および図20(B)の何れの例においても、一方のクエリの実行が完了するまで、他方のクエリの実行が継続される。このため、一方でクエリの実行が完了するまで、他方によるクエリ処理に伴うリソースの使用は継続され、リソース解放のタイミングが遅い。すなわち、図20(A)および図20(B)の例では、リソースを余計に使用する期間が長くなる。   In both the examples of FIGS. 20A and 20B, the execution of the other query is continued until the execution of the one query is completed. For this reason, until the execution of the query is completed on the one hand, the use of resources accompanying the query processing by the other is continued, and the resource release timing is delayed. That is, in the example of FIG. 20A and FIG. 20B, the period during which the resources are used excessively becomes longer.

一方、DBサーバ100のクエリ実行制御によれば、前述のように、ネイティブおよびアクセラレータのうちの一方でクエリの実行が完了するよりも前に、他方のクエリの実行を停止させることができる。したがって、一方でクエリの実行が完了した後に、他方のクエリの実行を停止させるよりも、他方のクエリの実行の停止を早めることができる。その結果、他方によるクエリ処理に伴うリソースを、より早く解放させることができる。そして、解放されたリソースを、別の処理に活用可能となる。また、クエリの実行の停止を早めることで、クエリ処理に伴う消費電力の低減を図れる。   On the other hand, according to the query execution control of the DB server 100, as described above, the execution of the other query can be stopped before the query execution of one of the native and accelerator is completed. Therefore, the execution of the other query can be stopped earlier than the execution of the other query is stopped after the execution of the query is completed. As a result, resources associated with the query processing by the other can be released more quickly. Then, the released resource can be used for another process. Further, by speeding up the stop of query execution, it is possible to reduce power consumption associated with query processing.

こうして、情報処理システムによるクエリに対する応答性能を高めながら、ネイティブおよびアクセラレータによるリソース利用の効率化を図れる。
なお、第1の実施の形態の情報処理は、処理部1bにプログラムを実行させることで実現できる。また、第2の実施の形態の情報処理は、プロセッサ101にプログラムを実行させることで実現できる。プログラムは、コンピュータ読み取り可能な記録媒体13に記録できる。
In this way, it is possible to improve the resource utilization efficiency by the native and accelerator while improving the response performance to the query by the information processing system.
The information processing according to the first embodiment can be realized by causing the processing unit 1b to execute a program. The information processing according to the second embodiment can be realized by causing the processor 101 to execute a program. The program can be recorded on a computer-readable recording medium 13.

例えば、プログラムを記録した記録媒体13を配布することで、プログラムを流通させることができる。また、プログラムを他のコンピュータに格納しておき、ネットワーク経由でプログラムを配布してもよい。コンピュータは、例えば、記録媒体13に記録されたプログラムまたは他のコンピュータから受信したプログラムを、RAM102やHDD103などの記憶装置に格納し(インストールし)、当該記憶装置からプログラムを読み込んで実行してもよい。   For example, the program can be distributed by distributing the recording medium 13 on which the program is recorded. Alternatively, the program may be stored in another computer and distributed via a network. For example, the computer stores (installs) a program recorded in the recording medium 13 or a program received from another computer in a storage device such as the RAM 102 or the HDD 103, and reads and executes the program from the storage device. Good.

以上の第1,第2の実施の形態を含む実施形態に関し、更に以下の付記を開示する。
(付記1) クエリに含まれる複数の処理による処理対象のデータを記憶する記憶部と、
前記記憶部に記憶された前記データに基づいて前記複数の処理のうち処理負荷が所定の負荷よりも大きいと推定される監視対象処理を決定し、第1の装置および第2の装置の両方に前記クエリの実行開始を指示し、前記第1の装置により実行される前記監視対象処理の第1の進捗情報を取得し、前記第2の装置により実行される前記監視対象処理の第2の進捗情報を取得し、前記第1の進捗情報および前記第2の進捗情報に基づいて、前記第1の装置および前記第2の装置のうちの1の装置に前記クエリの実行停止を指示する処理部と、
を有する情報処理装置。
Regarding the embodiments including the first and second embodiments, the following additional notes are disclosed.
(Supplementary Note 1) A storage unit that stores data to be processed by a plurality of processes included in a query;
Based on the data stored in the storage unit, a monitoring target process that is estimated to have a processing load larger than a predetermined load among the plurality of processes is determined, and both the first device and the second device are determined. The execution start of the query is instructed, the first progress information of the monitoring target process executed by the first device is acquired, and the second progress of the monitoring target process executed by the second device A processing unit for acquiring information and instructing one of the first device and the second device to stop executing the query based on the first progress information and the second progress information When,
An information processing apparatus.

(付記2) 前記処理部は、前記監視対象処理に対して、前記第1の装置および前記第2の装置のうちの前記実行停止を指示した方を識別可能な識別情報を前記記憶部に格納し、前記監視対象処理を含む他のクエリを受け付けると、前記記憶部に記憶された前記識別情報に基づいて、前記第1の装置および前記第2の装置の何れか一方に、前記他のクエリの実行開始を指示する、付記1記載の情報処理装置。   (Additional remark 2) The said process part stores the identification information which can identify the direction which instruct | indicated the said execution stop among the said 1st apparatus and the said 2nd apparatus with respect to the said monitoring object process in the said memory | storage part. When another query including the monitoring target process is received, the other query is sent to one of the first device and the second device based on the identification information stored in the storage unit. The information processing apparatus according to appendix 1, instructing the start of execution of.

(付記3) 前記処理部は、前記クエリに含まれる前記監視対象処理が前記他のクエリに含まれる複数の監視対象処理のうちの第1の部分に一致する場合、前記第1および前記第2の装置の両方に前記他のクエリの実行開始を指示し、前記第1および前記第2の装置それぞれの前記第1の部分に対する進捗と、前記複数の監視対象処理のうちの前記第1の部分とは異なる第2の部分に対する前記第1および前記第2の装置それぞれの進捗とに基づいて、前記第1および前記第2の装置のうちの1の装置に前記他のクエリの実行停止を指示する、付記2記載の情報処理装置。   (Supplementary Note 3) When the monitoring target process included in the query matches a first part of a plurality of monitoring target processes included in the other query, the processing unit includes the first and second Instructing both of the devices to start execution of the other query, the progress of the first portion of each of the first and second devices, and the first portion of the plurality of monitoring target processes Instructing one of the first and second devices to stop executing the other query based on the progress of each of the first and second devices with respect to a second part different from The information processing apparatus according to appendix 2.

(付記4) 前記処理部は、前記第1および前記第2の装置の両方により前記第1の部分の実行が完了すると、前記第1の装置により実行される前記第2の部分に対する第3の進捗情報と前記第2の装置により実行される前記第2の部分に対する第4の進捗情報とに基づいて、前記第1および前記第2の装置のうちの1の装置に前記他のクエリの実行停止を指示する、付記3記載の情報処理装置。   (Supplementary Note 4) When the execution of the first part is completed by both the first and second devices, the processing unit performs a third operation on the second part executed by the first device. Execution of the other query to one of the first and second devices based on progress information and fourth progress information for the second portion executed by the second device The information processing apparatus according to appendix 3, which instructs to stop.

(付記5) 前記処理部は、前記第1および前記第2の装置の両方または何れか一方により前記第2の部分の実行が完了すると、前記第1の装置により実行される前記第1の部分に対する第5の進捗情報と前記第2の装置により実行される前記第1の部分に対する第6の進捗情報と前記識別情報とに基づいて、前記第1および前記第2の装置のうちの1の装置に前記他のクエリの実行停止を指示する、付記3または4記載の情報処理装置。   (Supplementary Note 5) When the execution of the second part is completed by either or one of the first and second devices, the processing unit is executed by the first device. One of the first and second devices based on the fifth progress information for and the sixth progress information and the identification information for the first portion executed by the second device. The information processing apparatus according to attachment 3 or 4, wherein the apparatus instructs the apparatus to stop execution of the other query.

(付記6) 前記処理部は、前記複数の処理により用いられる複数のデータセットそれぞれの情報量に基づいて前記複数の処理それぞれの前記処理負荷を決定する、付記1乃至5の何れか1つに記載の情報処理装置。   (Supplementary Note 6) The processing unit may determine the processing load of each of the plurality of processes based on an information amount of each of the plurality of data sets used by the plurality of processes. The information processing apparatus described.

(付記7) 前記処理部は、前記複数のデータセットのうち、最大の情報量であるデータセットに対する処理を第1の監視対象処理と決定し、前記最大の情報量に基づいて第2の監視対象処理を決定する、付記6記載の情報処理装置。   (Additional remark 7) The said process part determines the process with respect to the data set which is the largest information amount among these data sets as a 1st monitoring object process, and performs 2nd monitoring based on the said largest information amount. The information processing apparatus according to attachment 6, wherein the target process is determined.

(付記8) 前記データセットは、関係データベースにおけるテーブルであり、
前記処理部は、前記テーブルの行数に基づいて前記情報量を取得する、
付記6または7記載の情報処理装置。
(Appendix 8) The data set is a table in a relational database,
The processing unit acquires the information amount based on the number of rows in the table.
The information processing apparatus according to appendix 6 or 7.

(付記9) 前記処理部は、前記クエリに含まれる前記複数の処理それぞれのうち、第1の処理よりも先に実行される第2の処理を前記監視対象処理と決定し、前記第1の処理を前記監視対象処理としない、付記1乃至8の何れか1つに記載の情報処理装置。   (Additional remark 9) The said process part determines the 2nd process performed prior to a 1st process among each of the said several processes contained in the said query as the said monitoring object process, The said 1st The information processing apparatus according to any one of appendices 1 to 8, wherein the process is not the monitoring target process.

(付記10) 前記クエリは、関係データベースにおけるテーブルに対する複数の処理を含み、
前記第2の処理は、前記テーブルに対するテーブルスキャンである、
付記9記載の情報処理装置。
(Supplementary Note 10) The query includes a plurality of processes for tables in a relational database,
The second process is a table scan for the table.
The information processing apparatus according to appendix 9.

(付記11) クエリに含まれる複数の処理による処理対象のデータに基づいて、前記複数の処理のうち処理負荷が所定の負荷よりも大きいと推定される監視対象処理を決定し、
第1の装置および第2の装置の両方に前記クエリの実行開始を指示し、
前記第1の装置により実行される前記監視対象処理の第1の進捗情報を取得し、前記第2の装置により実行される前記監視対象処理の第2の進捗情報を取得し、
前記第1の進捗情報および前記第2の進捗情報に基づいて、前記第1の装置および前記第2の装置のうちの1の装置に前記クエリの実行停止を指示する、
処理をコンピュータに実行させるプログラム。
(Additional remark 11) Based on the data of the process target by the some process contained in a query, the monitoring object process estimated that a process load is larger than predetermined | prescribed load among these processes is determined,
Instructing both the first device and the second device to start executing the query;
Obtaining first progress information of the monitoring target process executed by the first device; obtaining second progress information of the monitoring target process executed by the second device;
Instructing one of the first device and the second device to stop execution of the query based on the first progress information and the second progress information.
A program that causes a computer to execute processing.

(付記12) コンピュータが、
クエリに含まれる複数の処理による処理対象のデータに基づいて、前記複数の処理のうち処理負荷が所定の負荷よりも大きいと推定される監視対象処理を決定し、
第1の装置および第2の装置の両方に前記クエリの実行開始を指示し、
前記第1の装置により実行される前記監視対象処理の第1の進捗情報を取得し、前記第2の装置により実行される前記監視対象処理の第2の進捗情報を取得し、
前記第1の進捗情報および前記第2の進捗情報に基づいて、前記第1の装置および前記第2の装置のうちの1の装置に前記クエリの実行停止を指示する、
情報処理方法。
(Supplementary note 12)
Based on data to be processed by a plurality of processes included in the query, a monitoring target process that is estimated to have a processing load larger than a predetermined load among the plurality of processes is determined.
Instructing both the first device and the second device to start executing the query;
Obtaining first progress information of the monitoring target process executed by the first device; obtaining second progress information of the monitoring target process executed by the second device;
Instructing one of the first device and the second device to stop execution of the query based on the first progress information and the second progress information.
Information processing method.

1 情報処理装置
1a 記憶部
1b 処理部
2 第1の装置
3 第2の装置
4 端末装置
5 記憶装置
6 ネットワーク
D1 処理対象データ
Q1 クエリ
DESCRIPTION OF SYMBOLS 1 Information processing apparatus 1a Memory | storage part 1b Processing part 2 1st apparatus 3 2nd apparatus 4 Terminal device 5 Memory | storage device 6 Network D1 Process target data Q1 Query

Claims (7)

クエリに含まれる複数の処理による処理対象のデータを記憶する記憶部と、
前記記憶部に記憶された前記データに基づいて前記複数の処理のうち処理負荷が所定の負荷よりも大きいと推定される監視対象処理を決定し、第1の装置および第2の装置の両方に前記クエリの実行開始を指示し、前記第1の装置により実行される前記監視対象処理の第1の進捗情報を取得し、前記第2の装置により実行される前記監視対象処理の第2の進捗情報を取得し、前記第1の進捗情報および前記第2の進捗情報に基づいて、前記第1の装置および前記第2の装置のうちの1の装置に前記クエリの実行停止を指示する処理部と、
を有する情報処理装置。
A storage unit for storing data to be processed by a plurality of processes included in the query;
Based on the data stored in the storage unit, a monitoring target process that is estimated to have a processing load larger than a predetermined load among the plurality of processes is determined, and both the first device and the second device are determined. The execution start of the query is instructed, the first progress information of the monitoring target process executed by the first device is acquired, and the second progress of the monitoring target process executed by the second device A processing unit for acquiring information and instructing one of the first device and the second device to stop executing the query based on the first progress information and the second progress information When,
An information processing apparatus.
前記処理部は、前記監視対象処理に対して、前記第1の装置および前記第2の装置のうちの前記実行停止を指示した方を識別可能な識別情報を前記記憶部に格納し、前記監視対象処理を含む他のクエリを受け付けると、前記記憶部に記憶された前記識別情報に基づいて、前記第1の装置および前記第2の装置の何れか一方に、前記他のクエリの実行開始を指示する、請求項1記載の情報処理装置。   The processing unit stores, in the storage unit, identification information that can identify the one of the first device and the second device that has instructed the execution stop for the monitoring target process. When another query including the target process is received, based on the identification information stored in the storage unit, one of the first device and the second device starts executing the other query. The information processing apparatus according to claim 1, wherein an instruction is given. 前記処理部は、前記複数の処理により用いられる複数のデータセットそれぞれの情報量に基づいて前記複数の処理それぞれの前記処理負荷を決定する、請求項1または2記載の情報処理装置。   The information processing apparatus according to claim 1, wherein the processing unit determines the processing load of each of the plurality of processes based on an information amount of each of a plurality of data sets used by the plurality of processes. 前記処理部は、前記複数のデータセットのうち、最大の情報量であるデータセットに対する処理を第1の監視対象処理と決定し、前記最大の情報量に基づいて第2の監視対象処理を決定する、請求項3記載の情報処理装置。   The processing unit determines a process for a data set having the maximum information amount among the plurality of data sets as a first monitoring target process, and determines a second monitoring target process based on the maximum information amount. The information processing apparatus according to claim 3. 前記処理部は、前記クエリに含まれる前記複数の処理それぞれのうち、第1の処理よりも先に実行される第2の処理を前記監視対象処理と決定し、前記第1の処理を前記監視対象処理としない、請求項1乃至4の何れか1項に記載の情報処理装置。   The processing unit determines, as the monitoring target process, a second process that is executed before the first process among the plurality of processes included in the query, and the first process is the monitoring process The information processing apparatus according to claim 1, wherein the information processing apparatus is not a target process. クエリに含まれる複数の処理による処理対象のデータに基づいて、前記複数の処理のうち処理負荷が所定の負荷よりも大きいと推定される監視対象処理を決定し、
第1の装置および第2の装置の両方に前記クエリの実行開始を指示し、
前記第1の装置により実行される前記監視対象処理の第1の進捗情報を取得し、前記第2の装置により実行される前記監視対象処理の第2の進捗情報を取得し、
前記第1の進捗情報および前記第2の進捗情報に基づいて、前記第1の装置および前記第2の装置のうちの1の装置に前記クエリの実行停止を指示する、
処理をコンピュータに実行させるプログラム。
Based on data to be processed by a plurality of processes included in the query, a monitoring target process that is estimated to have a processing load larger than a predetermined load among the plurality of processes is determined.
Instructing both the first device and the second device to start executing the query;
Obtaining first progress information of the monitoring target process executed by the first device; obtaining second progress information of the monitoring target process executed by the second device;
Instructing one of the first device and the second device to stop execution of the query based on the first progress information and the second progress information.
A program that causes a computer to execute processing.
コンピュータが、
クエリに含まれる複数の処理による処理対象のデータに基づいて、前記複数の処理のうち処理負荷が所定の負荷よりも大きいと推定される監視対象処理を決定し、
第1の装置および第2の装置の両方に前記クエリの実行開始を指示し、
前記第1の装置により実行される前記監視対象処理の第1の進捗情報を取得し、前記第2の装置により実行される前記監視対象処理の第2の進捗情報を取得し、
前記第1の進捗情報および前記第2の進捗情報に基づいて、前記第1の装置および前記第2の装置のうちの1の装置に前記クエリの実行停止を指示する、
情報処理方法。
Computer
Based on data to be processed by a plurality of processes included in the query, a monitoring target process that is estimated to have a processing load larger than a predetermined load among the plurality of processes is determined.
Instructing both the first device and the second device to start executing the query;
Obtaining first progress information of the monitoring target process executed by the first device; obtaining second progress information of the monitoring target process executed by the second device;
Instructing one of the first device and the second device to stop execution of the query based on the first progress information and the second progress information.
Information processing method.
JP2017014518A 2017-01-30 2017-01-30 Information processing device, program and information processing method Pending JP2018124658A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2017014518A JP2018124658A (en) 2017-01-30 2017-01-30 Information processing device, program and information processing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2017014518A JP2018124658A (en) 2017-01-30 2017-01-30 Information processing device, program and information processing method

Publications (1)

Publication Number Publication Date
JP2018124658A true JP2018124658A (en) 2018-08-09

Family

ID=63111402

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2017014518A Pending JP2018124658A (en) 2017-01-30 2017-01-30 Information processing device, program and information processing method

Country Status (1)

Country Link
JP (1) JP2018124658A (en)

Similar Documents

Publication Publication Date Title
US10691722B2 (en) Consistent query execution for big data analytics in a hybrid database
US20160212206A1 (en) Deterministic database system and data transferring method thereof
US20150234896A1 (en) Adaptive distribution method for hash operations
US11475006B2 (en) Query and change propagation scheduling for heterogeneous database systems
US10152500B2 (en) Read mostly instances
JP4571609B2 (en) Resource allocation method, resource allocation program, and management computer
US10747777B2 (en) Computer system and transaction processing management method
US11860833B2 (en) Data redistribution method, apparatus, and system
US8510280B2 (en) System, method, and computer-readable medium for dynamic detection and management of data skew in parallel join operations
US9251227B2 (en) Intelligently provisioning cloud information services
WO2019109854A1 (en) Data processing method and device for distributed database, storage medium, and electronic device
JP7174377B2 (en) Database management system and anonymization processing method
US20230418811A1 (en) Transaction processing method and apparatus, computing device, and storage medium
TW201738781A (en) Method and device for joining tables
CN111581234A (en) RAC multi-node database query method, device and system
US11645281B1 (en) Caching query plans in database systems
US11216421B2 (en) Extensible streams for operations on external systems
US20180267831A1 (en) Information processing apparatus, stage-out processing method and recording medium recording job management program
US8832157B1 (en) System, method, and computer-readable medium that facilitates efficient processing of distinct counts on several columns in a parallel processing system
US11461274B2 (en) Processing streams on external data sources
JP2018124658A (en) Information processing device, program and information processing method
US20220035813A1 (en) Query optimization method and apparatus
CN114328466A (en) Data cold and hot storage method and device and electronic equipment
CN110168514B (en) Transaction processing method, device and equipment
CN111813761A (en) Database management method and device and computer storage medium