JP2000339140A - Database retrieval device and program recording medium - Google Patents

Database retrieval device and program recording medium

Info

Publication number
JP2000339140A
JP2000339140A JP11149161A JP14916199A JP2000339140A JP 2000339140 A JP2000339140 A JP 2000339140A JP 11149161 A JP11149161 A JP 11149161A JP 14916199 A JP14916199 A JP 14916199A JP 2000339140 A JP2000339140 A JP 2000339140A
Authority
JP
Japan
Prior art keywords
processing
sort
cpu
divisions
database search
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.)
Granted
Application number
JP11149161A
Other languages
Japanese (ja)
Other versions
JP3694193B2 (en
Inventor
Naotoshi Yasunaga
尚稔 安永
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 JP14916199A priority Critical patent/JP3694193B2/en
Publication of JP2000339140A publication Critical patent/JP2000339140A/en
Application granted granted Critical
Publication of JP3694193B2 publication Critical patent/JP3694193B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

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

Abstract

PROBLEM TO BE SOLVED: To realize a high speed processing by deciding the number of divisions on a memory resource used for a previous sorting processing from the processing content of the previous sorting processing and the processing content of a later sorting processing using the processing result. SOLUTION: A decision means 11 decides the number of divisions on a memory resource in a previous sorting processing so that the CPU use quantity of the previous sorting processing is reduced when the previous sorting processing is a CPU neck and a later sorting processing using the processing result of the sorting processing is an I/O neck at the time of analyzing a data base retrieval language. When the previous sorting processing is the I/O neck and the later sorting processing using the processing result of the sorting processing is the CPU neck, the number of divisions on the memory resource in the previous sorting processing is decided so that the CPU use quantity of the later sorting processing is reduced. The use of I/O and CPU can be balanced and a high speed processing can be executed.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、データベース検索
言語を処理するデータベース検索装置と、その装置の実
現に用いられるプログラムが格納されるプログラム記録
媒体とに関し、特に、高速処理を実現するデータベース
検索装置と、その装置の実現に用いられるプログラムが
格納されるプログラム記録媒体とに関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a database search device for processing a database search language and a program recording medium for storing a program used to realize the device, and more particularly to a database search device for realizing high-speed processing. And a program recording medium in which a program used for realizing the device is stored.

【0002】SQL文の処理では、二次記憶からのデー
タの読み込み、メモリ上でのデータの加工、中間結果の
二次記憶への退避を用いた複数の工程を経て、結果の抽
出が行われることになる。データベースを利用するデー
タ処理の高速化を図るためにも、このSQL文の処理に
要する時間の短縮を実現する技術を構築していく必要が
ある。
In the processing of an SQL statement, a result is extracted through a plurality of steps using data reading from a secondary storage, data processing on a memory, and saving intermediate results to a secondary storage. Will be. In order to speed up data processing using a database, it is necessary to build a technology for reducing the time required for processing the SQL statement.

【0003】[0003]

【従来の技術】SQL文の処理では、二次記憶からのデ
ータ(レコード)の読み込み、メモリ上でのデータの加
工、中間結果の二次記憶への退避を用いた複数の工程を
経て、結果の抽出が行われることになる。
2. Description of the Related Art In the processing of an SQL statement, the result is obtained through a plurality of steps using reading of data (record) from a secondary storage, processing of data on a memory, and saving of intermediate results to a secondary storage. Is extracted.

【0004】例えば、図21(a)に示すSQL文は、
表T1からカラムC1,C2のデータを読み込み、カラ
ムC1のデータの順番に従って整列させて出力せよとい
うものである。
For example, the SQL sentence shown in FIG.
The data of the columns C1 and C2 are read from the table T1, and are arranged and output according to the order of the data of the column C1.

【0005】このSQL文の処理手順は、図21(b)
に示すように、先ず最初の工程で、データベースから表
T1のデータを読み込んでソートにPUTし、その次の
工程で、ソートからデータをGETしてアプリケーショ
ンに返却するという2段階の工程を踏むことになる。
[0005] The processing procedure of this SQL sentence is shown in FIG.
As shown in (1), first, in the first step, the data of Table T1 is read from the database, PUT for sorting, and then, in the next step, GET the data from the sort and return it to the application. become.

【0006】また、図22(a)に示すSQL文は、表
T1からカラムC1,C2のデータ(例えば名前と住
所)を読み込むとともに、表T2からカラムC2のデー
タ(例えば電話番号)を読み込み、その読み込んだ表T
1のカラムC1,C2のデータに、その読み込んだ表T
2のカラムC2のデータを結合(T1.C1=T2.C
1(例えば名前の同じもの)というものを結合)させ
て、表T1のカラムC1のデータの順番に従って整列さ
せて出力せよというものである。
The SQL sentence shown in FIG. 22A reads data (eg, name and address) of columns C1 and C2 from table T1, and reads data (eg, telephone number) of column C2 from table T2. The loaded table T
In the data of the columns C1 and C2, the read table T
2 and the data of column C2 are combined (T1.C1 = T2.C
1 (e.g., those having the same name) are combined, and arranged and output according to the order of the data in column C1 of table T1.

【0007】このSQL文の処理手順は、図22(b)
に示すように、先ず最初の工程で、データベースから表
T1のデータを読み込んでソート1にPUTし、その次
の工程で、データベースから表T2のデータを読み込ん
でソート2にPUTし、その次の工程で、ソート1,2か
らデータをGETしJOINしてソート3にPUTし、
その次の工程で、ソート3からデータをGETしてアプ
リケーションに返却するという4段階の工程を踏むこと
になる。
The procedure for processing this SQL statement is shown in FIG.
As shown in (1), first, in the first step, the data of table T1 is read from the database and PUT is performed for sort 1, and in the next step, the data of table T2 is read from the database and PUT is performed for sort 2. In the process, GET and JOIN the data from sorts 1 and 2 and PUT to sort 3,
In the next process, a four-stage process of GETting the data from the sort 3 and returning it to the application is performed.

【0008】また、図23(a)に示すSQL文は、表
T1からカラムC1,C2のデータ(例えば支店名と売
上)を読み込むとともに、そのC2のデータ(例えば支
店名)でグルービングしつつそのC1のデータ(例えば
売上)の合計を求めて、それを表DT1として定義し、
その表DT1からカラムC1,C2のデータ(例えば支
店名と売上合計)を読み込むとともに、表T2からカラ
ムC2のデータ(例えば住所)を読み込み、その読み込
んだ表DT1のカラムC1,C2のデータに、その読み
込んだ表T2のカラムC2のデータを結合(DT1.C
2=T2.C1(例えば支店名の同じもの)というもの
を結合)させて出力せよというものである。
The SQL statement shown in FIG. 23A reads data (for example, branch name and sales) in columns C1 and C2 from table T1, and performs grooving with the data in C2 (for example, branch name). The total of the data (for example, sales) of C1 is obtained, and defined as a table DT1,
The data (for example, the branch name and the total sales) of the columns C1 and C2 are read from the table DT1, and the data (for example, the address) of the column C2 is read from the table T2, and the data of the columns C1 and C2 of the read table DT1 are added to the data. Combine the read data of column C2 of table T2 (DT1.C
2 = T2. C1 (for example, the same branch name) is combined and output.

【0009】このSQL文の処理手順は、図23(b)
に示すように、先ず最初の工程で、データベースから表
T1のデータを読み込んでワークにPUTし、その次の
工程で、ワークからデータをGETして集計処理を行っ
てソート1にPUTし、その次の工程で、データベース
から表T2のデータを読み込んでソート2にPUTし、
その次の工程で、ソート1,2からデータをGETしJO
INしてアプリケーションに返却するという4段階の工
程を踏むことになる。
The processing procedure of this SQL statement is shown in FIG.
As shown in (1), first, in the first step, the data of Table T1 is read from the database and put to the work, and in the next step, the data is GET from the work, the data is aggregated, and the result is put to the sort 1 and put to the sort 1. In the next step, the data in Table T2 is read from the database and put into Sort 2
In the next step, get data from sorts 1 and 2 and JO
This involves a four-step process of returning the application to the application.

【0010】このように、SQL文の処理では、二次記
憶からのデータの読み込み、メモリ上でのデータの加
工、中間結果の二次記憶への退避を用いた複数の工程を
経て、結果の抽出が行われることになるが、これらの各
工程では、先の工程で処理されたデータ(レコード)が
次の工程に引き継がれていくことになる。従って、SQ
L文の処理にソート処理が含まれる場合には、全件をソ
ート処理に入力してからでないと、その結果を用いる次
の工程に入れないという特性がある。
As described above, in the processing of an SQL statement, the result of reading the data from the secondary storage, processing the data on the memory, and saving the intermediate result to the secondary storage are processed through a plurality of steps. Extraction is performed, but in each of these steps, the data (record) processed in the previous step is carried over to the next step. Therefore, SQ
In the case where the processing of the L sentence includes a sorting process, there is a characteristic that the whole process must be input to the sorting process before the next process using the result can be performed.

【0011】従来技術では、この特性を考慮して、SQ
L文の処理にソート処理が含まれる場合には、図24に
示すように、ソート処理に使用するメモリの全領域にイ
ンデックスを張りつつ、データをソートしていく構成を
採って、その後、そのインデックスを使ってソートされ
たデータを読み出しつつ、その結果を用いる次の工程に
入るように処理していた。
In the prior art, considering this characteristic, SQ
In the case where the processing of the L sentence includes a sorting process, as shown in FIG. 24, a configuration is adopted in which data is sorted while an index is set in all areas of the memory used for the sorting process. While reading the data sorted using the index, processing was performed to enter the next step using the result.

【0012】[0012]

【発明が解決しようとする課題】しかしながら、このよ
うな従来技術に従っていると、最大限の処理性能を引き
出せないという問題点がある。
However, according to such a conventional technique, there is a problem that the maximum processing performance cannot be obtained.

【0013】すなわち、図25(a)に示すように、先
のソート処理の工程(ソート処理とそれと同時に走る処
理の工程)が、CPUよりもI/Oをより多く使用し、
後のソート処理の工程(ソート処理とそれと同時に走る
処理の工程)が、逆にI/OよりもCPUを多く使用す
るような場合、I/OとCPUの使用バランスが悪いこ
とで処理時間が長くかかってしまうという問題点があ
る。
That is, as shown in FIG. 25A, the previous sorting process (the sorting process and the process running at the same time) uses more I / O than the CPU,
On the other hand, if the later sorting process (the sorting process and the process running at the same time) uses more CPU than I / O, the processing time is reduced due to the poor use balance between I / O and CPU. There is a problem that it takes a long time.

【0014】そして、図25(b)に示すように、先の
ソート処理の工程(ソート処理とそれと同時に走る処理
の工程)が、I/OよりもCPUをより多く使用し、後
のソート処理の工程(ソート処理とそれと同時に走る処
理の工程)が、逆にCPUよりもI/Oを多く使用する
ような場合、I/OとCPUの使用バランスが悪いこと
で処理時間が長くかかってしまうという問題点がある。
As shown in FIG. 25 (b), the previous sorting process (the sorting process and the process running simultaneously) uses more CPU than the I / O and performs the later sorting process. (Steps of the sorting process and the process running at the same time) use more I / O than the CPU, the processing time is long because the balance between the I / O and the CPU is poor. There is a problem.

【0015】本発明はかかる事情に鑑みてなされたもの
であって、高速処理を実現する新たなデータベース検索
装置の提供と、その装置の実現に用いられるプログラム
が格納される新たなプログラム記録媒体の提供とを目的
とする。
The present invention has been made in view of such circumstances, and provides a new database search device for realizing high-speed processing and a new program recording medium for storing a program used for realizing the device. To provide.

【0016】[0016]

【課題を解決するための手段】図1に本発明の原理構成
を図示する。
FIG. 1 shows the principle configuration of the present invention.

【0017】図中、1は本発明を具備するデータベース
検索装置であって、データベース検索言語(SQL文)
を処理するもの、2はデータベース検索装置1の備える
定義ファイルであって、処理手順の作成に必要となる定
義情報(カラムの属性や表の格納構造やレコード件数や
データ分布など)を管理するもの、3はデータベースで
あって、データベース検索装置1の検索対象となるレコ
ードを管理するものである。
In FIG. 1, reference numeral 1 denotes a database search device equipped with the present invention, and a database search language (SQL sentence).
2 is a definition file provided in the database search device 1, which manages definition information (column attributes, table storage structure, number of records, data distribution, etc.) necessary for creating a processing procedure. Reference numeral 3 denotes a database for managing records to be searched by the database search device 1.

【0018】本発明のデータベース検索装置1は、処理
手順作成手段10と、決定手段11と、実行手段12
と、SQL制御手段13とを備え、そして、本発明のデ
ータベース検索装置1の備える定義ファイル2は、本発
明を実現するためにテーブル手段20を備える。
The database search device 1 of the present invention comprises a processing procedure creating means 10, a determining means 11, and an executing means 12
The definition file 2 included in the database search device 1 of the present invention includes a table means 20 for realizing the present invention.

【0019】この処理手順作成手段10は、データベー
ス検索言語を解析することで、どの表からアクセスする
といったスケジュールを決定することで処理手順を作成
する。
The processing procedure creating means 10 creates a processing procedure by analyzing a database search language and determining a schedule for accessing from which table.

【0020】決定手段11は、処理手順作成手段10に
展開されて、データベース検索言語を解析するときに、
先のソート処理の処理内容と、そのソート処理の処理結
果を使う後のソート処理の処理内容とから、先のソート
処理に使用するメモリ資源の分割数を決定する。
The deciding means 11 is developed in the processing procedure creating means 10 to analyze the database search language.
The number of divisions of the memory resource to be used for the previous sort process is determined from the process contents of the previous sort process and the process contents of the sort process after using the processing result of the sort process.

【0021】実行手段12は、処理手順作成手段10の
作成した処理手順に従ってデータベース検索言語を処理
するものであり、このとき、決定手段11の決定した分
割数に従ってメモリ資源を分割して、その分割メモリ資
源を単位にしてデータベース検索言語で指定されるソー
ト処理を実行する。
The execution means 12 processes the database search language in accordance with the processing procedure created by the processing procedure creation means 10. At this time, the execution means 12 divides the memory resources according to the number of divisions determined by the determination means 11, and The sort processing specified by the database search language is executed in units of memory resources.

【0022】SQL制御手段13は、アプリケーション
の発行するデータベース検索言語を受け取ると、処理手
順作成手段10を呼び出すことで処理手順を作成し、そ
れを指定して実行手段12を呼び出すことでデータベー
ス検索言語を処理する。
When the SQL control means 13 receives the database search language issued by the application, it creates a processing procedure by calling the processing procedure creation means 10 and calls the execution means 12 by designating the processing procedure. Process.

【0023】テーブル手段20は、先のソート処理の処
理内容となる可能性のあるものと、後のソート処理の処
理内容となる可能性のあるものとを検索キーとするマト
リックス構造に従って、メモリ資源の分割数を管理す
る。
The table means 20 stores the memory resources in accordance with a matrix structure in which a search key is a search key that may be a processing content of the first sort processing and a table that may be a processing content of the second sort processing. Manages the number of divisions.

【0024】ここで、本発明のデータベース検索装置1
の持つ機能は具体的にはプログラムで実現されるもので
あり、このプログラムは、フロッピィディスクなどに格
納されたり、サーバなどのディスクなどに格納され、そ
れらからデータベース検索装置1にインストールされて
メモリ上で動作することで、本発明を実現することにな
る。
Here, the database search device 1 of the present invention
The functions of the program are realized by a program. This program is stored in a floppy disk or the like, or is stored in a disk such as a server. The present invention is realized by operating in.

【0025】このように構成される本発明のデータベー
ス検索装置1では、決定手段11は、データベース検索
言語を解析するときに、先のソート処理がCPUネック
となっていて、そのソート処理の処理結果を使う後のソ
ート処理がI/Oネックとなっている場合には、先のソ
ート処理のCPU使用量が減ることになるようにと、先
のソート処理におけるメモリ資源の分割数を決定し、先
のソート処理がI/Oネックとなっていて、そのソート
処理の処理結果を使う後のソート処理がCPUネックと
なっている場合には、後のソート処理のCPU使用量が
減ることになるようにと、先のソート処理におけるメモ
リ資源の分割数を決定する。
In the database search apparatus 1 of the present invention configured as described above, when analyzing the database search language, the determination means 11 determines that the previous sort processing is a CPU bottleneck and the processing result of the sort processing is If the sort processing after using is an I / O bottleneck, the number of memory resource divisions in the previous sort processing is determined so that the CPU usage in the previous sort processing is reduced, If the previous sort process is an I / O bottleneck and the later sort process using the result of the sort process is a CPU bottleneck, the CPU usage of the later sort process is reduced. Thus, the number of divisions of the memory resource in the previous sorting process is determined.

【0026】ここで、先のソート処理の処理内容となる
可能性のあるものと、後のソート処理の処理内容となる
可能性のあるものとを検索キーとするマトリックス構造
に従って、そのような形態を示すメモリ資源の分割数を
管理するテーブル手段20が備えられるときには、決定
手段11は、このテーブル手段20を索引することで、
先のソート処理におけるメモリ資源の分割数を決定す
る。
Here, according to a matrix structure using search keys that may be the processing contents of the first sort processing and those that may be the processing contents of the second sort processing, such a form is used. When the table means 20 for managing the number of divisions of the memory resource is provided, the determining means 11 looks up the table means 20 so that
The number of divisions of the memory resource in the above sorting process is determined.

【0027】この決定処理を受けて、実行手段12は、
決定手段11により決定された分割数に従ってメモリ資
源を分割して、その分割メモリ資源を単位にしてデータ
ベース検索言語で指定されるソート処理を実行する。
In response to this determination processing, the execution means 12
The memory resource is divided according to the number of divisions determined by the determining means 11, and a sorting process specified by a database search language is executed in units of the divided memory resources.

【0028】図2に示すように、データベース検索言語
に、処理Aを施してデータ(レコード)をソートにPU
Tし、それに続けて、ソートからデータ(レコード)を
GETして処理Bを施すという処理を行うことが記述さ
れているとする。
As shown in FIG. 2, a process A is applied to a database search language to sort data (records) by PU.
Then, it is assumed that the description describes that a process of performing a process B by GETting data (records) from sorting after that is performed.

【0029】ここで、図中に示すように、メモリ資源の
分割数が小さいときには、処理AのCPUの使用量は大
きくなり、メモリ資源の分割数が大きいときには、処理
AのCPUの使用量は小さくなるとする。一方、メモリ
資源の分割数が小さいときには、処理BのCPUの使用
量は小さくなり、メモリ資源の分割数が大きいときに
は、処理BのCPUの使用量は大きくなるとする。
Here, as shown in the figure, when the division number of the memory resource is small, the CPU usage of the process A is large, and when the division number of the memory resource is large, the CPU usage of the process A is small. Let it be smaller. On the other hand, it is assumed that when the number of divisions of the memory resource is small, the CPU usage of the process B is small, and when the number of divisions of the memory resource is large, the usage of the CPU of the process B is large.

【0030】例えば、処理Aがデータベースからデータ
(レコード)を読み込んでくる処理である場合には、メ
モリ資源の分割数が小さいときには、大きなインデック
スを張らなくてはならず探索数が増えることでCPUの
使用量は大きくなる。逆に、メモリ資源の分割数が大き
いときには、小さなインデックスを張れば足りるのでC
PUの使用量は小さくなる。
For example, when the process A is a process of reading data (records) from a database, if the number of divisions of the memory resource is small, a large index must be provided and the number of searches increases, thereby increasing the number of searches. Use amount becomes large. Conversely, when the number of memory resource divisions is large, it is sufficient to set a small index.
The PU usage is reduced.

【0031】このとき、処理Aによりソートされたデー
タに対して処理を施す処理Bは、メモリ資源の分割数が
大きいときには、小さなインデックスでソートされたデ
ータの集合をマージソートしなければならず、CPUの
使用量は大きくなる。逆に、メモリ資源の分割数が小さ
いときには、大きなインデックスでソートされたデータ
の集合をマージソートすれば足りるので、CPUの使用
量は小さくなる。
At this time, in the process B for performing the process on the data sorted by the process A, when the number of divisions of the memory resource is large, a set of data sorted by a small index must be merge-sorted. CPU usage increases. Conversely, when the number of divisions of the memory resource is small, it is sufficient to merge-sort a set of data sorted by a large index, so that the CPU usage is reduced.

【0032】このメモリ資源の分割数と処理A,BのC
PU使用量との間に成立する関係を考慮して、図3の上
段に示すように、先のソート処理の工程(ソート処理と
それと同時に走る処理Aの工程)がI/Oネックとなっ
ていて、後のソート処理の工程(ソート処理とそれと同
時に走る処理Bの工程)がCPUネックとなっている場
合には、決定手段11は、先のソート処理におけるメモ
リ資源の分割数として小さな値を決定することで、図3
の下段に示すように、CPUネックとなっている後のソ
ート処理の工程のCPU使用量を減らし、これにより、
全体の処理時間の短縮を実現する。
The number of divisions of the memory resource and C of processes A and B
In consideration of the relationship established with the PU usage, as shown in the upper part of FIG. 3, the previous sorting process (the sorting process and the process A running at the same time) is an I / O bottleneck. If the subsequent sorting process (the sorting process and the process B running at the same time) is a CPU bottleneck, the determining means 11 sets a small value as the number of memory resource divisions in the preceding sorting process. By deciding, Figure 3
As shown in the lower part, the CPU usage in the sorting process after the CPU bottleneck is reduced, thereby
The overall processing time is reduced.

【0033】一方、図4の上段に示すように、先のソー
ト処理の工程(ソート処理とそれと同時に走る処理Aの
工程)がCPUネックとなっていて、後のソート処理の
工程(ソート処理とそれと同時に走る処理Bの工程)が
I/Oネックとなっている場合には、決定手段11は、
先のソート処理におけるメモリ資源の分割数として大き
な値を決定することで、図4の下段に示すように、CP
Uネックとなっている先のソート処理の工程のCPU使
用量を減らし、これにより、全体の処理時間の短縮を実
現する。
On the other hand, as shown in the upper part of FIG. 4, the previous sorting process (the sorting process and the process A running at the same time) is a CPU bottleneck, and the later sorting process (the sorting process and the If the process B (running at the same time) is an I / O bottleneck, the determining means 11
By determining a large value as the number of divisions of the memory resource in the previous sort processing, the CP shown in the lower part of FIG.
The amount of CPU used in the sorting process, which is a U-neck, is reduced, thereby shortening the overall processing time.

【0034】この処理時間の短縮について具体的に説明
するならば、「A IO」を処理Aの使用するI/O
量、「SP IO」をソートPUTの使用するI/O
量、「B IO」を処理Bの使用するI/O量、「SG
IO」をソートGETの使用するI/O量、「A CP
U」を処理Aの使用するCPU量、「SP CPU」を
ソートPUTの使用するCPU量、「B CPU」を処
理Bの使用するCPU量、「SG CPU」をソートG
ETの使用するCPU量、「MAX IO」を単位時間
当たりに処理できるI/O量、「MAX CPU」を単
位時間当たりに処理できるCPU量とするならば、先の
ソート処理の工程の入力時間と後のソート処理の工程の
出力時間とは、図5(a)/図6(a)に示すものとな
る。
The shortening of the processing time will be specifically described.
If you do, "A I / O used by process A for "IO"
Quantity, "SP I / O using sort PUT for "IO"
Quantity, "B “IO” is the I / O amount used by process B, “SG”
"IO" is the amount of I / O used by sort GET, "A CP
"U" is the amount of CPU used by process A, "SP" CPU "
CPU amount used by sort PUT, "B CPU
Amount of CPU used by the processing B, "SG Sort CPU G
CPU amount used by ET, "MAX IO ”in unit time
I / O amount that can be processed per unit, "MAX CPU ”
If the CPU amount can be processed per unit time,
The input time of the sorting process and the
The output time is as shown in FIG. 5 (a) / FIG. 6 (a).
You.

【0035】図3の上段に示すように、先のソート処理
の工程がI/Oネックとなっていて、後のソート処理の
工程がCPUネックとなっている場合には、この入力時
間と出力時間とは図5(b)に示すようになり、全体の
処理時間はこの合計となる。このとき、先のソート処理
におけるメモリ資源の分割数を調整することで、図3の
下段に示すように、ソートGET時のCPU量の一部
「X CPU」をソートPUTに移動させ、これによ
り、図5(c)に示すように、出力時間が短縮され改善
されることになる。
As shown in the upper part of FIG. 3, when the previous sorting process is an I / O bottleneck and the later sorting process is a CPU bottleneck, the input time and the output The time is as shown in FIG. 5B, and the total processing time is the sum of the times. At this time, by adjusting the number of divisions of the memory resource in the previous sort processing, as shown in the lower part of FIG. "CPU" is moved to the sort PUT, thereby shortening and improving the output time as shown in FIG. 5 (c).

【0036】一方、図4の上段に示すように、先のソー
ト処理の工程がCPUネックとなっていて、後のソート
処理の工程がI/Oネックとなっている場合には、この
入力時間と出力時間とは図6(b)に示すようになり、
全体の処理時間はこの合計となる。このとき、先のソー
ト処理におけるメモリ資源の分割数を調整することで、
図4の下段に示すように、ソートPUT時のCPU量の
一部「Y CPU」をソートGETに移動させ、これに
より、図6(c)に示すように、入力時間が短縮され改
善されることになる。
On the other hand, as shown in the upper part of FIG. 4, when the previous sorting process is a CPU bottleneck and the later sorting process is an I / O bottleneck, this input time And the output time are as shown in FIG.
The total processing time is this sum. At this time, by adjusting the number of divisions of the memory resources in the previous sort processing,
As shown in the lower part of FIG. 4, a part of the CPU amount at the time of the sort PUT “Y” "CPU" is moved to the sort GET, thereby shortening and improving the input time as shown in FIG. 6 (c).

【0037】このようにして、本発明のデータベース検
索装置1では、データベース検索言語を処理する構成を
採るときにあって、先のソート処理の処理内容と、その
ソート処理の処理結果を使う後のソート処理の処理内容
とから、先のソート処理に使用するメモリ資源の分割数
を決定し、それに従ってメモリ資源を分割して、その分
割メモリ資源を単位にしてデータベース検索言語で指定
されるソート処理を実行することで、I/OとCPUと
の使用バランスを図って高速処理を実現するのである。
As described above, in the database search apparatus 1 of the present invention, when adopting the configuration for processing the database search language, the processing contents of the previous sorting processing and the processing results after using the processing results of the sorting processing are used. The number of memory resources to be used for the preceding sort processing is determined from the sort processing contents, and the memory resources are divided accordingly, and the sort processing specified in the database search language in units of the divided memory resources By executing the above, high-speed processing is realized by balancing the use of the I / O and the CPU.

【0038】[0038]

【発明の実施の形態】以下、実施の形態に従って本発明
を詳細に説明する。
DESCRIPTION OF THE PREFERRED EMBODIMENTS Hereinafter, the present invention will be described in detail according to embodiments.

【0039】図7に、本発明を具備するデータベース検
索装置1の一実施例を図示する。図中、図1で説明した
ものと同じものについては同一の記号で示してある。
FIG. 7 shows an embodiment of the database search apparatus 1 provided with the present invention. In the figure, the same components as those described in FIG. 1 are denoted by the same reference numerals.

【0040】この実施例に従う本発明のデータベース検
索装置1は、処理手順制御表作成プログラム100と、
実行プログラム101と、実行プログラム101から呼
び出される複数の検索処理用部品102と、SQL制御
プログラム103とを備え、そして、定義ファイル2
は、本発明を実現するために新たに分割数決定テーブル
200を備える。
The database search device 1 of the present invention according to this embodiment includes a processing procedure control table creation program 100,
An execution program 101, a plurality of search processing components 102 called from the execution program 101, and an SQL control program 103 are provided.
Includes a division number determination table 200 to implement the present invention.

【0041】ここで、本発明のデータベース検索装置1
に展開されるプログラムは、フロッピィディスクや回線
などを介してインストールされることになる。
Here, the database search device 1 of the present invention
Will be installed via a floppy disk or a line.

【0042】図1で説明したように、本発明のデータベ
ース検索装置1では、SQL文で指定される先のソート
処理がCPUネックとなっていて、そのソート処理の処
理結果を使う後のソート処理がI/Oネックとなってい
る場合には、先のソート処理のCPU使用量が減ること
になるようにと、先のソート処理におけるメモリの分割
数を決定し、逆に、先のソート処理がI/Oネックとな
っていて、そのソート処理の処理結果を使う後のソート
処理がCPUネックとなっている場合には、後のソート
処理のCPU使用量が減ることになるようにと、先のソ
ート処理におけるメモリの分割数を決定して、その分割
数に従ってメモリを分割しソート処理を実行すること
で、全体の処理時間を短縮する構成を採っている。
As described with reference to FIG. 1, in the database search apparatus 1 of the present invention, the sort processing specified by the SQL statement is a CPU bottleneck, and the sort processing after using the processing result of the sort processing is performed. Is an I / O bottleneck, the number of memory divisions in the previous sort processing is determined so that the CPU usage in the previous sort processing is reduced. Is the I / O bottleneck, and the later sort process using the processing result of the sort process is the CPU bottleneck, so that the CPU usage of the later sort process is reduced. The number of divisions of the memory in the previous sort processing is determined, the memory is divided according to the number of divisions, and the sort processing is executed, thereby reducing the overall processing time.

【0043】本発明を実現すべく新たに定義ファイル2
に設ける分割数決定テーブル200は、このメモリの分
割数の決定に用いられるものである。
To implement the present invention, a new definition file 2
Is used for determining the number of divisions of the memory.

【0044】図8に、この分割数決定テーブル200の
一実施例を図示する。
FIG. 8 shows an embodiment of the division number determination table 200.

【0045】この実施例に従う分割数決定テーブル20
0は、先のソート処理と同時に走る処理(処理A)とな
る可能性のあるものと、後のソート処理と同時に走る処
理(処理B)となる可能性のあるものとを検索キーとす
るマトリックス構造に従って、先のソート処理における
メモリの分割数を管理する構成を採っている。
The division number determination table 20 according to this embodiment
0 is a matrix having search keys of a process that can be a process (process A) that runs simultaneously with the preceding sort process and a process that can be a process (process B) that runs simultaneously with the subsequent sort process. According to the structure, a configuration is employed in which the number of divisions of the memory in the previous sort processing is managed.

【0046】例えば、先のソート処理と同時に走る処理
AがJOIN処理であり、そのソート処理の処理結果を
使う後のソート処理と同時に走る処理BがGROUP
BYの集計処理である場合には、先のソート処理におけ
るメモリの分割数が“50”になるということを管理す
るのである。
For example, a process A running at the same time as the previous sorting process is a JOIN process, and a process B running at the same time as the sorting process after using the processing result of the sorting process is GROUP.
In the case of the BY totaling process, it manages that the number of divisions of the memory in the previous sorting process becomes “50”.

【0047】次に、ソート処理に用いるメモリの分割数
と、レコードの格納/取出に必要となる比較回数との関
係について説明する。
Next, the relationship between the number of divisions of the memory used for the sorting process and the number of comparisons required for storing / retrieving records will be described.

【0048】PUT時のソート処理は、メモリ上にイン
デックスを張ってソートしながら格納する。インデック
スを持つことにより、レコードは二分木検索が可能にな
る。このとき、1件のレコードを格納するために必要と
なる比較回数は、log2 (既に格納されているレコー
ド件数)である。
In the sort processing at the time of PUT, the data is sorted and stored in the memory on the memory. By having an index, a record can be searched in a binary tree. At this time, the number of comparisons required to store one record is log 2 (the number of records already stored).

【0049】従って、レコード件数をNとするならば、
メモリが分割されていない場合には、全てのレコードを
格納するために必要となる比較回数は、 ΣN log2 x≒∫N logxdx =(1/log2)×(NlogN−N) =Nlog2 N−N/log2 という式に従って、 N×(log2 N−1/log2) となる。
Therefore, if the number of records is N,
If the memory is not divided, the number of comparisons needed to store all records, Σ N log 2 x ≒ ∫ N logxdx = (1 / log2) × (NlogN-N) = Nlog 2 N according to the equation that -N / log2, it becomes N × (log 2 N-1 / log2).

【0050】この式から分かるように、レコード格納域
が大きくなれば大きくなる程、レコードの検索コストが
大きくなり、PUT時に必要とされるCPU量は大きく
なる。
As can be seen from this equation, the larger the record storage area, the higher the record search cost and the larger the CPU amount required at the time of PUT.

【0051】そこで、レコード格納域のサイズに上限を
設けて、これを超えるときには、新たなレコード格納域
を用いることで検索コストが大きくならないようにする
ことが考えられる。図9(a)に示すように、メモリを
k個に分割することでk個のレコード格納域を用意した
とする。1つのレコード格納域に格納されるレコード件
数は“N/k”である。
Therefore, it is conceivable that an upper limit is set for the size of the record storage area, and when the upper limit is exceeded, the search cost is not increased by using a new record storage area. As shown in FIG. 9A, it is assumed that k record storage areas are prepared by dividing the memory into k pieces. The number of records stored in one record storage area is “N / k”.

【0052】従って、1つのレコード格納域に、全ての
レコードを格納するために必要となる比較回数は、上述
の式から分かるように、 (N/k)×〔log2 (N/k)−(1/log
2)〕 となるので、k個の全レコード格納域に全てのレコード
を格納するために必要となる比較回数は、これをk倍し
た N×〔log2 (N/k)−(1/log2)〕 となる。
Therefore, the number of comparisons required to store all records in one record storage area is, as can be seen from the above formula, (N / k) × [log 2 (N / k) − (1 / log
2)], the number of comparisons required to store all records in all k record storage areas is k times the number N × [log 2 (N / k) − (1 / log 2 ) )].

【0053】一方、メモリが分割されていない場合に
は、GET時にマージソートする必要がないものの、メ
モリが分割されているときには、図9(b)に示すよう
に、GET時にマージソートする必要がある。
On the other hand, if the memory is not divided, it is not necessary to perform the merge sort at the time of GET, but if the memory is divided, as shown in FIG. 9B, it is necessary to perform the merge sort at the time of GET. is there.

【0054】この場合、レコード格納域がk個あるとき
に、1件のレコードを取り出すために必要となる比較回
数は“log2 k”であることから、全てのレコードを
取り出すために必要となる比較回数は、 N×log2 k となる。
In this case, when there are k record storage areas, the number of comparisons required to retrieve one record is “log 2 k”, so that it is necessary to retrieve all records. The number of comparisons is N × log 2 k.

【0055】このように、メモリをk個に分割する場合
に、PUT時に必要となるCPUコストは、 N×〔log2 (N/k)−(1/log2)〕×(キ
ー比較のコスト) となり、GET時に必要となるCPUコストは、 N×log2 k×(キー比較のコスト) となる。
As described above, when the memory is divided into k pieces, the CPU cost required at the time of PUT is N × [log 2 (N / k) − (1 / log 2)] × (key comparison cost) And the CPU cost required at the time of GET is N × log 2 k × (key comparison cost).

【0056】この2つのCPUコストの合計は、 N×〔log2 N−(1/log2)〕×(キー比較の
コスト) となることから分かるように、kに依存しない。従っ
て、ソート処理に用いるメモリを分割しても、全体のC
PUコストは増加することはない。
The sum of these two CPU costs does not depend on k, as can be seen from the equation: N × [log 2 N− (1 / log 2)] × (key comparison cost). Therefore, even if the memory used for the sorting process is divided, the entire C
PU costs do not increase.

【0057】しかしながら、ソート処理に用いるメモリ
を分割すると、図10に示すように、その分割数kが大
きいときには、PUT時のCPUコストが小さくなると
もに、GET時のCPUコストが大きくなる。一方、そ
の分割数kが小さいときには、PUT時のCPUコスト
が大きくなるとともに、GET時のCPUコストが小さ
くなる。
However, when the memory used for the sorting process is divided, as shown in FIG. 10, when the division number k is large, the CPU cost at the time of PUT is reduced and the CPU cost at the time of GET is increased. On the other hand, when the division number k is small, the CPU cost at the time of PUT increases and the CPU cost at the time of GET decreases.

【0058】これから、PUTのソート処理がI/Oネ
ックとなっていて、そのPUTのソート処理の処理結果
を使うGETのソート処理がCPUネックとなっている
ときには、PUTのソート処理に用いるメモリの分割数
kを小さくすることで、図3に示したように全体の処理
時間の短縮が実現でき、一方、PUTのソート処理がC
PUネックとなっていて、そのPUTのソート処理の処
理結果を使うGETのソート処理がI/Oネックとなっ
ているときには、PUTのソート処理に用いるメモリの
分割数kを大きくすることで、図4に示したように全体
の処理時間の短縮が実現できることになる。
From now on, when the sort processing of the PUT is an I / O bottleneck and the GET sort processing using the processing result of the PUT sort is a CPU bottleneck, the memory used for the PUT sort processing is By reducing the number k of divisions, the overall processing time can be shortened as shown in FIG.
When a PU neck is used and a GET sort process using the processing result of the PUT sort process is an I / O neck, the number k of divisions of the memory used for the PUT sort process is increased. As shown in FIG. 4, the overall processing time can be reduced.

【0059】本発明のデータベース検索装置1は、この
点に着目して、SQL文で指定される処理の高速化を実
現するものである。
Focusing on this point, the database search device 1 of the present invention realizes high-speed processing specified by an SQL statement.

【0060】図11に、本発明を実現するためにSQL
制御プログラム103が実行する処理フローの一実施
例、図12に、本発明を実現するために処理手順制御表
作成プログラム100が実行する処理フローの一実施
例、図13に、本発明を実現するために実行プログラム
101が実行する処理フローの一実施例を図示する。次
に、これらの処理フローに従って、本発明について詳細
に説明する。
FIG. 11 shows an example of the SQL for realizing the present invention.
One embodiment of the processing flow executed by the control program 103, FIG. 12 shows one embodiment of the processing flow executed by the processing procedure control table creation program 100 to realize the present invention, and FIG. 13 realizes the present invention. An embodiment of the processing flow executed by the execution program 101 for this purpose is shown in FIG. Next, the present invention will be described in detail according to these processing flows.

【0061】SQL制御プログラム103は、アプリケ
ーションがSQL文を発行すると、図11の処理フロー
に示すように、先ず最初に、ステップ1で、アプリケー
ションの発行するSQL文を受け取る。続いて、ステッ
プ2で、そのSQL文を指定して、処理手順制御表作成
プログラム100を呼び出すことで、処理手順制御表を
作成する。
When the application issues an SQL statement, the SQL control program 103 first receives the SQL statement issued by the application in step 1 as shown in the processing flow of FIG. Subsequently, in step 2, the SQL statement is specified, and the processing procedure control table creation program 100 is called to create a processing procedure control table.

【0062】続いて、ステップ3で、作成した処理手順
制御表を指定して実行プログラム101を呼び出すこと
で、実行プログラム101からSQL文の処理結果を受
け取る。続いて、ステップ4で、その処理結果をアプリ
ケーションに返却して、処理を終了する。
Subsequently, in step 3, the execution program 101 is called by designating the created processing procedure control table, and the processing result of the SQL statement is received from the execution program 101. Subsequently, in step 4, the processing result is returned to the application, and the processing ends.

【0063】このようにしてSQL制御プログラム10
3から呼び出されると、処理手順制御表作成プログラム
100は、図12の処理フローに示すように、先ず最初
に、ステップ1で、定義ファイル20に格納される表の
定義情報を参照しつつ、SQL制御プログラム103か
ら受け取るSQL文を構文解析し意味解析する。
Thus, the SQL control program 10
3, the processing procedure control table creation program 100 first executes the SQL while referring to the definition information of the table stored in the definition file 20 in step 1 as shown in the processing flow of FIG. The SQL statement received from the control program 103 is parsed and semantically analyzed.

【0064】続いて、ステップ2で、その解析結果を使
い、定義ファイル20に格納される表の最適化情報を参
照しつつ、SQL文の規定する処理手順を最適な形で決
定する。すなわち、図21(b)や図22(b)や図2
3(b)に示したような処理手順を決定するのである。
Subsequently, in step 2, the processing procedure defined by the SQL statement is determined in an optimal form using the analysis result and referring to the optimization information of the table stored in the definition file 20. That is, FIG. 21 (b), FIG. 22 (b), FIG.
The processing procedure as shown in FIG. 3B is determined.

【0065】続いて、ステップ3で、決定した処理手順
にソート処理があるのか否かを判断して、ソート処理が
あることを判断するときには、ステップ4に進んで、先
のソート処理と同時に走る処理(処理A)と、その処理
結果を使う後のソート処理と同時に走る処理(処理B)
との組み合わせを抽出する。
Subsequently, in step 3, it is determined whether or not the determined processing procedure includes a sort process. When it is determined that the sort process is performed, the process proceeds to step 4 and runs simultaneously with the previous sort process. Processing (processing A) and processing that runs simultaneously with the sorting processing after using the processing result (processing B)
Extract the combination with

【0066】続いて、ステップ5で、定義ファイル20
から分割数決定テーブル200を読み込み、ステップ4
で抽出した処理の組み合わせを検索キーにして、その分
割数テーブル200を索引することで、先のソート処理
におけるメモリの分割数を決定する。
Subsequently, in step 5, the definition file 20
Reads the division number determination table 200 from
By using the combination of the processes extracted in (1) as a search key and indexing the division number table 200, the number of divisions of the memory in the previous sorting process is determined.

【0067】続いて、ステップ6で、ステップ2で決定
した処理手順と、ステップ5で決定したメモリ分割数
(ソート処理に対応付けて決定したもの)とを記述する
処理手順制御表を作成する。一方、ステップ3で、ステ
ップ2で決定した処理手順にソート処理がないことを判
断するときには、その決定した処理手順のみを記述する
処理手順制御表を作成する。
Subsequently, in step 6, a processing procedure control table describing the processing procedure determined in step 2 and the number of memory partitions determined in step 5 (determined in association with the sorting process) is created. On the other hand, when it is determined in step 3 that the processing procedure determined in step 2 has no sort processing, a processing procedure control table describing only the determined processing procedure is created.

【0068】そして、続くステップ7で、その作成した
処理手順制御表をSQL制御プログラム103に渡し
て、処理を終了する。
Then, in the following step 7, the created processing procedure control table is passed to the SQL control program 103, and the processing is terminated.

【0069】このようにして、処理手順制御表作成プロ
グラム100は、SQL制御プログラム103から呼び
出されると、SQL文の規定する処理手順を決定すると
ともに、その処理手順に含まれるソート処理に対応付け
てメモリ分割数を決定する。そして、それらを記述する
処理手順制御表を作成して、それをSQL制御プログラ
ム103に渡すように処理するのである。
As described above, when called from the SQL control program 103, the processing procedure control table creation program 100 determines the processing procedure defined by the SQL statement and associates it with the sort processing included in the processing procedure. Determine the number of memory partitions. Then, a processing procedure control table that describes them is created, and is processed so as to be passed to the SQL control program 103.

【0070】従来技術では、SQL文の規定する処理手
順のみを決定して、それをSQL制御プログラム103
に渡していたのに対して、本発明を実現する処理手順制
御表作成プログラム100では、その処理手順に含まれ
るソート処理に対応付けてメモリ分割数を決定して、そ
れをSQL制御プログラム103に渡していくように処
理している。
In the prior art, only the processing procedure defined by the SQL statement is determined, and this is determined by the SQL control program 103.
In contrast, the processing procedure control table creation program 100 that implements the present invention determines the number of memory divisions in association with the sort processing included in the processing procedure, and sends it to the SQL control program 103. It is processed to be passed.

【0071】このメモリ分割数の決定処理は、上述した
ように、図8に示したようなテーブル構造を持つ分割数
決定テーブル200を索引することで行われる。
As described above, this memory division number determination processing is performed by indexing the division number determination table 200 having a table structure as shown in FIG.

【0072】例えば、SQL制御プログラム103から
図21(a)に示したSQL文を受け取るときには、先
のソート処理(PUT側)と同時に走る処理がデータベ
ースからのレコード読込処理であり、その処理結果を使
う後のソート処理(GET側)と同時に走る処理がアプ
リケーションへの返却であることから、先のソート処理
(PUT側)におけるメモリ分割数として“30”を決
定する。
For example, when the SQL statement shown in FIG. 21A is received from the SQL control program 103, the process that runs simultaneously with the previous sort process (PUT side) is a record read process from the database, and the process result is read. Since the process running at the same time as the sort process (GET side) after use is return to the application, “30” is determined as the number of memory divisions in the previous sort process (PUT side).

【0073】これは、データベースからのレコードの読
込処理では、I/Oを多く使いCPUはほとんど使わな
いのに対して、アプリケーションへの返却処理では、I
/OもCPUもほとんど使用しない。これから、CPU
はどちらも同じ程度空いてるので、どちらかと言えば、
メモリの分割数を小さくしてCPUの使用をPUT側に
持っていくことで、I/Oと同時にCPUを使用してい
くようにする点に、その理由がある。
This is because the process of reading records from the database uses a lot of I / O and hardly uses the CPU, whereas the process of returning to the application uses I / O.
Uses neither / O nor CPU. From now on, CPU
Are both equally open, so if anything,
The reason is that the CPU is used at the same time as I / O by reducing the number of memory divisions and bringing the use of the CPU to the PUT side.

【0074】また、SQL制御プログラム103から図
22(a)に示したSQL文を受け取るときには、先の
ソート1,2処理(PUT側)と同時に走る処理がデー
タベースからのレコード読込処理であり、その処理結果
を使う後のソート3処理(GET側)と同時に走る処理
がJOIN処理であることから、先のソート1処理(P
UT側)におけるメモリ分割数として“1”を決定する
とともに、先のソート2処理(PUT側)におけるメモ
リ分割数として“1”を決定する。
When the SQL statement shown in FIG. 22A is received from the SQL control program 103, the process that runs simultaneously with the previous sort 1 and 2 processes (PUT side) is the process of reading records from the database. Since the process that runs simultaneously with the sort 3 process (GET side) after using the process result is the JOIN process, the sort 1 process (P
“1” is determined as the number of memory divisions in the UT side), and “1” is determined as the number of memory divisions in the previous sort 2 processing (PUT side).

【0075】これは、データベースからのレコード読込
処理では、I/Oを多く使いCPUはほとんど使わない
のに対して、JOIN処理では、CPUを多く使いI/
Oはほとんど使わない。これから、PUT側ではI/O
ネックになる可能性が高く、GET側ではCPUネック
になる可能性が高いので、メモリの分割数を小さくする
ことで、積極的にCPUの使用をPUT側に持っていく
ことに、その理由がある。
This is because the process of reading records from a database uses a lot of I / O and uses little CPU, whereas the JOIN process uses a lot of CPU and uses I / O.
O is rarely used. From now on, I / O on PUT side
There is a high likelihood of becoming a bottleneck, and the GET side is likely to become a CPU bottleneck. The reason for this is to reduce the number of memory divisions and actively use the CPU to the PUT side. is there.

【0076】そして、先のソート3処理(PUT側)と
同時に走る処理がJOIN処理であり、その処理結果を
使う後のソート処理(GET側)と同時に走る処理がア
プリケーションへの返却であることから、先のソート3
処理(PUT側)におけるメモリ分割数として“70”
を決定する。
The process that runs simultaneously with the previous sort 3 process (PUT side) is the JOIN process, and the process that runs at the same time as the sort process (GET side) using the processing result is return to the application. , Sort 3 ahead
“70” as the memory division number in the processing (PUT side)
To determine.

【0077】これは、JOIN処理では、CPUを多く
使いI/Oはほとんど使わないのに対して、アプリケー
ションへの返却処理では、I/OもCPUもほとんど使
用しない。これから、PUT側はCPUネックになる可
能性が高いのに対して、GET側はI/Oネックになる
のかどうか分からないので、どちらかと言えば、メモリ
の分割数を大きくしてCPUの使用をGET側に持って
いくことに、その理由がある。
This is because the JOIN process uses a lot of CPU and uses little I / O, whereas the return process to the application uses little I / O and CPU. From now on, the PUT side is likely to be a CPU bottleneck, while the GET side is not sure whether it will be an I / O bottleneck. There is a reason to take it to the GET side.

【0078】また、SQL制御プログラム103から図
23(a)に示したSQL文を受け取るときには、先の
ソート1処理(PUT側)と同時に走る処理がGROU
BYの集計処理であり、その処理結果を使う後のソー
ト処理(GET側)と同時に走る処理がJOIN処理で
あることから、先のソート1処理(PUT側)における
メモリ分割数として“50”を決定する。
Also, from the SQL control program 103
When receiving the SQL statement shown in FIG.
GROU is a process that runs simultaneously with the sort 1 process (PUT side)
P This is the BY totaling process, and the source
The process that runs at the same time as the
Because of this, in the previous sort 1 processing (PUT side)
"50" is determined as the memory division number.

【0079】これは、GROUP BYの集計処理もJ
OIN処理も、CPUを多く使いI/Oはほとんど使わ
ない。これから、PUT側もGET側もCPUネックに
なる可能性が高いので、メモリの分割数として平均的な
値を用いることで、PUT側とGET側で平均的にCP
Uを使用させるようにしていくことに、その理由があ
る。
This is a GROUP BY counting process is also J
OIN processing also uses a lot of CPU and uses little I / O. From now on, there is a high possibility that both the PUT side and the GET side become CPU bottlenecks. Therefore, by using an average value as the number of divisions of the memory, the PUT side and the GET side can average the CPs.
There is a reason for using U.

【0080】そして、先のソート2処理(PUT側)と
同時に走る処理がデータベースからのレコードの読込処
理であり、その処理結果を使う後のソート処理(GET
側)と同時に走る処理がJOIN処理であることから、
先のソート2処理(PUT側)におけるメモリ分割数と
して“1”を決定する。
The process that runs simultaneously with the previous sort 2 process (PUT side) is the process of reading records from the database, and the subsequent sort process (GET
Side) Since the process running at the same time is the JOIN process,
“1” is determined as the memory division number in the sort 2 processing (PUT side).

【0081】これは、データベースからのレコード読込
処理では、I/Oを多く使いCPUはほとんど使わない
のに対して、JOIN処理では、CPUを多く使いI/
Oはほとんど使わない。これから、PUT側ではI/O
ネックになる可能性が高く、GET側ではCPUネック
になる可能性が高いので、メモリの分割数を小さくする
ことで、積極的にCPUの使用をPUT側に持っていく
ことに、その理由がある。
This is because the process of reading records from the database uses a lot of I / O and uses little CPU, whereas the JOIN process uses a lot of CPU and uses I / O.
O is rarely used. From now on, I / O on PUT side
There is a high likelihood of becoming a bottleneck, and the GET side is likely to become a CPU bottleneck. The reason for this is to reduce the number of memory divisions and actively use the CPU to the PUT side. is there.

【0082】図12の処理フローに従って、処理手順制
御表作成プログラム100により処理手順制御表が作成
され、図11の処理フローに従って、SQL制御プログ
ラム103によりその処理手順制御表を指定して呼び出
されると、実行プログラム101は、図13の処理フロ
ーに示すように、先ず最初に、ステップ1で、SQL制
御プログラム103から処理手順制御表を受け取る。
A processing procedure control table is created by the processing procedure control table creation program 100 in accordance with the processing flow of FIG. 12, and is called by specifying the processing procedure control table by the SQL control program 103 in accordance with the processing flow of FIG. First, as shown in the processing flow of FIG. 13, the execution program 101 first receives a processing procedure control table from the SQL control program 103 in step 1.

【0083】続いて、ステップ2で、その受け取った処
理手順制御表の指定する処理手順から、順番に従って処
理手順を1つ選択し、続くステップ3で、全ての処理手
順の選択を終了したのか否かを判断して、全ての処理手
順の選択終了を判断するときには、ステップ4に進ん
で、これから説明する処理に得られた処理結果をSQL
制御プログラム103に渡して、処理を終了する。
Subsequently, in step 2, one of the processing procedures specified in the received processing procedure control table is selected in accordance with the order, and in step 3, whether or not all the processing procedures have been selected is determined. When it is determined that all of the processing procedures have been selected, the process proceeds to step 4 where the processing result obtained in the processing to be described hereinafter is expressed in SQL.
The processing is passed to the control program 103 and the processing ends.

【0084】一方、ステップ3で、全ての処理手順の選
択を終了していないことを判断するとき、すなわち、ス
テップ2で処理手順を選択できたことを判断するときに
は、ステップ5に進んで、その選択した処理手順がソー
ト処理であるのか否かを判断する。
On the other hand, when it is determined in step 3 that the selection of all the processing procedures has not been completed, that is, when it is determined in step 2 that the processing procedure has been selected, the process proceeds to step 5, and It is determined whether or not the selected processing procedure is a sort processing.

【0085】この判断処理により、ソート処理であるこ
とを判断するときには、ステップ6に進んで、処理手順
制御表で指定するメモリ分割数を特定して、その特定し
たメモリ分割数に従ってソート処理に用いるメモリを分
割しつつ、対応する検索処理用部品102を呼び出して
いくことでソート処理を実行してから、ステップ2に戻
っていく。
When it is determined by this determination that the process is a sort process, the process proceeds to step 6, where the number of memory divisions specified in the processing procedure control table is specified, and is used for the sort processing according to the specified number of memory divisions. Sorting is performed by calling the corresponding search processing component 102 while dividing the memory, and then the process returns to step 2.

【0086】一方、ステップ5で、選択した処理手順が
ソート処理でないことを判断するときには、ステップ7
に進んで、対応する検索処理用部品102を呼び出して
いくことで指定される処理を実行してから、ステップ2
に戻っていく。
On the other hand, when it is determined in step 5 that the selected processing procedure is not the sort processing, step 7
To execute the processing designated by calling the corresponding search processing component 102, and then execute step 2
Go back to

【0087】このようにして、実行プログラム101
は、処理手順制御表作成プログラム100の作成した処
理手順制御表で指定されるメモリ分割数に従って、ソー
ト処理に用いるメモリを分割して、その分割されたメモ
リを使ってソート処理を実行していくことで、全体の処
理時間の短縮を図っていくのである。
In this way, the execution program 101
Divides the memory used for the sorting process according to the number of memory divisions specified in the processing procedure control table created by the processing procedure control table creation program 100, and executes the sorting process using the divided memory. In this way, the overall processing time is reduced.

【0088】図14ないし図17に従って、この実行処
理について具体的に説明するならば、レコードをソート
すべくPUTしていくときには、図14(a)に示すよ
うに、分割したメモリのサイズに合わせてインデックス
を作成しつつ、レコードをレコード格納域に格納(ソー
ト順序はインデックスにより保証されている)してい
く。
If this execution process is specifically described with reference to FIGS. 14 to 17, when PUT is performed to sort the records, as shown in FIG. While creating an index, records are stored in a record storage area (sort order is guaranteed by the index).

【0089】この格納処理によりレコード格納域が満杯
になるときには、図14(b)に示すように、レコード
格納域に格納されたレコードをレコード退避域に退避す
る。このとき、レコードをソートの順番に入れ換えるこ
とでインデックスは不要になる。
When the record storage area becomes full by this storage processing, the records stored in the record storage area are saved in the record save area as shown in FIG. At this time, the index is not required by replacing the records in the sort order.

【0090】この後、図14(c)に示すように、再
び、レコード格納域のサイズに合わせてインデックスを
作成しつつ、レコードをメモリに格納し、レコード格納
域が満杯になるときには、図15(a)に示すように、
レコード格納域に格納されたレコードを新たなレコード
退避域に退避していく。そして、この処理を繰り返して
いくことで、メモリが満杯になるときには、図15
(b)に示すように、二次記憶にレコードを退避してい
く。
Thereafter, as shown in FIG. 14C, the records are stored in the memory while the index is created again according to the size of the record storage area, and when the record storage area becomes full, FIG. As shown in (a),
Records stored in the record storage area are saved in a new record save area. By repeating this process, when the memory becomes full, FIG.
As shown in (b), records are saved in the secondary storage.

【0091】一方、ソートされたレコードをGETする
ときには、退避された単位で先頭から読み出してマージ
ソートしていくことになるが、レコード格納域が満杯に
なっていないときには、図16(a)に示すように、イ
ンデックスから読み出すだけでよい。
On the other hand, when a GET is performed on the sorted records, the records are read from the beginning in the saved unit and are merge-sorted. When the record storage area is not full, FIG. As shown, it is only necessary to read from the index.

【0092】そして、メモリだけ使用していて二次記憶
を使用していないときには、図16(b)に示すよう
に、メモリ上に展開されるレコード格納域/レコード退
避域に格納されるレコードをマージソートしていくこと
になる。更に、二次記憶を使用しているときには、図1
7に示すように、それも含めた形でマージソートしてい
くことになる。なお、メモリに二次記憶から読み出して
いく領域が残されていない場合には、レコード格納域に
格納されるレコードを二次記憶に退避させることで、そ
の領域を確保することになる。
When only the memory is used and the secondary storage is not used, the records stored in the record storage area / record save area developed on the memory are stored as shown in FIG. Merge sort will be performed. Furthermore, when secondary storage is used, FIG.
As shown in FIG. 7, merging and sorting are performed in a form including that. If an area to be read from the secondary storage is not left in the memory, the area stored in the record storage area is secured by saving the record to the secondary storage.

【0093】このようにして、実行プログラム101
は、処理手順制御表作成プログラム100の作成した処
理手順制御表で指定されるメモリ分割数に従って、ソー
ト処理に用いるメモリを分割して、その分割されたメモ
リを使ってソート処理を実行していくことで、全体の処
理時間の短縮を図っていくのである。
Thus, the execution program 101
Divides the memory used for the sorting process according to the number of memory divisions specified in the processing procedure control table created by the processing procedure control table creation program 100, and executes the sorting process using the divided memory. In this way, the overall processing time is reduced.

【0094】図8に示した分割数決定テーブル200で
は、マトリックス構造に従ってメモリ分割数を管理する
構成を採ったが、各処理毎のCPU及びI/Oの使用量
を定性的に管理する図18(a)に示すような分割数決
定テーブル200を用意したり、各処理毎のCPU及び
I/Oの使用量を定量的に管理する図18(b)に示す
ような分割数決定テーブル200を用意して、処理手順
制御表作成プログラム100が、このテーブルデータを
使ってプログラム処理的にメモリ分割数を決定するとい
う方法を採ることも可能である。ここで、図18(b)
に示すような分割数決定テーブル200を用意する場
合、レコード数やデータ分布などを変数とする関数を使
って、CPU及びI/Oの使用量を定量的に管理する構
成を採ることも可能である。
The division number determination table 200 shown in FIG. 8 employs a configuration in which the number of memory divisions is managed in accordance with the matrix structure. However, the qualitative management of CPU and I / O usage for each process is shown in FIG. A division number determination table 200 as shown in FIG. 18B for preparing a division number determination table 200 as shown in FIG. 18A and quantitatively managing the amounts of CPU and I / O used for each process is shown in FIG. It is also possible to adopt a method in which the processing procedure control table creation program 100 prepares and determines the number of memory divisions programmatically using this table data. Here, FIG.
When the number-of-divisions determination table 200 shown in FIG. 1 is prepared, it is possible to adopt a configuration in which the CPU and I / O usages are quantitatively managed using a function having variables such as the number of records and data distribution. is there.

【0095】このような分割数決定テーブル200が用
意されるときには、処理手順制御表作成プログラム10
0は、先のソート処理と同時に走る処理と、その処理結
果を使う後のソート処理と同時に走る処理との組み合わ
せを抽出すると、例えば図19及び図20に示す処理フ
ローに従って、先のソート処理におけるメモリ分割数を
決定することになる。
When such a division number determination table 200 is prepared, the processing procedure control table creation program 10
0 extracts a combination of a process running at the same time as the previous sorting process and a process running at the same time as the sorting process using the processing result. For example, according to the process flow shown in FIGS. The number of memory divisions will be determined.

【0096】すなわち、処理手順制御表作成プログラム
100は、先のソート処理と同時に走る処理と、その処
理結果を使う後のソート処理と同時に走る処理との組み
合わせを抽出すると、図19及び図20の処理フローに
示すように、先ず最初に、ステップ1で、分割数決定テ
ーブル200を索引することで、先のソート処理と同時
に走る処理のテーブルデータを取得し、続くステップ2
で、分割数決定テーブル200を索引することで、後の
ソート処理と同時に走る処理のテーブルデータを取得す
る。
That is, the processing procedure control table creation program 100 extracts the combination of the processing that runs at the same time as the previous sorting processing and the processing that runs at the same time as the sorting processing after using the processing result. As shown in the processing flow, first, in step 1, by indexing the division number determination table 200, table data of a process running at the same time as the previous sorting process is obtained, and then in step 2
Then, by indexing the division number determination table 200, table data of a process that runs simultaneously with the subsequent sorting process is obtained.

【0097】続いて、ステップ3で、その取得したテー
ブルデータに従って、先のソート処理がI/Oネック
で、後のソート処理がCPUネックとなる可能性が高い
のか否かを判断して、その可能性が高いことを判断する
ときには、ステップ4に進んで、先のソート処理におけ
るメモリ分割数として小さな値を決定することで、先の
ソート処理のCPU量を増加させ、後のソート処理のC
PU量を減少させるように設定する。
Then, in step 3, it is determined whether or not there is a high possibility that the previous sort process is an I / O bottleneck and the later sort process is a CPU bottleneck according to the obtained table data. When it is determined that there is a high possibility, the process proceeds to step 4, where a small value is determined as the number of memory divisions in the previous sort processing, so that the CPU amount of the previous sort processing is increased and C
It is set to reduce the PU amount.

【0098】一方、ステップ3で、先のソート処理がI
/Oネックで、後のソート処理がCPUネックとなる可
能性が高くないことを判断するときには、ステップ5に
進んで、先のソート処理がCPUネックで、後のソート
処理がI/Oネックとなる可能性が高いのか否かを判断
して、その可能性が高いことを判断するときには、ステ
ップ6に進んで、先のソート処理におけるメモリ分割数
として大きな値を決定することで、先のソート処理のC
PU量を減少させ、後のソート処理のCPU量を増加さ
せるように設定する。
On the other hand, in step 3, the previous sort
If it is determined that there is no high possibility that the later sort process will be a CPU bottleneck due to the / O bottleneck, the process proceeds to step 5, where the previous sort process is a CPU bottleneck and the later sort process is an I / O bottleneck. When it is determined whether or not the possibility is high, and when it is determined that the possibility is high, the process proceeds to step 6, where a large value is determined as the number of memory divisions in the previous sort processing, whereby the previous sort is performed. Processing C
The setting is made so that the PU amount is reduced and the CPU amount for the later sorting process is increased.

【0099】一方、ステップ5で、先のソート処理がC
PUネックで、後のソート処理がI/Oネックとなる可
能性が高くないことを判断するときには、ステップ7に
進んで、先のソート処理がI/Oを多く使用するのか否
かを判断して、多く使用することを判断するときには、
ステップ8に進んで、先のソート処理におけるメモリ分
割数として小さめの値を決定することで、先のソート処
理のCPU量を増加させるように設定する。
On the other hand, in step 5, the previous sort
When it is determined that there is not a high possibility that the later sort process becomes an I / O neck due to the PU neck, the process proceeds to step 7 to determine whether or not the previous sort process uses a lot of I / O. When you decide to use a lot,
Proceeding to step 8, a smaller value is determined as the number of memory divisions in the previous sort processing, so that the CPU amount for the previous sort processing is set to be increased.

【0100】一方、ステップ7で、先のソート処理がI
/Oを多く使用しないことを判断するときには、ステッ
プ9に進んで、先のソート処理がCPUを多く使用する
のか否かを判断して、多く使用することを判断するとき
には、ステップ10に進んで、先のソート処理における
メモリ分割数として大きめの値を設定することで、先の
ソート処理のCPU量を減少させるように設定する。
On the other hand, in step 7, the previous sorting
When it is determined that a large amount of / O is not used, the process proceeds to step 9, where it is determined whether or not the preceding sorting process uses a large amount of CPU. When it is determined that a large amount of / O is used, the process proceeds to step 10. By setting a large value as the number of memory divisions in the previous sort processing, the CPU amount for the previous sort processing is set to be reduced.

【0101】一方、ステップ9で、先のソート処理がC
PUを多く使用しないことを判断するときには、ステッ
プ11に進んで、後のソート処理がI/Oを多く使用す
るのか否かを判断して、多く使用することを判断すると
きには、ステップ12に進んで、先のソート処理におけ
るメモリ分割数として大きめの値を設定することで、後
のソート処理のCPU量を増加させるように設定する。
On the other hand, at step 9, the previous sorting
When it is determined that the PU is not used much, the process proceeds to step 11, and it is determined whether or not the subsequent sorting process uses a large amount of I / O. When it is determined that the PU is used a lot, the process proceeds to step 12. Then, by setting a larger value as the number of memory divisions in the previous sort process, the CPU amount for the later sort process is set to be increased.

【0102】一方、ステップ11で、後のソート処理が
I/Oを多く使用しないことを判断するときには、ステ
ップ13に進んで、後のソート処理がCPUを多く使用
するのか否かを判断して、多く使用することを判断する
ときには、ステップ14に進んで、先のソート処理にお
けるメモリ分割数として小さめの値を設定することで、
後のソート処理のCPU量を減少させるように設定す
る。
On the other hand, if it is determined in step 11 that the subsequent sorting process does not use a lot of I / O, the process proceeds to step 13 to determine whether or not the subsequent sorting process uses a lot of CPU. When it is determined that the memory is to be used a lot, the process proceeds to step 14, where a smaller value is set as the number of memory divisions in the previous sort processing,
The setting is made so as to reduce the CPU amount for the later sorting process.

【0103】一方、ステップ13で、後のソート処理が
CPUを多く使用しないことを判断するときには、ステ
ップ15に進んで、先のソート処理におけるメモリ分割
数として中間の値を設定する。
On the other hand, if it is determined in step 13 that the subsequent sorting process does not use a lot of CPU, the process proceeds to step 15 and an intermediate value is set as the number of memory divisions in the preceding sorting process.

【0104】このようにして、各処理毎のCPU及びI
/Oの使用量を定性的に管理する図18(a)に示すよ
うな分割数決定テーブル200を用意したり、各処理毎
のCPU及びI/Oの使用量を定量的に管理する図18
(b)に示すような分割数決定テーブル200を用意し
て、処理手順制御表作成プログラム100が、このテー
ブルデータを使ってメモリ分割数を決定するという方法
を採ることもできるのである。
In this way, the CPU and I
FIG. 18 (a) for qualitatively managing the amount of I / O used is prepared, and the CPU and I / O used for each process are quantitatively managed.
It is also possible to adopt a method in which a division number determination table 200 as shown in (b) is prepared, and the processing procedure control table creation program 100 determines the memory division number using this table data.

【0105】これまで説明していなかったが、本発明
は、並列化に適した方式となっている。
Although not described so far, the present invention is a system suitable for parallelization.

【0106】それは、PUTのフェーズで、レコード全
体を複数に分割してソートするという構成を採っている
ことから、それ自身が並列化に適する構成となっている
からである。
This is because, in the PUT phase, the whole record is divided into a plurality of parts and sorted, so that the structure itself is suitable for parallelization.

【0107】そして、満杯になったレコード格納域に対
しては、ソートされた順にレコードを退避させてやれ
ば、その退避させたレコードについてはインデックスが
不要となるので、そのレコード格納域をソート処理に再
利用できる構成となっているからである。
If records are evacuated in the full record storage area in the order in which they were sorted, no index is required for the evacuated records. This is because it is configured to be reusable.

【0108】これにより、インデックス領域を削減でき
ることになるという他に、退避されたレコードがソート
された順番となっているので、二次記憶上や通信処理
で、そのままの形式で処理できるという特徴がある。例
えば、マージソート処理においては、先頭のレコードか
ら順番に処理していけばよいことになり、通信処理や二
次記憶からの読出処理を効率的に行うことができる。
As a result, in addition to the fact that the index area can be reduced, the saved records are sorted in the order in which they are sorted, so that they can be processed in the same format on secondary storage or in communication processing. is there. For example, in the merge sort process, it is only necessary to process the records in order from the first record, and the communication process and the process of reading from the secondary storage can be performed efficiently.

【0109】並列化する場合に、各プロセッサが本発明
を実現すべく実行する処理は、上述した単一構成のプロ
セッサが本発明を実現すべく実行する処理と基本的に変
わる所はない。ただ、各プロセッサのマージソートした
ものを全プロセッサでマージソートする必要があるとい
う点が加わるだけである。
In the case of parallel processing, the processing executed by each processor to implement the present invention is basically the same as the processing executed by the above-described single-structure processor to implement the present invention. The only difference is that the merge-sorted data of each processor needs to be merge-sorted by all processors.

【0110】このマージソートにあたって、各プロセッ
サが他のプロセッサのメモリを参照できないという構成
になっているときには、通信処理が加わることになる
が、上述した理由から、退避されたレコードをそのまま
通信していけばよいので、この通信処理も容易に達成で
きるものである。
In the merge sort, if each processor cannot access the memory of another processor, a communication process is added. However, for the above-described reason, the saved record is communicated as it is. Since it is only necessary to go, this communication processing can be easily achieved.

【0111】[0111]

【発明の効果】以上説明したように、本発明では、デー
タベース検索言語を処理する構成を採るときにあって、
先のソート処理の処理内容と、そのソート処理の処理結
果を使う後のソート処理の処理内容とから、先のソート
処理に使用するメモリ資源の分割数を決定し、それに従
ってメモリ資源を分割して、その分割メモリ資源を単位
にしてデータベース検索言語で指定されるソート処理を
実行することで、I/OとCPUとの使用バランスを図
ることができるようになり、これにより、高速処理を実
現できるようになる。
As described above, in the present invention, when adopting a configuration for processing a database search language,
The number of divisions of the memory resources used for the sort processing is determined from the contents of the previous sort processing and the contents of the sort processing after using the processing result of the sort processing, and the memory resources are divided accordingly. By executing the sort processing specified by the database search language in units of the divided memory resources, the use balance between the I / O and the CPU can be achieved, thereby realizing high-speed processing. become able to.

【図面の簡単な説明】[Brief description of the drawings]

【図1】本発明の原理構成図である。FIG. 1 is a principle configuration diagram of the present invention.

【図2】本発明の説明図である。FIG. 2 is an explanatory diagram of the present invention.

【図3】本発明の説明図である。FIG. 3 is an explanatory diagram of the present invention.

【図4】本発明の説明図である。FIG. 4 is an explanatory diagram of the present invention.

【図5】本発明の説明図である。FIG. 5 is an explanatory diagram of the present invention.

【図6】本発明の説明図である。FIG. 6 is an explanatory diagram of the present invention.

【図7】本発明の一実施例である。FIG. 7 is an embodiment of the present invention.

【図8】分割数決定テーブルの一実施例である。FIG. 8 is an example of a division number determination table.

【図9】レコードの格納/取出に必要となる比較回数の
説明図である。
FIG. 9 is an explanatory diagram of the number of comparisons required for storing / retrieving a record.

【図10】メモリ分割数とCPUコストとの間の関係の
説明図である。
FIG. 10 is an explanatory diagram of a relationship between a memory division number and a CPU cost.

【図11】SQL制御プログラムの処理フローである。FIG. 11 is a processing flow of an SQL control program.

【図12】処理手順制御表作成プログラムの処理フロー
である。
FIG. 12 is a processing flow of a processing procedure control table creation program.

【図13】実行プログラムの処理フローである。FIG. 13 is a processing flow of an execution program.

【図14】本発明の説明図である。FIG. 14 is an explanatory diagram of the present invention.

【図15】本発明の説明図である。FIG. 15 is an explanatory diagram of the present invention.

【図16】本発明の説明図である。FIG. 16 is an explanatory diagram of the present invention.

【図17】本発明の説明図である。FIG. 17 is an explanatory diagram of the present invention.

【図18】分割数決定テーブルの他の実施例である。FIG. 18 is another example of the division number determination table.

【図19】処理手順制御表作成プログラムの処理フロー
である。
FIG. 19 is a processing flow of a processing procedure control table creation program.

【図20】処理手順制御表作成プログラムの処理フロー
である。
FIG. 20 is a processing flow of a processing procedure control table creation program.

【図21】SQL文の処理手順の説明図である。FIG. 21 is an explanatory diagram of a processing procedure of an SQL sentence.

【図22】SQL文の処理手順の説明図である。FIG. 22 is an explanatory diagram of a processing procedure of an SQL sentence.

【図23】SQL文の処理手順の説明図である。FIG. 23 is an explanatory diagram of a processing procedure of an SQL sentence.

【図24】従来技術の説明図である。FIG. 24 is an explanatory diagram of a conventional technique.

【図25】従来技術の説明図である。FIG. 25 is an explanatory diagram of a conventional technique.

【符号の説明】[Explanation of symbols]

1 データベース検索装置 2 定義ファイル 3 データベース 10 処理手順作成手段 11 決定手段 12 実行手段 13 SQL制御手段 20 テーブル手段 DESCRIPTION OF SYMBOLS 1 Database search apparatus 2 Definition file 3 Database 10 Processing procedure creation means 11 Decision means 12 Execution means 13 SQL control means 20 Table means

Claims (5)

【特許請求の範囲】[Claims] 【請求項1】 データベース検索言語を処理するデータ
ベース検索装置において、 データベース検索言語を解析するときに、先のソート処
理の処理内容と、そのソート処理の処理結果を使う後の
ソート処理の処理内容とから、先のソート処理に使用す
るメモリ資源の分割数を決定する決定手段と、 上記決定手段の決定する分割数に従ってメモリ資源を分
割して、その分割メモリ資源を単位にしてデータベース
検索言語で指定されるソート処理を実行する実行手段と
を備えることを、 特徴とするデータベース検索装置。
In a database search device that processes a database search language, when analyzing a database search language, the processing contents of a previous sort processing and the processing contents of a sort processing after using a processing result of the sort processing are described. Determining means for determining the number of divisions of memory resources to be used for the sort processing, and dividing the memory resources according to the number of divisions determined by the determining means, and specifying the divided memory resources as a unit in a database search language. Executing means for executing a sorting process to be performed.
【請求項2】 請求項1記載のデータベース検索装置に
おいて、 決定手段は、2つのソート処理がCPUを多く使用する
のかI/Oを多く使用するのかに応じて、メモリ資源の
分割数を決定することを、 特徴とするデータベース検索装置。
2. The database search device according to claim 1, wherein the determination unit determines the number of divisions of the memory resource according to whether the two sort processes use a lot of CPU or I / O. A database search device characterized by the following.
【請求項3】 請求項2記載のデータベース検索装置に
おいて、 決定手段は、先のソート処理がCPUネックとなってい
て、後のソート処理がI/Oネックとなっている場合に
は、先のソート処理のCPU使用量が減ることになるよ
うにとメモリ資源の分割数を決定し、先のソート処理が
I/Oネックとなっていて、後のソート処理がCPUネ
ックとなっている場合には、後のソート処理のCPU使
用量が減ることになるようにとメモリ資源の分割数を決
定することを、 特徴とするデータベース検索装置。
3. The database search device according to claim 2, wherein the determining means determines whether the first sort process is a CPU bottleneck and the second sort process is an I / O bottleneck. The number of divisions of the memory resources is determined so that the CPU usage of the sort processing is reduced. If the previous sort processing is an I / O bottleneck and the later sort processing is a CPU bottleneck, A database search device characterized in that the number of divisions of memory resources is determined so that the amount of CPU used in later sorting processing is reduced.
【請求項4】 請求項1記載のデータベース検索装置に
おいて、 先のソート処理の処理内容となる可能性のあるものと、
後のソート処理の処理内容となる可能性のあるものとを
検索キーとするマトリックス構造に従って、メモリ資源
の分割数を管理するテーブル手段を備え、 決定手段は、上記テーブル手段を索引することでメモリ
資源の分割数を決定することを、 特徴とするデータベース検索装置。
4. The database search apparatus according to claim 1, wherein the database search apparatus has a possibility that the contents of the sort processing may be performed.
A table unit for managing the number of divisions of the memory resource in accordance with a matrix structure using a search key that may be the processing content of the later sorting process; A database search device characterized by determining the number of resource divisions.
【請求項5】 データベース検索言語を処理するデータ
ベース検索装置の実現に用いられるプログラムが格納さ
れるプログラム記録媒体であって、 データベース検索言語を解析するときに、先のソート処
理の処理内容と、そのソート処理の処理結果を使う後の
ソート処理の処理内容とから、先のソート処理に使用す
るメモリ資源の分割数を決定する決定処理と、 上記決定処理の決定する分割数に従ってメモリ資源を分
割して、その分割メモリ資源を単位にしてデータベース
検索言語で指定されるソート処理を実行する実行処理と
をコンピュータに実行させるプログラムが格納されるこ
とを、 特徴とするプログラム記録媒体。
5. A program recording medium for storing a program used for realizing a database search device for processing a database search language, wherein when analyzing the database search language, the processing contents of the above-mentioned sort processing, From the processing contents of the sort processing after using the processing result of the sort processing, a determination processing for determining the number of divisions of the memory resources to be used for the preceding sort processing, and dividing the memory resources according to the number of divisions determined by the above determination processing A program for causing a computer to execute an execution process of executing a sort process specified by a database search language in units of the divided memory resources.
JP14916199A 1999-05-28 1999-05-28 Database search apparatus and program recording medium Expired - Lifetime JP3694193B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP14916199A JP3694193B2 (en) 1999-05-28 1999-05-28 Database search apparatus and program recording medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP14916199A JP3694193B2 (en) 1999-05-28 1999-05-28 Database search apparatus and program recording medium

Publications (2)

Publication Number Publication Date
JP2000339140A true JP2000339140A (en) 2000-12-08
JP3694193B2 JP3694193B2 (en) 2005-09-14

Family

ID=15469135

Family Applications (1)

Application Number Title Priority Date Filing Date
JP14916199A Expired - Lifetime JP3694193B2 (en) 1999-05-28 1999-05-28 Database search apparatus and program recording medium

Country Status (1)

Country Link
JP (1) JP3694193B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013152512A (en) * 2012-01-24 2013-08-08 Mitsubishi Electric Corp Information processing device, information processing method and program
JP2015102887A (en) * 2013-11-21 2015-06-04 日本電気株式会社 Data processing system, data processing method, and program

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013152512A (en) * 2012-01-24 2013-08-08 Mitsubishi Electric Corp Information processing device, information processing method and program
JP2015102887A (en) * 2013-11-21 2015-06-04 日本電気株式会社 Data processing system, data processing method, and program

Also Published As

Publication number Publication date
JP3694193B2 (en) 2005-09-14

Similar Documents

Publication Publication Date Title
Marcu et al. Spark versus flink: Understanding performance in big data analytics frameworks
US7734615B2 (en) Performance data for query optimization of database partitions
JP5298117B2 (en) Data merging in distributed computing
US7610263B2 (en) Reusing intermediate workflow results in successive workflow runs
US8046354B2 (en) Method and apparatus for re-evaluating execution strategy for a database query
US20170083573A1 (en) Multi-query optimization
US7567952B2 (en) Optimizing a computer database query that fetches n rows
US8738645B1 (en) Parallel processing framework
US7792819B2 (en) Priority reduction for fast partitions during query execution
US20070250517A1 (en) Method and Apparatus for Autonomically Maintaining Latent Auxiliary Database Structures for Use in Executing Database Queries
JPH06214843A (en) Data base management system and processing method for inquiry
CN112015741A (en) Method and device for storing massive data in different databases and tables
CN109885642B (en) Hierarchical storage method and device for full-text retrieval
CN109977175B (en) Data configuration query method and device
US20020049747A1 (en) Method for integrating and accessing of heterogeneous data sources
US11803550B2 (en) Workload-aware column imprints
Gates et al. Apache Pig's Optimizer.
CN111078705A (en) Spark platform based data index establishing method and data query method
US6269359B1 (en) Relational data base system and method for rapidly realizing a query to a database
US8229946B1 (en) Business rules application parallel processing system
US8280869B1 (en) Sharing intermediate results
CN113625967B (en) Data storage method, data query method and server
CN110321388A (en) A kind of quicksort querying method and system based on Greenplum
JP2000339140A (en) Database retrieval device and program recording medium
CN111159213A (en) Data query method, device, system and storage medium

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20040324

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20050610

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20050621

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20050623

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20080701

Year of fee payment: 3

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090701

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100701

Year of fee payment: 5