JPH10326216A - Data base management system and inquiry processing method - Google Patents

Data base management system and inquiry processing method

Info

Publication number
JPH10326216A
JPH10326216A JP10174404A JP17440498A JPH10326216A JP H10326216 A JPH10326216 A JP H10326216A JP 10174404 A JP10174404 A JP 10174404A JP 17440498 A JP17440498 A JP 17440498A JP H10326216 A JPH10326216 A JP H10326216A
Authority
JP
Japan
Prior art keywords
node
processing
nodes
data
database
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
JP10174404A
Other languages
Japanese (ja)
Other versions
JP3732655B2 (en
Inventor
Masashi Tsuchida
正士 土田
Yukio Nakano
幸生 中野
Nobuo Kawamura
信男 河村
Kazuyoshi Negishi
和義 根岸
Shunichi Torii
俊一 鳥居
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hitachi Ltd
Original Assignee
Hitachi Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP17440498A priority Critical patent/JP3732655B2/en
Publication of JPH10326216A publication Critical patent/JPH10326216A/en
Application granted granted Critical
Publication of JP3732655B2 publication Critical patent/JP3732655B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

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

Abstract

PROBLEM TO BE SOLVED: To accelerate an inquiring process by providing a 2nd node which performs a data base operating process as to sent-out data and outputs the result and equipping this 2nd node with a halfway result storage means which temporarily stores a halfway result of the data base operating process. SOLUTION: This system has 1st nodes which take stored data out and sends them out at extraction requests, the 2nd node which performs the data base operating process as to the data sent out of the 1st nodes and outputs the result at an inputted data base operation request. This 2nd node is equipped with a halfway result storage means which temporarily stores a halfway result of the data base operating process. In this system, a decision means equally allocates the distribution of extracted information to coupled nodes 94 to 96 to the respective coupled nodes 94 to 96 according to the predicted amounts of extracted information at determined distribution nodes 90 to 93.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、デ−タベ−ス処理装置
に関し、特に、リレ−ショナルデ−タベ−ス管理システ
ムに適した問合せの並列処理に好適な問合せ処理方法に
関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a database processing apparatus, and more particularly to a query processing method suitable for parallel processing of queries suitable for a relational database management system.

【0002】[0002]

【従来の技術】デ−タベ−ス管理システム(以下DBM
Sと略記)、特に、リレ−ショナルDBMSは、非手続
き的な言語で表現された問合せを処理し、内部処理手順
を決定し、内部処理手順に従って実行する。このデータ
ベース言語としては、SQLが用いられる(Database L
anguage SQL ISO 9075:1989)。従来の問合せ処理の主な
方法には、予め設定した規則に基づいて単一の内部処理
手順を決定するものと、各種統計情報を用いて選定され
た複数の候補処理手順から、コスト評価により、最適と
思われるものを決定するものとがある。前者は、処理手
順作成のための負荷は小さいけれども、一律に設定され
た規則の妥当性に問題があり、選ばれた内部処理手順の
最適性にも問題がある。後者は、各種統計情報の管理
し、複数の候補処理手順の作成し、それらのコスト評価
のための負荷を算出して最適な処理手順を与える。上記
両者の組合せ技術としては、例えば、Satoh,K.,et.al."
Localand Global Optimization Mechanisms for Relati
onal Database", Proc. VLDB,1985.がある。該従来技術
では、問い合わせの条件からデータ量を推定して処理手
順を決めている。
2. Description of the Related Art A database management system (hereinafter referred to as DBM)
S), in particular, a relational DBMS processes a query expressed in a non-procedural language, determines an internal processing procedure, and executes it according to the internal processing procedure. SQL is used as this database language (Database L
anguage SQL ISO 9075: 1989). The main method of the conventional query processing is to determine a single internal processing procedure based on a preset rule, and from a plurality of candidate processing procedures selected using various statistical information, by cost evaluation, Some determine what seems optimal. In the former, although the load for creating the processing procedure is small, there is a problem in the validity of uniformly set rules, and also in the optimumness of the selected internal processing procedure. The latter manages various kinds of statistical information, creates a plurality of candidate processing procedures, calculates a load for cost evaluation thereof, and gives an optimal processing procedure. For example, Satoh, K., et.al. "
Localand Global Optimization Mechanisms for Relati
onal Database ", Proc. VLDB, 1985. In the related art, a processing procedure is determined by estimating a data amount from a query condition.

【0003】また、多くのDBMSは、問合せ解析処理
と問合せ実行処理との2フェーズの処理を経て、問合せ
処理が実現される。ホスト言語(COBOL、PL/I
等)に問合せ言語を組み込む場合、当アプリケ−ション
プログラム実行前に予め問合せを問合せ解析処理し、実
行形式である1つの内部処理手順を作成している。この
問合せ表現では、多くの場合、検索条件式にはホスト言
語の変数が記述される。この変数に定数が代入されるの
は、既に問合せ解析処理された結果の内部処理手順の実
行時、すなわち、問合せ実行時である。この場合の問題
点としては、変数に代入される値に従って複数の最適な
処理手順が考えられることである。この問題を解決する
ために、問合せ実行処理時に複数の処理手順を作成して
おき、問合せ実行時に変数に代入された値に従って処理
手順を選択するものがある。コードの技術に関するもの
としては、特開平1−194028号公報、および、Gr
aefe,G.,et.al."Dynamic Query Evaluation Plans", Pr
oc. ACM-SIGMOD, 1989.に記載されている技術がある。
In many DBMSs, query processing is realized through two-phase processing of query analysis processing and query execution processing. Host languages (COBOL, PL / I
When the query language is incorporated into the application program, the query is analyzed beforehand by executing the application program, and one internal processing procedure, which is an execution format, is created. In this query expression, in many cases, variables in the host language are described in the search condition expression. The constant is assigned to this variable when the internal processing procedure resulting from the query analysis processing is executed, that is, when the query is executed. The problem in this case is that a plurality of optimal processing procedures can be considered according to the values assigned to the variables. In order to solve this problem, there is a method in which a plurality of processing procedures are created at the time of query execution processing, and the processing procedure is selected according to a value assigned to a variable at the time of query execution. Japanese Patent Application Laid-Open No. 1-194028 and Gr
aefe, G., et.al. "Dynamic Query Evaluation Plans", Pr
oc. ACM-SIGMOD, 1989.

【0004】さらに、CPU性能、ディスク容量の延び
を上回るような、トランザクション量の増大、データベ
ース量の増大に対応して、スケーラブルな並列データベ
ースシステムの提供がユーザから望まれている。データ
ベースシステムに対するユーザの性能要件として、数万
を超える同時実行ユーザ数への対応、テラバイト単位の
検索トランザクションの出現、表サイズに比例しない応
答時間の保証がある。並列データベースシステムは、近
年のハードウェアコストの低減と相まって、注目を浴び
ている。並列データベースシステムについては、DeWit
t,D.,et.al.:"Parallel Database Systems: The Future
of High Performance Database Systems", CACM, Vol.
35, No.6, 1992.に記載の技術がある。そのようなシス
テムでは、密結合あるいは疎結合にプロセッサを接続
し、データベース処理を複数のプロセッサに静的/動的
に処理を配分し、スケジュールする必要がある。並列度
を増せば応答性能は向上するが、過度の並列度は逆にオ
ーバヘッドの増大、他トランザクションの応答時間の延
び等の影響がある。そのため、適度な並列度の設定が重
要である。
[0004] Further, in response to an increase in the amount of transactions and an increase in the amount of databases that exceed the increase in CPU performance and disk capacity, there is a demand from users for providing a scalable parallel database system. User performance requirements for a database system include handling more than tens of thousands of concurrent users, the appearance of search transactions in terabytes, and guaranteeing response times that are not proportional to table size. Parallel database systems have received attention in recent years, coupled with a reduction in hardware costs. For a parallel database system, see DeWit
t, D., et.al.: "Parallel Database Systems: The Future
of High Performance Database Systems ", CACM, Vol.
35, No. 6, 1992. In such a system, it is necessary to connect processors tightly or loosely, and to allocate and schedule database processing statically / dynamically to a plurality of processors. Although the response performance is improved by increasing the degree of parallelism, excessive degree of parallelism adversely affects the increase of overhead and the extension of the response time of other transactions. Therefore, setting an appropriate degree of parallelism is important.

【0005】デ−タベ−ス処理において、処理対象とな
るデ−タは、二次記憶装置上に存在し、各デ−タベ−ス
演算に対して大量デ−タの読み出しおよび転送が必要と
なる。並列デ−タベ−スシステムにおいても、転送する
デ−タが大量となる場合、デ−タ転送時間がデ−タベ−
スシステムの性能ネックとなる。そこで、二次記憶装置
からデ−タを転送する時間を有効活用する方法が考えら
れる。これは、デ−タの転送時間と当該デ−タに対する
デ−タベ−ス処理に要する時間とをオ−バラップさせる
ものであり、従来技術として良く知られている。この方
式は、相互結合ネットワークで接続されるプロセッサ群
間のデータ転送にも適用可能である。
In the database processing, data to be processed exists in a secondary storage device, and it is necessary to read and transfer a large amount of data for each database operation. Become. Even in a parallel database system, when the amount of data to be transferred is large, the data transfer time is limited to the data base.
System performance bottleneck. Therefore, a method of effectively utilizing the time for transferring data from the secondary storage device can be considered. This overlaps the data transfer time and the time required for database processing on the data, and is well known in the prior art. This method is also applicable to data transfer between processors connected by an interconnection network.

【0006】[0006]

【発明が解決しようとする課題】上記従来技術におい
て、問合せ最適化処理とは、ユ−ザが入力した問合せか
らデ−タベ−スシステムの各種統計情報を基にし、最も
効率の良い処理手順をDBMSが自動判定するものであ
る。さらに、問合せの選択条件式に変数が埋め込まれて
いる場合には、複数の処理手順を問合せ解析時に展開し
ておき、問合せ実行時に当変数に代入される値に従って
処理手順を選択することによって、最適な処理手順が選
択される。
In the above-mentioned prior art, the query optimizing process is based on various statistical information of the database system based on a query input by a user and determines the most efficient processing procedure. It is automatically determined by the DBMS. Furthermore, when a variable is embedded in the query selection conditional expression, a plurality of processing procedures are developed at the time of query analysis, and the processing procedure is selected according to the value assigned to the variable at the time of executing the query. The optimal procedure is selected.

【0007】並列データベース処理では、各ノード(プ
ロセッサあるいはプロセッサとディスク装置との対)へ
データベース演算が分割され、各ノードで各データベー
ス演算が並列にあるいはパイプライン的に動作する。上
記従来技術によれば、この並列処理形態でも、各ノード
で処理手順を選択する方法は適用可能である。
In parallel database processing, a database operation is divided into nodes (processors or pairs of processors and disk devices), and each node operates in parallel or in a pipeline at each node. According to the above-described prior art, even in this parallel processing mode, a method of selecting a processing procedure at each node is applicable.

【0008】しかし、並列に動作する処理では、同時間
にそれぞれのノードが並行処理をするが、各ノードで実
行するデータベース演算に対応して各ノード数を決定で
きないという問題がある。すなわち、ノード数を決定す
る基準が明確でないために、過度の並列化は逆にオーバ
ヘッドの増大等の影響があり、最適に負荷分散すること
が困難である。
However, in the processing that operates in parallel, each node performs parallel processing at the same time, but there is a problem that the number of each node cannot be determined in accordance with the database operation executed in each node. That is, since the criterion for determining the number of nodes is not clear, excessive parallelization adversely affects the increase of overhead, and it is difficult to optimally distribute the load.

【0009】また、パイプライン動作させる処理では各
ノードへデータベース演算が分割格納されるが、データ
の分割にバラツキが存在する場合、各ノードへの均等分
割方法が明確でない。
Further, in the processing for performing the pipeline operation, the database operation is divided and stored in each node. However, if there is a variation in the division of data, the method of equally dividing each node is not clear.

【0010】さらに、処理時間の制約があったときなど
のように、その時間内で複数の処理を行う場合におい
て、各ノードで実行する各データベース演算をパラメー
タ化し、期待する処理時間に基づいて時間調整(チュー
ニング)をする方法も明確でない。
Further, when a plurality of processes are performed within the time, such as when there is a restriction on the processing time, each database operation executed at each node is parameterized, and the time is calculated based on the expected processing time. It is not clear how to make adjustments.

【0011】本発明の目的は、問合せ処理を高速化する
問い合わせ処理方法およびデータベースシステムを提供
することにある。
An object of the present invention is to provide a query processing method and a database system for speeding up query processing.

【0012】[0012]

【課題を解決するための手段】本発明は、上記課題を解
決するために、データベース処理を実行する複数のノー
ドを備え、該複数のノードは、ネットワークを介して他
のノードと接続されるデータベース管理システムであっ
て、問い合わせ対象のデータベースを分散させて格納す
る記憶手段と、該記憶手段から情報を取り出して他のノ
ードに取り出した情報を分配する分配手段を備える分配
ノードと、該分配ノードから分配された情報を並び替え
る並び替え手段と、該並び替えられた情報が複数ある場
合にはそれらをマージするマージ手段と、該マージされ
た情報に基づいて問い合わせに対する突き合わせを実行
する突き合わせ手段とを備える結合ノードと、前記問い
合わせを受け付けて、該問い合わせを解析して問い合わ
せの処理手順を作成する解析手段と、該解析手段の問い
合わせの解析結果に基づいて実行処理を行う分配ノード
および結合ノードを決定する決定手段と、前記結合ノー
ドから得られた、問い合わせに対する結果を出力する出
力手段とを備える決定管理ノードとを備える。
In order to solve the above-mentioned problems, the present invention comprises a plurality of nodes for executing database processing, wherein the plurality of nodes are connected to another node via a network. A management system, a distribution node including storage means for distributing and storing a database to be queried and distribution means for extracting information from the storage means and distributing the extracted information to other nodes; and Rearranging means for rearranging the distributed information; merging means for merging the rearranged information when there are a plurality of the information; and matching means for executing a match for an inquiry based on the merged information. Receiving the query, analyzing the query and creating a query processing procedure. Analyzing means for determining, a determining means for determining a distribution node and a joint node to perform an execution process based on an analysis result of an inquiry of the analyzing means, and an output means for outputting a result of the inquiry obtained from the joint node. And a decision management node.

【0013】前記決定手段は、前記解析手段の問い合わ
せの解析結果に基づいて前記分配ノードを決定し、前記
分配ノードにおける予想される処理時間を算出し、該処
理時間に基づいて結合ノードを決定することができる。
The determining means determines the distribution node based on an analysis result of the inquiry of the analysis means, calculates an expected processing time in the distribution node, and determines a connection node based on the processing time. be able to.

【0014】前記決定手段は、前記決定された分配ノー
ドにおける予想される取り出し情報量に基づいて、前記
結合ノードへの前記取り出し情報の分配を前記各結合ノ
ードに均等に割当てるようにする。
[0014] The determining means is configured to allocate the distribution of the extracted information to the connection nodes equally to each of the connection nodes based on the amount of information to be extracted which is expected at the determined distribution node.

【0015】前記決定管理ノードは、前記決定手段にお
いて前記結合ノードに取り出し情報を均等に割当てるた
めの、前記各ノードの記憶手段の情報に関する最適化情
報を記憶している記憶手段を備えることができる。
[0015] The decision management node may include storage means for storing optimization information relating to information in the storage means of each of the nodes, so that the determination means equally allocates the extracted information to the connection nodes. .

【0016】前記決定管理ノードは、前記決定手段にお
いて前記結合ノードに取り出し情報を均等に割当てるた
めにあらかじめ定められたハッシュ関数を利用する。
[0016] The decision management node uses a predetermined hash function in order for the decision means to equally allocate the extracted information to the joining node.

【0017】また、前記複数のノードは、それぞれ独立
に処理を行い、前記結合ノードは、前記分配ノードから
の分配された情報を逐次入力し、入力された情報ごとに
処理を行う。
Further, the plurality of nodes perform processing independently of each other, and the connection node sequentially inputs information distributed from the distribution node, and performs processing for each input information.

【0018】さらに、前記分配ノードは、該分配ノード
で分配する情報を並び替える並び替え手段を有するよう
にしてもよい。
Further, the distribution node may have a reordering means for reordering information distributed by the distribution node.

【0019】前記決定手段は、前記分配ノードにおける
予想される処理時間の算出結果から、より先に処理が終
了する分配ノードに対して分配処理後に前記分配ノード
の並び替え手段において並び替えをするように決定する
ことができる。
The deciding means rearranges the distribution nodes in the distribution node rearranging means after the distribution processing to the distribution nodes whose processing ends earlier from the calculation result of the expected processing time in the distribution nodes. Can be determined.

【0020】前記決定手段は、前記処理時間に基づいて
決定した前記結合ノードの台数を、所定数増加させるよ
うに決定する。
The deciding means decides to increase the number of the connection nodes determined based on the processing time by a predetermined number.

【0021】前記結合ノードの並び替え手段は、並び替
え処理の終了後にマージ処理をする機能を備えるように
してもよい。前記突き合わせ手段は、前記マージ処理を
する機能を備えるようにしてもよい。
[0021] The reordering means of the connection nodes may have a function of performing a merge process after the end of the reordering process. The matching means may have a function of performing the merge processing.

【0022】前記決定手段は、前記突き合わせ手段およ
び前記出力手段における予想される処理時間を算出し、
該算出結果に基づいて、前記出力手段の処理時間が、前
記突き合わせ手段の処理時間より大きい場合には、前記
突き合わせ手段に前記マージ処理を行わせるように決定
する。
The determining means calculates an expected processing time in the matching means and the output means,
If the processing time of the output means is longer than the processing time of the matching means based on the calculation result, it is determined to cause the matching means to perform the merge processing.

【0023】また、本発明は、上記課題を解決するため
に、ネットワークを介して相互に接続される複数のノー
ドを備えるデータベース管理システムであって、データ
ベースを構成するデータを分散して格納する記憶手段を
備え、指示されたときに、前記記憶手段に格納されたデ
ータを取り出し、取り出したデータを他のノードに分配
すべく前記ネットワークに送出する複数の第1のノード
と、指示されたときに、前記ネットワークに送出された
データを受け取り、受け取ったデータに対するデータベ
ース演算を実行し、その結果を前記ネットワークに送出
する複数の第2のノードと、ユーザからの問い合わせを
受け付けて、該問い合わせを解析し、該解析結果に基づ
いて、前記複数の第1のノードのうち少なくとも一つの
第1のノードに対して前記データの取りだしを指示し、
前記第2のノードのうち少なくとも一つの第2のノード
に対して前記データベース演算の実行を指示し、前記ネ
ットワーク上に送出された演算結果を受け取り、前記問
い合わせに対する結果を出力する第3のノードとを有す
る。
According to another aspect of the present invention, there is provided a database management system including a plurality of nodes connected to each other via a network. The storage system stores data constituting a database in a distributed manner. Means for retrieving data stored in the storage means when instructed, and sending the retrieved data to the network for distribution to other nodes; and Receiving data sent to the network, performing a database operation on the received data, and receiving inquiries from a plurality of second nodes for sending the result to the network, and a user, and analyzing the query. And, based on the analysis result, a pair with at least one first node of the plurality of first nodes. Instructs extraction of the data Te,
A third node that instructs at least one second node of the second nodes to execute the database operation, receives an operation result transmitted over the network, and outputs a result corresponding to the inquiry; Having.

【0024】前記第3のノードは、受け付けた問い合わ
せの解析結果に基づいて、前記データの取りだしを指示
する第1のノードを決定し、当該第1のノードにおける
予想される処理時間を算出し、該処理時間に基づいて前
記データベース演算の実行を指示する第2のノードを決
定することができる。
[0024] The third node determines a first node instructing the retrieval of the data based on an analysis result of the received query, and calculates an expected processing time in the first node. A second node instructing execution of the database operation can be determined based on the processing time.

【0025】前記第3のノードは、前記決定された第1
のノードにおける、予想される取り出しデータ量に基づ
いて、前記決定された第2のノードへの前記取り出しデ
ータの分配を当該決定された第2のノードに均等に割当
てるようにする。
[0025] The third node may include the determined first node.
, The distribution of the extracted data to the determined second node is evenly allocated to the determined second node based on the expected amount of extracted data at the node.

【0026】前記第3のノードは、前記決定された第2
のノードに取り出しデータを均等に割当てるための、前
記各ノードの記憶手段のデータに関する最適化情報を記
憶している記憶手段を備えることができる。
[0026] The third node may determine the determined second node.
Storage means for storing optimization information on the data in the storage means of each of the nodes for uniformly assigning the extracted data to the other nodes.

【0027】前記第3のノードは、前記決定された第2
のノードに取り出しデータを均等に割当てるためにあら
かじめ定められたハッシュ関数を利用する。
[0027] The third node may include the determined second node.
A predetermined hash function is used to evenly allocate the extracted data to the nodes.

【0028】また、前記複数のノードは、それぞれ独立
に処理を行い、前記決定された第2のノードは、前記決
定された第1のノードからの分配されたデータを逐次入
力し、入力されたデータごとに処理を行う。
Further, the plurality of nodes perform processing independently of each other, and the determined second node sequentially inputs data distributed from the determined first node, and receives the input data. Perform processing for each data.

【0029】さらに、前記複数の第1のノードの各々
は、該第1のノードで分配するデータをさらに並び替え
るようにしてもよい。
Further, each of the plurality of first nodes may further rearrange the data distributed by the first nodes.

【0030】前記第3のノードは、前記決定された第1
のノードにおける予想される処理時間の算出結果から、
より先に処理が終了する第1のノードに対して分配処理
後に当該第1のノードにおいて並び替えをするように決
定することができる。
[0030] The third node may include the determined first node.
From the calculation result of the expected processing time at the node of
It is possible to determine that the sorting is to be performed at the first node after the distribution processing to the first node whose processing ends earlier.

【0031】前記第3のノードは、前記処理時間に基づ
いて決定した前記第2のノードの台数を、所定数増加さ
せるように決定する。
The third node determines to increase the number of the second nodes determined based on the processing time by a predetermined number.

【0032】前記決定された第2のノードは、前記第1
のノードにおける分配されたデータの並び替えの終了後
にマージ処理をするようにしてもよい。
[0032] The determined second node is the first node.
The merge processing may be performed after the rearrangement of the distributed data at the node is completed.

【0033】前記第2のノードは、前記第1のノードに
おける分配されたデータの並び替えの終了後にマージ処
理を行い、該マージされたデータに基づいて問い合わせ
に対する突き合わせの処理を行う。
The second node performs a merge process after the rearrangement of the distributed data in the first node, and performs a matching process for an inquiry based on the merged data.

【0034】前記第3のノードは、前記突き合わせの処
理および前記問い合わせに対する結果の出力の処理にお
ける予想される処理時間を算出し、該算出結果に基づい
て、前記出力の処理の処理時間が、前記突き合わせの処
理処理の時間より大きい場合には、前記突き合わせの処
理の中で前記マージ処理を行わせる。
The third node calculates an expected processing time in the matching processing and the processing of outputting a result in response to the inquiry, and calculates the processing time of the output processing based on the calculation result. If the time is longer than the time for the matching process, the merge process is performed during the matching process.

【0035】また、本発明の他の態様によれば、データ
ベースを構成するデータを分散して格納する記憶手段を
備え、指示されたときに、前記記憶手段に格納されたデ
ータを取り出し、取り出したデータを他のノードに分配
する複数の第1のノードと、指示されたときに、前記第
1のノードにより分配されたデータを受け取り、受け取
ったデータに対するデータベース演算を実行し、その結
果を出力する複数の第2のノードと、ユーザからの問い
合わせを受け付けて、該問い合わせを解析し、該解析結
果に基づいて、前記複数の第1のノードのうち少なくと
も一つの第1のノードに対して前記データの取りだしを
指示し、前記第2のノードのうち少なくとも一つの第2
のノードに対して前記データベース演算の実行を指示
し、当該第2のノードから出力された演算結果を受け取
り、前記問い合わせに対する結果を出力する第3のノー
ドとを有し、前記第3のノードは、受け付けた問い合わ
せの解析結果に基づいて、前記データの取りだしを指示
する第1のノードを決定し、当該第1のノードにおける
予想される処理時間を算出し、実行する第2のノードの
数に対する予想される処理時間を算出し、前記第1のノ
ードにおける予想される処理時間と、前記実行する第2
のノードの数に対する予想される処理時間とに基づいて
前記データベース演算の実行を指示する第2のノードの
数を決定することができる。
According to another aspect of the present invention, there is provided storage means for distributing and storing data constituting the database, and when instructed, retrieves the data stored in the storage means and retrieves the data. A plurality of first nodes for distributing data to other nodes;
Receiving data distributed by one node, executing a database operation on the received data, and receiving a query from a plurality of second nodes that output the results, and analyzing the query; In accordance with the result, instructing at least one of the plurality of first nodes to take out the data, and instructing at least one of the second nodes to acquire a second one of the second nodes
A third node that instructs the node to execute the database operation, receives the operation result output from the second node, and outputs a result corresponding to the query, wherein the third node Determining a first node for instructing the retrieval of the data based on an analysis result of the received inquiry, calculating an expected processing time in the first node, and calculating a processing time of the second node. Calculating an expected processing time, calculating the expected processing time at the first node and the second processing to be executed;
The number of second nodes that instruct the execution of the database operation can be determined based on the expected processing time for the number of nodes.

【0036】[0036]

【作用】前記決定管理ノードは、前記解析手段の問い合
わせの解析結果に基づいて前記分配ノードを決定し、前
記分配ノードにおける予想される処理時間を算出し、該
処理時間に基づいて結合ノードを決定する。決定手段
は、前記決定された分配ノードにおける予想される取り
出し情報量に基づいて、前記結合ノードへの前記取り出
し情報の分配を前記各結合ノードに均等に割当てるよう
にする。
The decision management node determines the distribution node based on the analysis result of the inquiry from the analysis means, calculates an expected processing time in the distribution node, and determines a connection node based on the processing time. I do. The determining means is configured to equally allocate the distribution of the extracted information to the connection nodes to each of the connection nodes based on the determined amount of information to be extracted at the distribution nodes.

【0037】前記決定された分配ノードのそれぞれは、
前記問い合わせの解析結果に基づいて前記記憶手段から
情報を取り出して該取り出した情報を他のノードに分配
する。分配ノードおよび結合ノードは、それぞれ独立に
処理を行い、前記結合ノードは、前記分配ノードからの
分配された情報を逐次入力し、入力された情報ごとに処
理を行う。前記決定された結合ノードのそれぞれは、前
記分配ノードから分配された情報を並び替え、該並び替
えられた情報が複数ある場合にはそれらをマージし、該
マージされた情報に基づいて問い合わせに対する突き合
わせをし、前記結合ノードから得られた、問い合わせに
対する結果を出力する。
Each of the determined distribution nodes is:
The information is extracted from the storage unit based on the result of the analysis of the inquiry, and the extracted information is distributed to other nodes. The distribution node and the connection node perform processing independently of each other, and the connection node sequentially inputs information distributed from the distribution node, and performs processing for each input information. Each of the determined joining nodes rearranges the information distributed from the distribution node, merges the rearranged information when there are a plurality of pieces of information, and matches the inquiry based on the merged information. And outputs the result for the query obtained from the join node.

【0038】また、決定手段は、前記分配ノードにおけ
る予想される処理時間の算出結果から、より先に処理が
終了する分配ノードに対して分配処理後に前記分配ノー
ドの並び替え手段において並び替えをするように決定す
る。決定された分配ノードの並び替え手段は、該分配ノ
ードで分配する情報を並び替える。
In addition, the determining means rearranges the distribution nodes after the distribution processing to the distribution nodes whose processing ends earlier based on the calculation result of the expected processing time in the distribution nodes. To be determined. The determined distribution node rearranging means rearranges the information distributed by the distribution node.

【0039】さらに、決定手段は、前記突き合わせ手段
および前記出力手段における予想される処理時間を算出
し、該算出結果に基づいて、前記出力手段の処理時間
が、前記突き合わせ手段の処理時間より大きい場合に
は、前記突き合わせ手段に前記マージ処理を行わせるよ
うに決定する。決定された突き合わせ手段は、マージ処
理をする。
Further, the determining means calculates an expected processing time in the matching means and the output means, and, based on the calculation result, when the processing time of the output means is longer than the processing time of the matching means. Is determined to cause the matching means to perform the merge processing. The determined matching means performs a merging process.

【0040】また、処理時間があらかじめ定まっている
ときに、該処理時間以内で処理をさせるために、前記決
定手段は、分配ノードにおける予想される処理時間に基
づいて決定した前記結合ノードの台数を、所定数増加さ
せるように決定する。これにより、結合ノードの台数が
増加し、結合ノードの並び替え手段は、並び替え処理が
短時間で処理できるので、並び替え処理の終了後にマー
ジ処理をする。
In addition, when the processing time is predetermined, in order to perform the processing within the processing time, the determining means determines the number of the connection nodes determined based on the expected processing time in the distribution node. Is determined to be increased by a predetermined number. As a result, the number of connection nodes increases, and the connection node rearrangement unit performs the rearrangement processing in a short time, and performs the merge processing after the rearrangement processing ends.

【0041】本発明の問合せ処理方法によれば、各ノー
ドで実行するデータベース演算に対応して各ノード数を
決定できる。また、データの分割にバラツキが存在する
場合、各ノードへデータを均等に分割させ、各ノードで
実行する各データベース演算をパラメタ化し期待する処
理時間均等化させるので、各ノード間で処理時間の偏り
がなく、円滑にパイプライン動作させることが可能であ
る。
According to the query processing method of the present invention, the number of each node can be determined according to the database operation executed at each node. In addition, when there is a variation in data division, the data is equally divided into each node, and each database operation executed in each node is parameterized to equalize expected processing time. And smooth pipeline operation is possible.

【0042】また、本発明の他の構成によれば、第3の
ノードは、ユーザからの問い合わせを受け付けて、該問
い合わせを解析し、該解析結果に基づいて、前記複数の
第1のノードのうち少なくとも一つの第1のノードに対
して前記データの取りだしを指示し、前記第2のノード
のうち少なくとも一つの第2のノードに対して前記デー
タベース演算の実行を指示する。第3のノードは、前記
決定された第1のノードにおける、予想される取り出し
データ量に基づいて、前記決定された第2のノードへの
前記取り出しデータの分配を当該決定された第2のノー
ドに均等に割当てるようにする。
Further, according to another configuration of the present invention, the third node receives an inquiry from a user, analyzes the inquiry, and, based on the analysis result, determines whether the plurality of first nodes have the same configuration. Instructing at least one of the first nodes to retrieve the data, and instructing at least one of the second nodes to execute the database operation. A third node configured to distribute the extracted data to the determined second node based on an expected amount of extracted data at the determined first node; To be evenly distributed.

【0043】決定された第1のノードの各々は、指示さ
れたときに、前記記憶手段に格納されたデータを取り出
し、取り出したデータを他のノードに分配すべく前記ネ
ットワークに送出する。第1のノード及び第2のノード
は、それぞれ独立に処理を行い、決定された第2のノー
ドは、前記決定された第1のノードからの分配されたデ
ータを逐次入力し、入力されたデータごとに処理を行
う。決定された第2のノードの各々は、指示されたとき
に、前記ネットワークに送出されたデータを受け取り、
受け取ったデータに対するデータベース演算を実行し、
その結果を前記ネットワークに送出する。第3のノード
は、前記ネットワーク上に送出された演算結果を受け取
り、前記問い合わせに対する結果を出力する。
Each of the determined first nodes, when instructed, retrieves the data stored in the storage means and sends the retrieved data to the network for distribution to other nodes. The first node and the second node perform processing independently of each other, and the determined second node sequentially inputs the distributed data from the determined first node, and receives the input data. The process is performed every time. Each of the determined second nodes, when instructed, receives the data transmitted to the network,
Perform database operations on the received data,
The result is sent to the network. The third node receives the operation result transmitted on the network and outputs a result for the inquiry.

【0044】また、第3のノードは、前記決定された第
1のノードにおける予想される処理時間の算出結果か
ら、より先に処理が終了する第1のノードに対して分配
処理後に当該第1のノードにおいてデータを並び替える
ように決定する。決定された第1のノードは、分配処理
後にデータを並び替える。
Further, the third node, after calculating the expected processing time at the determined first node, distributes the first processing to the first node whose processing ends earlier, after the distribution processing to the first node. It is determined that the data is rearranged at the node of. The determined first node rearranges the data after the distribution processing.

【0045】さらに、第3のノードは、前記突き合わせ
の処理および前記問い合わせに対する結果の出力の処理
における予想される処理時間を算出し、該算出結果に基
づいて、前記出力の処理の処理時間が、前記突き合わせ
の処理処理の時間より大きい場合には、前記突き合わせ
の処理の中で前記マージ処理を行わせる。
Further, the third node calculates an expected processing time in the matching processing and the processing of outputting a result with respect to the inquiry, and based on the calculation results, calculates a processing time of the output processing. If the time is longer than the time of the matching process, the merge process is performed during the matching process.

【0046】また、処理時間が予め定まっているとき
に、該処理時間以内で処理をさせるために第3のノード
は、前記処理時間に基づいて決定した前記第2のノード
の台数を、所定数増加させるように決定する。これによ
り、第2のノードの台数が増加し、並び替えの処理をよ
り短時間で処理することができる。並び替え処理の終了
後にはマージ処理をすることができる。
When the processing time is predetermined, the third node determines the number of the second nodes determined based on the processing time by a predetermined number in order to perform the processing within the processing time. Decide to increase. As a result, the number of second nodes increases, and the sorting process can be performed in a shorter time. After the rearrangement process is completed, a merge process can be performed.

【0047】本発明によれば、データを取りだして分配
するノードとデータベース演算を実行するノードとを決
定できる。また、データの分割にバラツキが存在する場
合、各ノードへデータを均等に分割させ、各ノードで実
行する各データベース演算をパラメタ化し、期待する処
理時間を均等化させるので、各ノード間で処理時間の偏
りがなく、円滑にパイプライン動作をさせることが可能
である。
According to the present invention, a node that extracts and distributes data and a node that executes a database operation can be determined. Also, if there is a variation in data division, the data is equally divided into each node, each database operation executed in each node is parameterized, and the expected processing time is equalized. And the pipeline operation can be performed smoothly.

【0048】[0048]

【実施例】以下、本発明の実施例を図面に基づいて詳細
に説明する。
Embodiments of the present invention will be described below in detail with reference to the drawings.

【0049】図2は、本実施例のデ−タベ−スシステム
の概念図を示している。図2において、デ−タベ−スシ
ステムは、ユ−ザが作成した、複数のアプリケ−ション
プログラム(以下、APと略記する)10および11
と、問合せ処理やリソ−ス管理等デ−タベ−スシステム
全体の管理を行うDBMS20と、デ−タベ−ス処理に
おいて、入出力処理対象となるデ−タの読書きを行い、
計算機システム全体の管理を受け持つオペレ−ティング
システム(以下では、オペレ−ティングシステムをOS
と略記する)30と、デ−タベ−ス処理対象となるデ−
タを格納するデ−タベ−ス40と、データベースの定義
情報を管理するディクショナリ50とを有する。DBM
S20は、他のデータベース管理システムと接続されて
いる。ディクショナリ50には、本実施例において使用
する結合カラムに関する最適化情報なども記憶されてい
る。
FIG. 2 shows a conceptual diagram of the database system of the present embodiment. In FIG. 2, the database system includes a plurality of application programs (hereinafter abbreviated as AP) 10 and 11 created by a user.
And a DBMS 20 for managing the entire database system such as query processing and resource management, and for reading and writing data to be input / output processing in the database processing.
An operating system that manages the entire computer system (hereinafter, operating system is referred to as OS
30) and the data to be processed in the database.
It has a database 40 for storing data and a dictionary 50 for managing definition information of the database. DBM
S20 is connected to another database management system. The dictionary 50 also stores optimization information and the like regarding the binding columns used in the present embodiment.

【0050】上記DBMS20は、システム全体の管
理、制御に加えて、入出力の管理等を行うシステム制御
部21と、問い合わせに関する論理処理を行う論理処理
部22と、データベースの物理処理を実行する物理処理
部23と、当DBMS20で処理対象となるデータを格
納するデータベースバッファ24とを備える。また、論
理処理部22は、問合せの構文解析、意味解析を行う問
合せ解析220、適切な処理手順を生成する静的最適化
処理221、処理手順に対応したコ−ドの生成を行なう
コード生成222、静的最適化処理221で生成された
処理手順候補から最適なものを選択する動的最適化処理
223、および、当コードの解釈実行を行うコード解釈
実行部224を備える。また、物理処理部23は、アク
セスしたデ−タの条件判定、編集、レコード追加等を実
現するデ−タアクセス処理230、データベースレコ−
ドの読み書きを制御するデ−タベ−スバッファ制御23
1、入出力対象となるデ−タの格納位置を管理するマッ
ピング処理232、および、システムで共用するリソー
スの排他制御を実現する排他制御233を備える。
The DBMS 20 includes a system control unit 21 for performing input / output management and the like in addition to management and control of the entire system, a logical processing unit 22 for performing logical processing related to an inquiry, and a physical processing unit for executing physical processing of a database. A processing unit 23 and a database buffer 24 for storing data to be processed by the DBMS 20 are provided. The logic processing unit 22 includes a query analysis 220 that performs syntax analysis and semantic analysis of the query, a static optimization process 221 that generates an appropriate processing procedure, and a code generation 222 that generates a code corresponding to the processing procedure. , A dynamic optimization process 223 for selecting an optimal process procedure candidate from the process procedure candidates generated in the static optimization process 221, and a code interpretation execution unit 224 for interpreting and executing the code. The physical processing unit 23 includes a data access process 230 for realizing condition determination, editing, record addition, and the like of the accessed data, a database record, and the like.
Database buffer control 23 for controlling read / write of data
1, a mapping process 232 for managing the storage location of data to be input / output, and an exclusive control 233 for implementing exclusive control of resources shared by the system.

【0051】図3は、本発明が適用されるハードウェア
構成の一例を示すものである。具体的には、図3は、プ
ロセッサおよびディスク装置が1ノードを構成し、複数
のノードを備える並列プロセッサシステムの適用構成例
を示している。図3において、プロセッサ60〜65お
よびディスク装置70〜75が相互結合ネットワーク8
0で接続される。図3に示すハードウェア構成は、図2
に示すデータベースシステムを複数のプロセッサで並列
処理するための構成であり、各ノードに対してそれぞれ
処理が分散される。
FIG. 3 shows an example of a hardware configuration to which the present invention is applied. Specifically, FIG. 3 shows an example of an application configuration of a parallel processor system in which a processor and a disk device constitute one node and a plurality of nodes are provided. In FIG. 3, the processors 60 to 65 and the disk devices 70 to 75
0 is connected. The hardware configuration shown in FIG.
Is a configuration for parallel processing of the database system shown in (1) by a plurality of processors, and the processing is distributed to each node.

【0052】上記各ノードごとに機能分散した場合の構
成を図1に示す。図1は、本実施例が適用されたデ−タ
ベ−スシステムの概要図を示している。以下に、並列デ
ータベースシステムの処理例を図1を参照して説明す
る。この例では、データベースに対する検索要求に並列
処理を適用する。図1において、各ノードは、データを
取り出して分配処理するソート機能と、複数のノードで
それぞれソートされたデータを結合処理するマージ機能
とが各ノードごとに割り当てられている。ノードにより
ソート機能だけを備えるものや、ソート機能とマージ機
能とを備えるものがある。デ−タベ−スは、ユ−ザから
2次元のテ−ブル形式で見られる表から成るものとし、
当該表は行あるいはロウごとにデータが存在するもので
ある。また、ロウは、1つ以上の属性(これを「カラ
ム」という)からなる。図1においては、データベース
の表としてT1およびT2があり、ノード1(90)か
らノード4(91)に表T1が、ノード5(92)から
ノード8(93)に表T2が各々格納されており、これ
らの各ノードが分配ノードであり、分配ノードにおいて
格納している表に基づいてデータ取り出し処理およびデ
ータ分配処理が実行される。また、ノード9(94)か
らノード11(96)は、結合ノードであり、ノード1
〜4およびノード5〜8から出力されるデータを受け取
り、部分列ソート処理およびマージ処理をして完全列の
作成を実行する。さらに、ノード12(97)は、問い
合わせを受け付け、該問い合わせを解析し、問い合わせ
に対する処理を実行する分配ノードおよび結合ノードの
数を決定する決定ノードである。また、ノード12(9
7)は、ノード9〜11から出力されたデータを受け取
り出力する。これらのノード群は、相互結合ネットワー
ク80で接続され、ノード1〜4およびノード5〜8
と、ノード9〜11とが並列に動作し、しかもノード1
〜4およびノード5〜8でそれぞれ処理された結果は、
すぐにノード9〜11で処理を行うというようなパイプ
ライン的に動作する(以下、並列パイプライン動作と呼
ぶ)。また、ノード9〜11とノード12とも同様にパ
イプライン動作する。以下では、ノード9〜11におけ
る部分列ソート処理をスロットソート処理といい、完全
列作成処理をNウェイマージ処理と呼ぶ。スロットソー
ト処理は、データが格納されるページを対象とするペー
ジ内のソート処理を指し、スロット順に読みだせば昇順
にロウがアクセス可能とする。Nウェイマージ処理は、
Nウェイのバッファを用いて、各マージ段でN本のソー
ト連を入力にして最終的に1本のソート連を作成する。
FIG. 1 shows a configuration in which functions are distributed to each of the above nodes. FIG. 1 is a schematic diagram of a database system to which the present embodiment is applied. Hereinafter, a processing example of the parallel database system will be described with reference to FIG. In this example, parallel processing is applied to a search request for a database. In FIG. 1, each node is assigned to each node a sort function for extracting and distributing data and a merge function for combining data sorted by a plurality of nodes. Some nodes have only a sort function and some nodes have a sort function and a merge function. The database shall consist of a table which is viewed from the user in the form of a two-dimensional table,
The table has data for each row or row. A row is composed of one or more attributes (this is called a “column”). In FIG. 1, there are T1 and T2 as database tables. Table 1 is stored from node 1 (90) to node 4 (91), and table T2 is stored from node 5 (92) to node 8 (93). Each of these nodes is a distribution node, and data extraction processing and data distribution processing are executed based on a table stored in the distribution node. Also, nodes 9 (94) to 11 (96) are connection nodes,
-4 and the data output from the nodes 5-8, and performs a partial column sort process and a merge process to create a complete column. Further, the node 12 (97) is a decision node that accepts a query, analyzes the query, and determines the number of distribution nodes and connection nodes that execute processing for the query. The node 12 (9
7) receives and outputs data output from nodes 9-11. These nodes are connected by an interconnection network 80, and nodes 1-4 and nodes 5-8
And nodes 9 to 11 operate in parallel, and
-4 and the results processed at nodes 5-8, respectively,
It operates in a pipeline such that the processing is immediately performed in the nodes 9 to 11 (hereinafter, referred to as a parallel pipeline operation). The nodes 9 to 11 and the node 12 also operate in a pipeline manner. In the following, the partial column sorting process at the nodes 9 to 11 is referred to as a slot sorting process, and the complete column creating process is referred to as an N-way merge process. The slot sort process indicates a sort process in a page in which data is stored, and if the data is read in the slot order, the rows can be accessed in ascending order. N-way merge processing
Using an N-way buffer, N sort runs are input at each merge stage, and one sort run is finally created.

【0053】データベース検索処理のための問合せは、
例えば、以下のようになる。
An inquiry for a database search process is as follows:
For example,

【0054】 SELECT T1.C3,T2.C3 FROM T1,T2 WHERE T1.C1=T2.C1 AND T1.C2=? このような問い合わせが、ノード12において受け付け
られると、ノード12において、最適な分配処理方法が
選択され、各ノードに対してネットワークを介して指示
される。上記の問い合わせにおいては、ノード1(9
0)からノード4(91)に表T1が、ノード5(9
2)からノード8(93)に表T2が各々格納されてい
るので、各ノードにおいてデータ取り出し処理およびデ
ータ分配処理が実行される。また、ノード9(94)か
らノード11(96)では、ノード1〜4およびノード
5〜8から出力されるデータを逐次受け取り、ソート処
理および結合処理を実行する。ノード12(97)で
は、ノード9〜11から出力されたデータを受け取り出
力する。これによりデータベース検索は終了する。
SELECT T1. C3, T2. C3 FROM T1, T2 WHERE T1. C1 = T2. C1 AND T1. C2 =? When such an inquiry is received at the node 12, the node 12 selects an optimal distribution processing method, and instructs each node via the network. In the above inquiry, node 1 (9
0) to the node 4 (91) with the table T1 and the node 5 (9
Since the table T2 is stored in each of the nodes 2) to 93 (93), the data extraction processing and the data distribution processing are executed in each node. Further, the nodes 9 (94) to 11 (96) sequentially receive the data output from the nodes 1 to 4 and the nodes 5 to 8, and execute the sorting process and the combining process. The node 12 (97) receives and outputs the data output from the nodes 9 to 11. This terminates the database search.

【0055】つぎに、上記各ノードの処理時間の関係に
ついて図4を参照して説明する。図4は、並列パイプラ
イン動作を説明するための概要図を示す。図4におい
て、100および101は、図1におけるノード1(9
0)からノード4(91)と、ノード5(92)からノ
ード8(93)とにおける処理に対応し、データ取り出
し処理およびデータ配分処理を実行する。110および
111は、ノード9(94)からノード11(96)に
おける処理に対応し、スロットソート処理、Nウェイマ
ージ処理、突き合わせ処理が実行される。120は、ノ
ード12(97)における処理に対応し、要求データ出
力処理が実行される。時間軸に沿えば、データ取り出し
処理およびデータ配分処理100および101で処理さ
れたデータは、逐次スロットソート処理110および1
11に移り、パイプライン的に実行される。データ取り
出し処理からスロットソート処理までを取り出しフェー
ズと呼ぶ。また、Nウェイマージ処理110および11
1は、それぞれのノードで単に並列に実行される。この
Nウェイマージ処理期間をマージフェーズと呼ぶ。さら
に、突き合わせ処理の結果は要求データ出力処理120
に逐次転送されてパイプライン的に実行される。この突
き合わせから要求データ出力までを結合フェーズと呼
ぶ。図4に示すタイムチャートは、図1に示す問合せ例
を適用した場合の処理内容である。取り出しフェーズに
おいて、ノード1(90)からノード4(91)におけ
る処理時間は、T1データ取り出し/データ分配処理時
間130として示す。また、ノード5(92)からノー
ド8(93)における処理時間は、T2データ取り出し
/データ分配処理時間131で示し、相互結合ネットワ
ーク80における転送時間をデータ分配転送時間140
で示し、ノード9(94)からノード11(96)にお
ける処理時間は、T1/T2スロットソート処理時間1
50に示すように、各々実行される。図4において、取
り出しフェーズは、スロットソート処理完了待ち合わせ
180の時点までで終了する。また、マージフェーズに
おいて、ノード9(94)からノード11(96)にお
ける処理時間は、T1/T2Nウェイマージ処理時間1
51に示す時間において実行される。このマージフェー
ズは、T1/T2Nウェイマージ処理待ち合わせ181
までで終了する。結合フェーズは、ノード9(94)か
らノード11(96)における処理時間は、突き合わせ
処理時間152で示し、相互結合ネットワーク80にお
ける処理時間は、結合結果転送時間160で示し、ノー
ド12(97)における処理時間は、要求データ出力処
理時間170で示し、各々その時間内に実行される。
Next, the relationship between the processing time of each node will be described with reference to FIG. FIG. 4 is a schematic diagram for explaining the parallel pipeline operation. In FIG. 4, 100 and 101 are nodes 1 (9
0) to node 4 (91) and the processing from node 5 (92) to node 8 (93), and executes data extraction processing and data distribution processing. 110 and 111 correspond to the processing from the node 9 (94) to the node 11 (96), and the slot sort processing, the N-way merge processing, and the matching processing are executed. Reference numeral 120 corresponds to the processing in the node 12 (97), and the request data output processing is executed. Along the time axis, the data processed in the data extraction processing and the data distribution processing 100 and 101 are sequentially slot-sorted 110 and 1
It moves to 11 and is executed in a pipeline manner. The process from the data fetch process to the slot sort process is called a fetch phase. Also, N-way merge processing 110 and 11
1 is simply executed in parallel at each node. This N-way merge processing period is called a merge phase. Further, the result of the matching process is a request data output process 120.
, And are executed in a pipeline manner. The process from the matching to the output of the requested data is called a combining phase. The time chart shown in FIG. 4 shows the processing contents when the inquiry example shown in FIG. 1 is applied. In the extraction phase, the processing time from node 1 (90) to node 4 (91) is shown as T1 data extraction / data distribution processing time 130. The processing time from the node 5 (92) to the node 8 (93) is indicated by T2 data extraction / data distribution processing time 131, and the transfer time in the interconnection network 80 is represented by the data distribution transfer time 140.
, And the processing time from node 9 (94) to node 11 (96) is T1 / T2 slot sort processing time 1
As shown at 50, each is performed. In FIG. 4, the take-out phase ends up to the point of time 180 for waiting for slot sort processing completion. In the merge phase, the processing time from the node 9 (94) to the node 11 (96) is T1 / T2N way merge processing time 1
It is executed at the time indicated by 51. This merge phase is a T1 / T2N way merge process waiting 181.
Ends with In the connection phase, the processing time from the node 9 (94) to the node 11 (96) is indicated by a matching processing time 152, the processing time in the mutual connection network 80 is indicated by a connection result transfer time 160, and the processing time on the node 12 (97). The processing time is indicated by a request data output processing time 170, and each is executed within that time.

【0056】つぎに、図1におけるノード12の各ノー
ド群への処理の振り分け方法について図5を参照して説
明する。図5は、データ分配処理における各ノード群へ
の振り分け方法を示す説明図である。前提として、デー
タ取り出し/データ分配処理をするノード群は、プロセ
ッサ200〜230とディスク装置201〜231とを
備えるノード1〜10の10台からなる。また、結合処
理をするノード群は、プロセッサ240〜250とディ
スク装置241〜251とを備えるノード11〜15の
5台からなるとする。ディクショナリ50には、結合カ
ラムに関する最適化情報51が格納されていている。該
最適化情報51とは、データベースのデータを均等に分
割するための情報であり、例えば、結合カラムに対する
データ件数は通常均一でないので、データ件数が均一に
なるように結合カラムで分割するようにするものであ
る。図5に示すように、ノード1〜10に格納されてい
るデータが、v1からv10の各分割範囲で均等にデー
タ分割可能であることを示す。この場合、ノード11〜
15に均等にデータ分割するためにはv1〜v2、v3
〜v4、v5〜v6、v7〜v8、v9〜v10の5区
間にそれぞれノード番号11、12、13、14、15
を対応付けるような分配処理手段を備えればよい。上記
最適化情報が存在しない場合、適当なハッシュ関数を設
定してデータ分配を行なえばよい。このようにして、図
1におけるノード12では、分配処理手段を備えること
により、Nウェイマージ処理を行う際の各ノード群への
処理の振り分けを行う。これにより、上記のような場合
には、ノード11〜15に均等にデータ分割することが
でき、処理時間が均等になる。
Next, a method of distributing the processing of the node 12 to each node group in FIG. 1 will be described with reference to FIG. FIG. 5 is an explanatory diagram showing a method of assigning data to each node group in the data distribution processing. As a premise, a node group that performs data extraction / data distribution processing includes ten nodes 1 to 10 including processors 200 to 230 and disk devices 201 to 231. Further, it is assumed that the node group performing the coupling process includes five nodes 11 to 15 each including processors 240 to 250 and disk devices 241 to 251. The dictionary 50 stores optimization information 51 on the join column. The optimization information 51 is information for equally dividing the data in the database. For example, since the number of data items for the join column is usually not uniform, it is necessary to divide the data by the join column so that the number of data items becomes uniform. Is what you do. As shown in FIG. 5, the data stored in the nodes 1 to 10 can be equally divided in the respective divided ranges from v1 to v10. In this case, nodes 11 to
V1 to v2, v3
Node numbers 11, 12, 13, 14, and 15 in five sections of 〜v4, v5 to v6, v7 to v8, and v9 to v10, respectively.
What is necessary is just to provide the distribution processing means which matches. If the optimization information does not exist, an appropriate hash function may be set to perform data distribution. In this way, the node 12 in FIG. 1 includes the distribution processing means, and distributes the processing to each node group when performing the N-way merge processing. As a result, in the case described above, data can be equally divided into the nodes 11 to 15, and the processing time becomes equal.

【0057】つぎに、Nウェイマージ処理を行う際の結
合ノード数の決定方法について図6を参照して説明す
る。図6は、結合ノード数決定方法を説明するための概
要図を示している。
Next, a method of determining the number of connected nodes when performing the N-way merge process will be described with reference to FIG. FIG. 6 is a schematic diagram illustrating a method for determining the number of connected nodes.

【0058】図1における並列結合処理の各フェーズ、
各処理の処理時間をグラフ化し、図4に示す並列パイプ
ライン動作概要に合わせてレイアウトしている。図6に
おいて、データ取り出し/データ分配処理が、ノード1
〜8で実行され、300〜305の処理時間がそれぞれ
かかるものとする。ここでは、ノード5の処理時間30
4が最大処理時間であるとする。スロットソート処理時
間は、結合処理ノード数Nと、予め決められたシステム
特性(CPU性能、ディスク装置性能等)と、データベ
ース演算方法とから導けることができ、スロットソート
処理の性能特性は一般的に下記に示すような式で求める
ことができる。
Each phase of the parallel connection processing in FIG.
The processing time of each process is graphed and laid out in accordance with the outline of the parallel pipeline operation shown in FIG. In FIG. 6, the data extraction / data distribution processing
To 8 and processing time of 300 to 305, respectively. Here, the processing time 30 of the node 5
4 is the maximum processing time. The slot sort processing time can be derived from the number N of coupling processing nodes, predetermined system characteristics (CPU performance, disk device performance, and the like), and a database operation method. It can be obtained by the following equation.

【0059】[0059]

【数1】E=a/N+b*N+c パイプライン処理を行う際の効果を最大にするために、
スロットソート処理の性能特性と最大処理時間304と
の交点となる結合ノード割当て数350をノード数とし
て求めることができる。結合ノード割当て数350が決
まると、Nウェイマージ処理時間320および突き合わ
せ処理時間330が、Nウェイマージ処理の性能特性と
突き合わせ処理の性能特性とから同様に推定できる。こ
れらの処理時間の合計が問い合わせに対する全体の処理
時間となる。このように結合ノード数を決定し、データ
取り出し/データ分配処理において分配されたデータを
逐次マージして同時に処理することにより、全体の処理
時間(問い合わせをしてから出力されるまでの応答時
間)を短縮することができる。
E = a / N + b * N + c In order to maximize the effect when performing the pipeline processing,
It is possible to determine the number of connected nodes 350, which is the intersection between the performance characteristics of the slot sorting process and the maximum processing time 304, as the number of nodes. When the number of connection nodes 350 is determined, the N-way merge processing time 320 and the matching processing time 330 can be similarly estimated from the performance characteristics of the N-way merge processing and the matching processing. The sum of these processing times is the total processing time for the inquiry. In this manner, the number of connection nodes is determined, and the data distributed in the data fetching / data distribution processing are sequentially merged and simultaneously processed, so that the entire processing time (response time from inquiring to output). Can be shortened.

【0060】結合ノード数を決定する場合に用いられる
性能特性の具体例を以下に示しておく。例えば、ロウ数
が表T1および表T2とも10、000、000件あ
り、条件数がT1−1コ(全体ロウが1%に絞られる)
とし、データ取り出し/データ分配処理をする分配ノー
ド数が表T1および表T2ともそれぞれ16ノードで均
等分割され、結合ノード数が8ノードで、プロセッサ性
能が50MIPS(1秒間に5千万命令実行)で、ネッ
トワーク転送レートが20Mバイト/秒であるとする。
このような条件で実際のデータベース管理システムに処
理させた結果もしくは性能モデルから算出した結果が以
下のようになる。
Specific examples of performance characteristics used when determining the number of connection nodes will be described below. For example, the number of rows is 10,000,000 in both Table T1 and Table T2, and the number of conditions is T1-1 (the total number of rows is reduced to 1%).
The number of distribution nodes for data extraction / data distribution processing is equally divided into 16 nodes in each of Tables T1 and T2, the number of connection nodes is 8, and the processor performance is 50 MIPS (50 million instructions executed per second). Suppose that the network transfer rate is 20 Mbytes / sec.
The result of processing by the actual database management system under such conditions or the result calculated from the performance model is as follows.

【0061】表T1および表T2の分配ノードの処理時
間がそれぞれ180秒、T1/T2スロットソート処理
時間が80秒、Nウェイマージ処理時間が380秒、突
き合わせ処理時間が110秒、要求データ出力時間が1
0秒となる。これらの結果の処理性能に基づいて問い合
わせに対する処理時間を推定する。
The processing time of the distribution nodes in Table T1 and Table T2 is 180 seconds, the T1 / T2 slot sort processing time is 80 seconds, the N-way merge processing time is 380 seconds, the matching processing time is 110 seconds, and the requested data output time is Is 1
0 seconds. The processing time for the inquiry is estimated based on the processing performance of these results.

【0062】つぎに、図6に示した結合ノード数決定方
法を基にして、応答時間をさらに短縮するための処理時
間調整方法(チューニング方法)について、図7、図8
および図9を参照して説明する。以下に示す方法は、上
記ノード12の分配処理手段において、各ノード群への
処理の振り分けを決定する際にあらかじめ算出されて、
その結果より振り分けを決定するものである。
Next, a processing time adjustment method (tuning method) for further reducing the response time based on the connection node number determination method shown in FIG. 6 will be described with reference to FIGS.
This will be described with reference to FIG. The method described below is calculated in advance when the distribution processing means of the node 12 determines the distribution of processing to each node group,
The distribution is determined from the result.

【0063】図7は、スロットソート前処理化の概要図
を示す。データ取り出し/データ分配処理が、ノード1
〜8で実行され、各300〜305の処理時間がそれぞ
れかかるものとする。ノードごとの処理時間には各表の
データ数によりバラツキが存在する。また、スロットソ
ート処理は、結合処理ノード群で実行されるように設定
されている。ノードごとの処理時間でバラツキがある場
合には、データ取り出し/データ分配処理ノード群へス
ロットソート処理を移す処理手順を考える。図7に、ス
ロットソートの前処理化として示すように、データ取り
出し/データ分配処理がより早く終了したノードでスロ
ットソート処理を行う。その処理によれば、結合ノード
割当て数350のノードにおけるスロットソート処理時
間が310から312に削減できる。その処理時間の差
311においてNウェイマージ処理を移す。これは、ス
ロットソート処理の連長を延ばすことにほかならない。
これによって、Nウェイマージ処理時間が削減でき、結
果的に応答時間が削減できる。
FIG. 7 is a schematic diagram showing the slot sorting preprocessing. Data retrieval / data distribution processing is performed on node 1
8 and the processing time of each of 300 to 305 is required. The processing time for each node varies depending on the number of data in each table. In addition, the slot sorting process is set to be executed in a group of the joining processing nodes. If there is a variation in the processing time for each node, consider a processing procedure for transferring the slot sort processing to the data extraction / data distribution processing node group. As shown in FIG. 7 as the preprocessing of the slot sort, the slot sort processing is performed at the node where the data extraction / data distribution processing ends earlier. According to this processing, the slot sort processing time at the node having the number of assigned joint nodes 350 can be reduced from 310 to 312. At the processing time difference 311, the N-way merge processing is shifted. This is nothing short of extending the run length of the slot sort process.
As a result, the N-way merge processing time can be reduced, and as a result, the response time can be reduced.

【0064】図8は、スロットソート連長チューニング
概要図を示している。例えば処理時間の制約があったと
きなどのように、その時間内で複数の処理を行う場合に
おいて、各ノードで実行する各データベース演算をパラ
メータ化し、期待する処理時間に基づいて時間調整(チ
ューニング)をする方法について説明する。図6で求ま
る結合ノード割当て数350から最小限だけ結合処理ノ
ードを増やし、応答時間の短縮を図る。この場合の結合
ノード割当て数を351とする。結合ノード割当て数3
51とすると、スロットソート処理時間は310から3
12へ削減される。パイプライン効果を最大にするた
め、処理時間311においてNウェイマージ処理をスロ
ットソート処理へ移す。これによって、Nウェイマージ
処理のマージ回数が減り、処理時間が320と削減で
き、結果的に応答時間が削減できる。
FIG. 8 shows a schematic diagram of the slot sort run length tuning. For example, when a plurality of processes are performed within the time, such as when there is a restriction on the processing time, each database operation to be executed at each node is parameterized, and time adjustment (tuning) is performed based on the expected processing time. A method for performing the above will be described. The number of connection processing nodes is increased to a minimum from the number of connection node assignments 350 obtained in FIG. 6 to shorten the response time. In this case, it is assumed that the number of assigned joint nodes is 351. Number of assigned joint nodes 3
If 51, the slot sort processing time is 310 to 3
It is reduced to 12. In order to maximize the pipeline effect, the N-way merge processing is shifted to the slot sort processing in the processing time 311. As a result, the number of merges in the N-way merge process is reduced, the processing time can be reduced to 320, and as a result, the response time can be reduced.

【0065】図9は、Nウェイマージ回数チューニング
の概要図を示す。結合ノード割当て数350で決まる突
き合わせ処理時間330が要求データ出力処理時間34
0より小である場合には、Nウェイマージ処理の最終段
のマージ処理を突き合わせ処理に移すようにできる。N
ウェイマージ処理の最終段のマージ処理時間331と突
き合わせ処理時間330との和が要求データ出力処理時
間340を上回らなければ、当最終段のマージ処理を突
き合わせ処理へ移す。これによって、応答時間が削減で
きる。
FIG. 9 shows a schematic diagram of N-way merge count tuning. The matching data processing time 330 determined by the number of connection node assignments 350 is the required data output processing time 34
If it is smaller than 0, the merge processing at the last stage of the N-way merge processing can be shifted to the matching processing. N
If the sum of the merge processing time 331 of the last stage of the way merge process and the matching process time 330 does not exceed the required data output processing time 340, the merge process of the final stage is shifted to the matching process. Thereby, the response time can be reduced.

【0066】つぎに、本実施例におけるデータベース管
理システムの動作フローを説明する。図10、図11、
図12、図13、図14および図15は、本実施例にお
けるDBMSの処理のフロ−チャ−トを示す。図10に
おいて、DBMSは、問合せ実行前に行われる問合せの
解析処理(ステップ220)、静的最適化処理(ステッ
プ221)およびコード生成(ステップ222)により
問い合わせ解析を行う問合せ解析処理400と、変数に
定数を代入し、処理手順を選択する動的最適化処理(ス
テップ223)および問合せのコード解釈実行(ステッ
プ224)により問い合わせに対する実行処理を行う問
合せ実行処理410とを行う。
Next, an operation flow of the database management system in the present embodiment will be described. FIG. 10, FIG. 11,
FIGS. 12, 13, 14 and 15 show flowcharts of the processing of the DBMS in this embodiment. In FIG. 10, the DBMS includes a query analysis process 400 for performing query analysis by query analysis performed before query execution (step 220), a static optimization process (step 221), and code generation (step 222); And a query execution process 410 for executing a query by interpreting the code by executing a dynamic optimization process (step 223) and selecting a processing procedure (step 223).

【0067】以下、各処理部の概要について述べる。The outline of each processing unit will be described below.

【0068】(a)問合せ解析処理400 図10(a)および(c)において、問合せ解析(ステ
ップ220)では、上記ノード12においてアプリケー
ションプログラムにより入力された問合せ文の構文解
析、意味解析を実行する(ステップ2200)。図10
(a)において静的最適化処理(ステップ221)で
は、上記ノード12において問合せで出現する条件式か
ら条件を満足するデ−タの割合を推定し、予め設定して
いる規則を基に、有効なアクセスパス候補(特にインデ
クスを選出する)を作成し、処理手順の候補を作成す
る。コード生成(ステップ222)では、上記ノード1
2において処理手順候補を実行形式に展開する。
(A) Query Analysis Processing 400 In FIGS. 10A and 10C, in query analysis (step 220), syntax analysis and semantic analysis of a query sentence input by an application program in the node 12 are executed. (Step 2200). FIG.
In (a), in the static optimization process (step 221), the ratio of data that satisfies the condition is estimated from the conditional expression appearing in the query at the node 12, and the effective ratio is estimated based on a preset rule. In this case, an access path candidate (particularly, an index is selected) is created, and a candidate for a processing procedure is created. In the code generation (step 222), the node 1
In step 2, the processing procedure candidates are developed into an executable form.

【0069】(b)問合せ実行処理410 図10(b)において、動的実行時最適化(ステップ2
23)では、上記ノード12において代入された定数に
基づき、各ノード群で実行する処理手順を決定する。コ
ード解釈実行(ステップ224)では、それぞれのノー
ドにおいて処理手順を解釈し、実行する。
(B) Query Execution Processing 410 In FIG. 10B, dynamic execution optimization (step 2)
In 23), a processing procedure to be executed in each node group is determined based on the constant substituted in the node 12. In the code interpretation execution (step 224), the processing procedure is interpreted and executed in each node.

【0070】つぎに、各処理部の詳細な処理フローの説
明を行う。
Next, a detailed processing flow of each processing unit will be described.

【0071】図10(d)において、動的最適化処理
(ステップ221)では、問合せに出現する条件式の述
語選択率推定し(ステップ2210)、インデクス等か
らなるアクセスパスの剪定をし(ステップ2211)、
これらアクセスパスを組合せた処理手順候補の生成をす
る(ステップ2212)。
In FIG. 10D, in the dynamic optimization processing (step 221), a predicate selection rate of a conditional expression appearing in a query is estimated (step 2210), and an access path including an index or the like is pruned (step 2210). 2211),
A processing procedure candidate combining these access paths is generated (step 2212).

【0072】図10(e)において、述語選択率推定
(ステップ2210)では、問合せ条件式に変数が出現
するか否かチェックする(ステップ22101)。変数
が出現すれば、当条件式にカラム値分布情報があるかチ
ェックする(ステップ22104)。存在すれば終了す
る。存在しなければ、条件式の種別に応じてディフォル
ト値を設定し(ステップ22105)、終了する。変数
が出現しなければ、当条件式にカラム値分布情報がある
かチェックする(ステップ22104)。存在しなけれ
ば、条件式の種別に応じてディフォルト値を設定し(ス
テップ22105)、終了する。存在すれば、カラム値
分布情報を用いて選択率を算出する(ステップ2210
3)。
In FIG. 10E, in the predicate selection rate estimation (step 2210), it is checked whether or not a variable appears in the query conditional expression (step 22101). If a variable appears, it is checked whether the conditional expression has column value distribution information (step 22104). If present, terminate. If not, a default value is set according to the type of the conditional expression (step 22105), and the process ends. If the variable does not appear, it is checked whether the conditional expression has column value distribution information (step 22104). If not, a default value is set according to the type of the conditional expression (step 22105), and the process ends. If there is, the selectivity is calculated using the column value distribution information (step 2210).
3).

【0073】図11において、アクセスパス剪定221
2では、問合せ条件式で出現するカラムのインデクスを
アクセスパス候補として登録する(ステップ2212
0)。つぎに、問合せでアクセス対象となる表が複数ノ
ードに分割格納されているかチェックする(ステップ2
2121)。分割格納されていれば、パラレルテーブル
スキャンをアクセスパス候補として登録する(ステップ
22123)。分割格納されていなければ、テ−ブルス
キャンをアクセスパス候補として登録する(ステップ2
2123)。各条件式の選択率が既に設定済みか否かチ
ェックする(ステップ22124)。設定済みであれ
ば、各表に関して選択率が最小となる条件式のインデク
スをアクセスパスの最優先度とする(ステップ2212
5)。設定済みでなければ、各条件式の選択率の最大値
/最小値を取得する(ステップ22126)。最後に、
CPU性能、IO性能等のシステム特性より各アクセス
パスの選択基準を算出し(ステップ22127)、単一
あるいは複数のインデクスを組合せたアクセスパスでの
選択率が上記選択基準を下回るものだけアクセスパス候
補として登録する(ステップ22128)。
In FIG. 11, access path pruning 221
In step 2, the index of the column appearing in the query conditional expression is registered as an access path candidate (step 2212).
0). Next, it is checked whether the table to be accessed by the query is divided and stored in a plurality of nodes (step 2).
2121). If divided and stored, the parallel table scan is registered as an access path candidate (step 22123). If not, the table scan is registered as an access path candidate (step 2).
2123). It is checked whether or not the selectivity of each conditional expression has already been set (step 22124). If set, the index of the conditional expression that minimizes the selectivity for each table is set as the highest priority of the access path (step 2212).
5). If not already set, the maximum / minimum value of the selectivity of each conditional expression is obtained (step 22126). Finally,
A selection criterion for each access path is calculated from system characteristics such as CPU performance and IO performance (step 22127). (Step 22128).

【0074】図12において、処理手順候補生成221
3は、問合せでアクセス対象となる表が複数ノードに分
割格納されているかチェックする(ステップ2213
0)。分割格納されていれば、ステップ22135へ移
行する。分割格納されていなければ、処理手順候補にソ
ート処理が含まれているか否かをチェックする(ステッ
プ22131)。含まれていれば、ステップ22135
へ移行する。含まれていなければ、問合せでアクセス対
象となる表のアクセスパスが唯一であるかチェックし
(ステップ22132)、唯一であれば単一の処理手順
を作成し(ステップ22133)、唯一でなければ複数
の処理手順を作成し(ステップ22134)、終了す
る。ステップ22135では、結合可能な2ウェイ結合
へ問合せを分解する。分割格納される表の格納ノード群
に対応して、データ読みだし/データ分配処理手順を候
補として登録する。また、スロットソート処理手順を候
補として登録する(ステップ22136)。結合処理ノ
ード群に対応して、スロットソート処理手順、Nウェイ
マージ処理手順および突き合わせ処理手順を候補として
登録し、スロットソート連長およびマージ処理回数をパ
ラメタ化しておく(ステップ22137)。要求データ
出力ノードに要求データ出力処理手順を登録する(ステ
ップ22138)。最後に、分解結果に対して評価がす
べて終了すれば(ステップ22139)、終了する。
In FIG. 12, processing procedure candidate generation 221
3 checks whether the table to be accessed by the query is divided and stored in a plurality of nodes (step 2213)
0). If divided and stored, the process proceeds to step 22135. If it is not divided and stored, it is checked whether or not the sorting procedure is included in the processing procedure candidate (step 22131). If included, step 22135
Move to. If not, it is checked whether the access path of the table to be accessed by the query is unique (step 22132). If it is unique, a single processing procedure is created (step 22133). Is created (step 22134), and the process ends. In step 22135, the query is decomposed into two-way joins that can be joined. The data reading / data distribution processing procedure is registered as a candidate corresponding to the storage node group of the table to be divided and stored. Also, the slot sorting procedure is registered as a candidate (step 22136). A slot sort procedure, an N-way merge procedure, and a matching procedure are registered as candidates for the join processing node group, and the slot sort run length and the number of merge processes are parameterized (step 22137). The request data output procedure is registered in the request data output node (step 22138). Finally, when all the evaluations for the decomposition result have been completed (step 22139), the process ends.

【0075】図13において、コード生成222は、処
理手順候補が唯一か否かをチェックする(ステップ22
20)。唯一であれば、ステップ2223へ移行する。
唯一でなければ、カラム値分布情報等からなる最適化情
報を処理手順に埋込み(ステップ2221)、問合せ実
行時に代入された定数に基づいて処理手順を選択するデ
ータ構造を作成する(ステップ2222)。最後に、処
理手順を実行形式へ展開する(ステップ2223)。
In FIG. 13, the code generation 222 checks whether or not the processing procedure candidate is unique (step 22).
20). If it is unique, the process proceeds to step 2223.
If it is not unique, the optimization information including the column value distribution information is embedded in the processing procedure (Step 2221), and a data structure for selecting the processing procedure based on the constant assigned at the time of executing the query is created (Step 2222). Finally, the processing procedure is developed into an executable form (step 2223).

【0076】図14において、動的最適化処理223
は、作成されている処理手順が単一か否かをチェックす
る(ステップ22300)。単一であれば、終了する。
単一でなければ、代入された定数を基に選択率を算出す
る(ステップ22301)。処理手順候補に並列な処理
手順が含まれるか否かチェックする(ステップ2230
2)。含まれていなければ、アクセスパスの選択基準に
従って処理手順を選択し(ステップ22313)、終了
する。含まれていれば、ディクショナリから最適化情報
(結合カラムのカラム値分布情報、アクセス対象となる
表のロウ数、ページ数等)を入力し(ステップ2230
3)、データ取り出し/データ分配のための処理時間を
各システム特性を考慮し、前述したように算出する(ス
テップ22304)。当処理時間から結合処理に割当て
るノード数pを決定し、当処理手順a1を決定する(ス
テップ22305)。データ取り出し/データ分配処理
時間にバラツキがあるか否かをチェックする(ステップ
22306)。バラツキがあれば、データ取り出し/デ
ータ分配処理ノード群でスロットソート処理を実行する
処理手順a2を設定する(ステップ22307)。つぎ
に、結合ノード割当て数pをα台だけ増した処理手順a
3を設定する(ステップ22308)。要求データ処理
時間が突き合わせ処理時間と1回分のNウェイマージ処
理時間との和より大であれば(ステップ22309)、
突き合わせ処理へ1回分のNウェイマージ処理を移した
処理手順a4を設定する(ステップ22310)。処理
手順a1〜a4で最適な処理手順を応答時間最小、各ノ
ード負荷量最小、他トランザクション応答性能への影響
小等の観点で選択する(ステップ22311)。データ
分配情報を最適化情報を基にして作成する(ステップ2
2312)。最適化情報がなければ、ハッシュ関数の結
合カラム評価値に従い、データ分配情報を作成する。ア
クセスパスの選択基準に従って処理手順を選択し(ステ
ップ22313)、終了する。
In FIG. 14, dynamic optimization processing 223
Checks whether the created processing procedure is single (step 22300). If it is single, it ends.
If not, the selectivity is calculated based on the substituted constant (step 22301). It is checked whether or not the candidate processing procedure includes a parallel processing procedure (step 2230).
2). If not included, the processing procedure is selected according to the access path selection criteria (step 22313), and the process ends. If it is included, the optimization information (column value distribution information of the join column, the number of rows of the table to be accessed, the number of pages, etc.) is input from the dictionary (step 2230).
3) The processing time for data extraction / data distribution is calculated as described above in consideration of each system characteristic (step 22304). The number of nodes p to be allocated to the combining process is determined from the processing time, and the processing procedure a1 is determined (step 22305). It is checked whether there is a variation in the data retrieval / data distribution processing time (step 22306). If there is a variation, a processing procedure a2 for executing the slot sort processing in the data extraction / data distribution processing node group is set (step 22307). Next, a processing procedure a in which the number p of connected nodes is increased by α
3 is set (step 22308). If the requested data processing time is larger than the sum of the matching processing time and the N-way merge processing time for one time (step 22309),
A processing procedure a4 in which one N-way merge process is transferred to the matching process is set (step 22310). The optimum processing procedure is selected from the processing procedures a1 to a4 from the viewpoints of the minimum response time, the minimum load on each node, and the small effect on other transaction response performance (step 22311). Create data distribution information based on optimization information (step 2
2312). If there is no optimization information, data distribution information is created according to the join column evaluation value of the hash function. The processing procedure is selected according to the access path selection criteria (step 22313), and the process ends.

【0077】図15において、コード解釈実行処理22
4では、設定された各ノードにおいてそれぞれ対応する
処理手順にしたがって処理を行う。
In FIG. 15, the code interpretation execution processing 22
In step 4, processing is performed according to the processing procedure corresponding to each set node.

【0078】まず、各ノードでは、データ取り出し/デ
ータ分配処理が設定されているか否かを判断する(ステ
ップ22400)。データ取り出し/データ分配処理が
設定されていれば、各ノードの記憶装置に格納されてい
るデータベースにアクセスし、条件式を評価する(ステ
ップ22401)。最適化情報を基に作成されたデータ
分配情報に基づいて、データを取り出し、各結合ノード
のバッファへ逐次データを分配する(ステップ2240
2)。各結合ノードのバッファが満杯か否かを判定し、
満杯であれば、ページ形式で対応する結合ノードへ転送
する。問い合わせに対応する全てのデータを取り出して
分配すると処理が終了する(ステップ22404)。
First, each node determines whether or not data fetching / data distribution processing is set (step 22400). If the data extraction / data distribution processing is set, the database accessing the storage device of each node is accessed and the conditional expression is evaluated (step 22401). Data is taken out based on the data distribution information created based on the optimization information, and the data is sequentially distributed to the buffers of the connection nodes (step 2240).
2). Determine whether the buffer of each join node is full,
If it is full, it is transferred in page format to the corresponding join node. When all the data corresponding to the inquiry is extracted and distributed, the process ends (step 22404).

【0079】また、各ノードでは、スロットソート処理
が設定されているか否かを判断する(ステップ2240
5)。スロットソート処理が設定されていれば、前記デ
ータ取り出し/データ分配処理ノードからのページ形式
のデータを受信し、(ステップ22406)受信したデ
ータについて順次スロットソート処理を行う(ステップ
22407)。処理したスロットソート結果を一時保存
しておき、スロットソート処理を終了する(ステップ2
2408)。
In each node, it is determined whether or not slot sort processing is set (step 2240).
5). If the slot sort processing has been set, page format data is received from the data extraction / data distribution processing node (step 22406), and the received data is sequentially subjected to slot sort processing (step 22407). The processed slot sort result is temporarily stored, and the slot sort process ends (step 2).
2408).

【0080】また、Nウェイマージ処理が設定されてい
るか否かを判断する(ステップ22409)。Nウェイ
マージ処理が設定されていれば、スロットソート結果に
基づいてNウェイマージ処理を実行し(ステップ224
10)、Nウェイマージ処理結果をバッファなどに一時
保存し(ステップ22411)、Nウェイマージ処理を
終了する。
It is determined whether the N-way merge process has been set (step 22409). If N-way merge processing is set, N-way merge processing is executed based on the slot sort result (step 224).
10), the result of the N-way merge process is temporarily stored in a buffer or the like (step 22411), and the N-way merge process ends.

【0081】また、突き合わせ処理が設定されているか
否かを判断する(ステップ22412)。突き合わせ処
理が設定されていれば、Nウェイマージ処理結果のソー
トリストを突き合わせ、出力用バッファにデータを設定
する(ステップ22413)。出力用バッファが満杯の
場合には、ページ形式で要求データ出力ノードへ転送す
る(ステップ22415)。
Further, it is determined whether or not the matching process is set (step 22412). If the matching process is set, the sort list of the N-way merge process result is matched, and data is set in the output buffer (step 22413). If the output buffer is full, it is transferred to the request data output node in page format (step 22415).

【0082】また、要求データ出力処理が設定されてい
るか否かを判断する(ステップ22416)。要求デー
タ出力処理が設定されていれば、結合ノードからページ
形式のデータの転送があるかないかを判断する(ステッ
プ22417)。ページ形式のデータの転送がある場合
には、該ページ形式のデータを受信し(ステップ224
18)、アプリケーションプログラムへ問い合わせ処理
結果を出力し、ページ形式のデータ転送がない場合には
そのまま問い合わせ処理結果を出力する(ステップ22
419)。
Further, it is determined whether or not the request data output process is set (step 22416). If the request data output process has been set, it is determined whether or not there is a page format data transfer from the connection node (step 22417). If the data in the page format is transferred, the data in the page format is received (step 224).
18) Output the query processing result to the application program, and if there is no page format data transfer, output the query processing result as it is (step 22)
419).

【0083】また、上記コード解釈実行処理において、
処理時間にバラツキがある場合などのときにデータ取り
出し/データ分配処理ノード群でスロットソート処理を
実行する場合には、データ取り出し/データ分配処理終
了後、コード解釈実行処理224を再度実行し、スロッ
トソート処理を行うようにする。
In the above code interpretation execution processing,
When slot sorting is performed in the data extraction / data distribution processing node group when the processing time varies, the code interpretation execution processing 224 is executed again after the data extraction / data distribution processing is completed. Perform sort processing.

【0084】さらに、ステップ22413でNウェイマ
ージ処理結果が完全ソート列でなければ、最終段のマー
ジと突き合わせ処理とを行う。
Further, if the result of the N-way merge processing is not a complete sort sequence in step 22413, the merge and matching processing of the last stage are performed.

【0085】以上のように処理することによりデータベ
ース管理システムの問い合わせ応答時間を短縮すること
ができる。
By performing the above processing, the inquiry response time of the database management system can be reduced.

【0086】図6に示す結合ノード割当て方法と、図
7、図8および図9に示すチューニング方法とは、各々
独立に適用してもよいし、また任意の組合せで適用して
もよい。すなわち、動的最適化処理223では、すべて
の組合せが適用できる場合を想定している。さらに、デ
ータ取り出し処理においては、複数ディスク装置からな
る並列入出力アクセス方法の適用と、一括入出力方法/
先読み入出力方法の適用と、データ分配処理に最適化情
報あるいはハッシュ関数によるデータ分配方法の適用
と、Nウェイマージ処理に並列ソート方法の適用と、突
き合わせ処理にノード間での突き合わせ処理方法の適用
と、要求データ出力処理に複数のノードを割当て並列受
け取り処理方法の適用等も考えられる。上記ステップ2
2309およびステップ22310では、1回分のNウ
ェイマージ処理を仮定しているが、一般的にn回(n≧
1)としてもよい。
The method for allocating joint nodes shown in FIG. 6 and the method for tuning shown in FIGS. 7, 8 and 9 may be applied independently or in any combination. That is, in the dynamic optimization process 223, it is assumed that all combinations can be applied. Further, in the data retrieval processing, application of a parallel input / output access method including a plurality of disk devices,
Applying a prefetch input / output method, applying a data distribution method using optimization information or a hash function to data distribution processing, applying a parallel sorting method to N-way merge processing, and applying a matching processing method between nodes to matching processing It is also conceivable to assign a plurality of nodes to the request data output processing and apply a parallel reception processing method. Step 2 above
In step 2309 and step 22310, one N-way merge process is assumed, but generally n times (n ≧ n)
It may be 1).

【0087】図4に示す並列パイプライン動作に関し
て、上記図6に示した結合ノード割当て方法と、図7、
図8および図9に示すチューニング方法とを適用する
と、取り出しフェーズ、マージフェーズ、結合フェーズ
の内、マージフェーズが省略可能となる場合も存在す
る。すなわち、スロットソート連長の延び、Nウェイマ
ージ処理の移動により可能となる。この場合、問合せ実
行処理でもマージフェーズの処理を省略する。
Regarding the parallel pipeline operation shown in FIG. 4, the connection node assignment method shown in FIG.
Applying the tuning methods shown in FIGS. 8 and 9 may make it possible to omit the merge phase among the extraction phase, the merge phase, and the join phase. That is, it becomes possible by extending the slot sort run length and moving the N-way merge process. In this case, the merge phase process is omitted from the query execution process.

【0088】本発明の問合せ処理方法は、統計情報を用
いた規則とコスト評価との併用に限らず、適当なデ−タ
ベ−ス参照特性情報を与える処理手順が得られるもので
あれば適用できる。例えば、コスト評価のみ、規則利用
のみ、コスト評価と規則利用の併用等の最適化処理を行
うDBMSにも適用できる。
The query processing method of the present invention is not limited to the use of the rule using the statistical information and the cost evaluation, but may be applied to any method that can provide a processing procedure for giving appropriate database reference characteristic information. . For example, the present invention can also be applied to a DBMS that performs optimization processing such as cost evaluation only, rule use only, and cost evaluation and rule use together.

【0089】本発明は、密結合/疎結合マルチプロセッ
サシステム大型計算機のソフトウェアシステムを介して
実現することも、また、各処理部のために専用プロセッ
サが用意された密結合/疎結合複合プロセッサシステム
を介して実現することも可能である。また、単一プロセ
ッサシステムでも、各処理手順のために並列なプロセス
を割当てていれば、適用可能である。
The present invention can be realized through a software system of a large-scale computer with a tightly-coupled / loosely-coupled multiprocessor system. It is also possible to realize through. Further, the present invention is applicable to a uniprocessor system as long as parallel processes are allocated for each processing procedure.

【0090】本実施例によれば、各ノードで実行するデ
ータベース演算に対応して各ノード数を決定し、また、
データの分割にバラツキが存在する場合、各ノードへデ
ータを均等に分割させ、各ノードで実行する各データベ
ース演算をパラメタ化し、期待する処理時間均等化させ
るので、各ノード間で処理時間の偏りがなく、円滑にパ
イプライン動作させることが可能となり、高速な問合せ
処理が実現可能となる。
According to the present embodiment, the number of each node is determined according to the database operation executed at each node.
If there is variation in the data division, the data is equally divided into each node, each database operation executed in each node is parameterized, and the expected processing time is equalized. And a smooth pipeline operation can be performed, and high-speed inquiry processing can be realized.

【0091】[0091]

【発明の効果】各ノードで実行するデータベース演算に
対応して各ノード数を決定し、各ノードへデータを均等
に分割させ、各ノードで実行する処理時間均等化させる
ので、各ノード間で処理時間の偏りがなく、高速化な問
合せ処理を実現することができる。
According to the present invention, the number of each node is determined according to the database operation executed at each node, the data is equally divided among the nodes, and the processing time executed at each node is equalized. High-speed inquiry processing without time deviation can be realized.

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

【図1】 並列結合処理概要図[Fig. 1] Schematic diagram of parallel connection processing

【図2】 データベースシステムの構成図FIG. 2 is a configuration diagram of a database system.

【図3】 ハードウェア構成図FIG. 3 is a hardware configuration diagram.

【図4】 並列パイプライン動作の概要図FIG. 4 is a schematic diagram of a parallel pipeline operation.

【図5】 データ分配処理概要図FIG. 5 is a schematic diagram of data distribution processing.

【図6】 結合ノード割当て概要図FIG. 6 is a schematic diagram of a joint node assignment

【図7】 スロットソート前処理化概要図FIG. 7 is a schematic diagram of slot sort preprocessing.

【図8】 スロットソート連長チューニング概要図FIG. 8 Schematic diagram of slot sort run length tuning

【図9】 Nウェイマージ回数チューニング概要図FIG. 9 is a schematic diagram of N-way merge count tuning

【図10】 データベース管理システムのフローチャー
FIG. 10 is a flowchart of a database management system.

【図11】 データベース管理システムのフローチャー
FIG. 11 is a flowchart of a database management system.

【図12】 データベース管理システムのフローチャー
FIG. 12 is a flowchart of a database management system.

【図13】 データベース管理システムのフローチャー
FIG. 13 is a flowchart of a database management system.

【図14】 データベース管理システムのフローチャー
FIG. 14 is a flowchart of a database management system.

【図15】 データベース管理システムのフローチャー
FIG. 15 is a flowchart of a database management system.

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

10、11…アプリケーションプログラム、20…デー
タベース管理システム、22…論理処理部、220…問
合せ解析、221…静的最適化処理、222…コード生
成、223…動的最適化処理、224…コード解釈実
行、30…オペレーティングシステム、40…データベ
ース、50…ディクショナリ、80…相互結合ネットワ
ーク、90、91、92、93、94、95、96、9
7…ノード。
10, 11 application program, 20 database management system, 22 logical processing unit, 220 query analysis, 221 static optimization process, 222 code generation, 223 dynamic optimization process, 224 code execution , 30 operating system, 40 database, 50 dictionary, 80 interconnection network, 90, 91, 92, 93, 94, 95, 96, 9
7 ... Node.

───────────────────────────────────────────────────── フロントページの続き (72)発明者 根岸 和義 神奈川県川崎市麻生区王禅寺1099 株式会 社日立製作所システム開発研究所内 (72)発明者 鳥居 俊一 神奈川県川崎市麻生区王禅寺1099 株式会 社日立製作所システム開発研究所内 ──────────────────────────────────────────────────続 き Continued on the front page (72) Inventor Kazuyoshi Negishi 1099 Ozenji Temple, Aso-ku, Kawasaki City, Kanagawa Prefecture Inside Hitachi, Ltd.System Development Laboratory Co., Ltd. (72) Inventor Shunichi Torii 1099 Ozenji Temple, Aso-ku, Kawasaki City, Kanagawa Hitachi, Ltd. Inside the Manufacturing Systems Development Laboratory

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】取り出し要求に従って、格納されたデータ
を取り出して送出する複数の第1のノードと、 入力さ
れたデータベース演算要求にしたがって、前記第1のノ
ードから送出されたデータについてデータベース演算処
理を実行し、該データベース演算処理結果を出力する複
数の第2のノードと、入力された問い合わせ要求を解析
し、複数のデータベース演算要求を生成して前記第2の
ノードにそれぞれ分配し、前記データベース演算要求に
て対象となるデータの取り出し要求を複数生成し、当該
生成した取り出し要求を前記第1のノードにそれぞれ送
出し、前記データベース演算要求のデータベース演算処
理結果を、前記第2のノードからそれぞれ受け取り、前
記問い合わせ要求の処理結果を出力する第3のノードと
を有し、前記第2のノードは、当該データベース演算処
理の途中結果を一時格納する途中結果格納手段を備える
ことを特徴とするデータベース管理システム。
A plurality of first nodes for extracting and transmitting stored data in accordance with an extraction request; and performing a database operation process on the data transmitted from the first node in accordance with an input database operation request. A plurality of second nodes for executing and outputting the result of the database operation processing, analyzing the input query request, generating a plurality of database operation requests and distributing them to the second nodes, respectively, A plurality of retrieval requests for the target data are generated by the request, the generated retrieval requests are respectively sent to the first nodes, and a database operation processing result of the database operation request is received from the second node. And a third node that outputs a processing result of the inquiry request. Over de is a database management system, characterized in that it comprises an intermediate result storage means for temporarily storing intermediate results of the database processing.
【請求項2】複数の第1のノード、複数の第2のノード
および第3のノードを備えるデータベース管理システム
における問い合わせ方法であって、前記第1のノード
は、取り出し要求に従って、格納されたデータを取り出
して送出し、 前記第2のノードは、入力されたデータ
ベース演算要求にしたがって、前記第1のノードから送
出されたデータについてデータベース演算処理を実行
し、当該データベース演算処理の処理の途中結果を一時
格納し、前記データベース演算処理の処理結果を出力
し、第3のノードは、入力された問い合わせ要求を解析
し、複数のデータベース演算要求を生成して前記第2の
ノードにそれぞれ分配し、前記データベース演算要求に
て対象となるデータの取り出し要求を複数生成し、当該
生成した取り出し要求を前記第1のノードにそれぞれ送
出し、前記データベース演算要求のデータベース演算処
理結果を、前記第2のノードからそれぞれ受け取り、前
記問い合わせ要求の処理結果を出力することを特徴とす
る問い合わせ処理方法。
2. An inquiry method in a database management system comprising a plurality of first nodes, a plurality of second nodes, and a third node, wherein the first node stores data stored in accordance with a retrieval request. The second node performs a database operation process on the data transmitted from the first node in accordance with the input database operation request, and outputs an intermediate result of the database operation process. Temporarily storing and outputting the processing result of the database operation processing, the third node analyzes the input inquiry request, generates a plurality of database operation requests, and distributes the plurality of database operation requests to the second node, Generates multiple retrieval requests for the target data in the database operation request, and Query processing method sends to the first node, a database operation result of said database operation request, receiving from each of said second node, and outputs the processing result of the inquiry request.
JP17440498A 1998-06-22 1998-06-22 Database management system, database management apparatus, and query processing method Expired - Fee Related JP3732655B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP17440498A JP3732655B2 (en) 1998-06-22 1998-06-22 Database management system, database management apparatus, and query processing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP17440498A JP3732655B2 (en) 1998-06-22 1998-06-22 Database management system, database management apparatus, and query processing method

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP00780493A Division JP3266351B2 (en) 1993-01-20 1993-01-20 Database management system and query processing method

Related Child Applications (1)

Application Number Title Priority Date Filing Date
JP2000012280A Division JP2000148557A (en) 2000-01-01 2000-01-20 Database management system and enquiry processing method

Publications (2)

Publication Number Publication Date
JPH10326216A true JPH10326216A (en) 1998-12-08
JP3732655B2 JP3732655B2 (en) 2006-01-05

Family

ID=15977980

Family Applications (1)

Application Number Title Priority Date Filing Date
JP17440498A Expired - Fee Related JP3732655B2 (en) 1998-06-22 1998-06-22 Database management system, database management apparatus, and query processing method

Country Status (1)

Country Link
JP (1) JP3732655B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000330959A (en) * 1999-05-18 2000-11-30 Nec Corp Inquiry parallel processing system and machine-readable recording medium where program is recorded
JP2015531937A (en) * 2012-08-30 2015-11-05 シータス データ ビルギ イスレムレリ トゥカレット アー.エス. Working with distributed databases with external tables

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000330959A (en) * 1999-05-18 2000-11-30 Nec Corp Inquiry parallel processing system and machine-readable recording medium where program is recorded
JP2015531937A (en) * 2012-08-30 2015-11-05 シータス データ ビルギ イスレムレリ トゥカレット アー.エス. Working with distributed databases with external tables

Also Published As

Publication number Publication date
JP3732655B2 (en) 2006-01-05

Similar Documents

Publication Publication Date Title
JP3266351B2 (en) Database management system and query processing method
US6556988B2 (en) Database management apparatus and query operation therefor, including processing plural database operation requests based on key range of hash code
US6505187B1 (en) Computing multiple order-based functions in a parallel processing database system
US5325525A (en) Method of automatically controlling the allocation of resources of a parallel processor computer system by calculating a minimum execution time of a task and scheduling subtasks against resources to execute the task in the minimum time
US7103590B1 (en) Method and system for pipelined database table functions
US6477523B1 (en) Selectivity prediction with compressed histograms in a parallel processing database system
US11468061B2 (en) Incremental simplification and optimization of complex queries using dynamic result feedback
Terlecki et al. On improving user response times in tableau
US20160203409A1 (en) Framework for calculating grouped optimization algorithms within a distributed data store
JPH06309284A (en) Inquiry processing load distributing method
JP3538322B2 (en) Database management system and query processing method
JP3668243B2 (en) Database management system
JP4422697B2 (en) Database management system and query processing method
JP3732655B2 (en) Database management system, database management apparatus, and query processing method
JP3819694B2 (en) Database management system and query processing method
JP3819695B2 (en) Database management system and query processing method
JP3667997B2 (en) Database management device
JP2001147847A (en) Database management system and inquiry processing method
JP2000148557A (en) Database management system and enquiry processing method
Liu et al. DCODE: A distributed column-oriented database engine for big data analytics
JP3599055B2 (en) Storage device management method and system
JP3172793B1 (en) Database management method
JP3060225B2 (en) Database management method and system
JPH0778118A (en) Method for scheduling evasion of resource competition
JP3236999B2 (en) Database management method and system

Legal Events

Date Code Title Description
A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20050419

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20051013

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

Free format text: PAYMENT UNTIL: 20091021

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20091021

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20101021

Year of fee payment: 5

LAPS Cancellation because of no payment of annual fees