JP5244559B2 - Distributed index join method and system - Google Patents

Distributed index join method and system Download PDF

Info

Publication number
JP5244559B2
JP5244559B2 JP2008301691A JP2008301691A JP5244559B2 JP 5244559 B2 JP5244559 B2 JP 5244559B2 JP 2008301691 A JP2008301691 A JP 2008301691A JP 2008301691 A JP2008301691 A JP 2008301691A JP 5244559 B2 JP5244559 B2 JP 5244559B2
Authority
JP
Japan
Prior art keywords
list
processor
record
index
key value
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.)
Expired - Fee Related
Application number
JP2008301691A
Other languages
Japanese (ja)
Other versions
JP2010128721A (en
Inventor
純司 寺本
啓敏 須賀
尚也 小谷
健 山室
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.)
Nippon Telegraph and Telephone Corp
Original Assignee
Nippon Telegraph and Telephone Corp
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 Nippon Telegraph and Telephone Corp filed Critical Nippon Telegraph and Telephone Corp
Priority to JP2008301691A priority Critical patent/JP5244559B2/en
Publication of JP2010128721A publication Critical patent/JP2010128721A/en
Application granted granted Critical
Publication of JP5244559B2 publication Critical patent/JP5244559B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

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

Description

本発明は、分散インデックス結合方法及びシステムに係り、特に、ネットワーク上の分散システムにおけるリレーショナル・データベースのインデックス同士を結合するための分散インデックス結合システム及び方法及びプログラムに関する。詳しくは、リレーショナル・データベースのインデックス同士がコンピュータ内部のバス転送速度と比べて遅いネットワークで接続されている分散システムにおける分散インデックス結合方法及びシステムに関する。   The present invention relates to a distributed index joining method and system, and more particularly to a distributed index joining system, method and program for joining indexes of relational databases in a distributed system on a network. More specifically, the present invention relates to a distributed index combination method and system in a distributed system in which indexes of a relational database are connected to each other via a network that is slower than a bus transfer speed inside a computer.

従来、リレーショナル・データベース同士の結合操作を実行するためのアルゴリズムとして、順次2つのデータベースのレコードの突合せを行い、結合条件を満たすものに対して結果のレコードを生成する入れ子ループ結合や、2つのデータベースが結合条件でソートされている場合には、先頭から順次突き合わせてマージするマージ結合や、一方のデータベースのレコードをハッシュ表に展開することにより結合条件を満たすレコードを求めるハッシュやインデックスを用いたハッシュ結合等が知られている。この例を図10に示す。   Conventionally, as an algorithm for performing a join operation between relational databases, a nested loop join in which records of two databases are sequentially matched and a result record is generated for those satisfying the join condition or two databases are used. Are sorted by join conditions, merge join that sequentially matches from the beginning and merge, or hash that uses a hash or index to find records that satisfy the join condition by expanding records from one database into a hash table Bonding and the like are known. An example of this is shown in FIG.

ステップ10) インデックスA,Bのレコードを指すポインタを先頭にするように初期化する。   Step 10) Initialization is performed so that the pointers pointing to the records of indexes A and B start.

ステップ11) インデックスAのポインタが指すレコードのキー値をマシンBに送信する。   Step 11) The key value of the record pointed to by the pointer of index A is transmitted to machine B.

ステップ12) インデックスAのポインタが指すレコードのキー値でインデックスBを検索する。   Step 12) The index B is searched with the key value of the record pointed to by the pointer of the index A.

ステップ13) 検索条件を満たすレコードがインデックスBにあるかを判定し、ある場合には、ステップ14に移行し、ない場合は、ステップ15に移行する。   Step 13) It is determined whether or not a record satisfying the search condition exists in the index B. If there is a record, the process proceeds to Step 14, and if not, the process proceeds to Step 15.

ステップ14) インデックスA、BのレコードをマシンJに送り、当該マシンJで両レコードを結合し、出力する。   Step 14) The records of indexes A and B are sent to the machine J, and both records are combined and output by the machine J.

ステップ15) インデックスAのポインタが指すレコードのキー値を超える最小の値をインデックスBから検索する。   Step 15) The index B is searched for the minimum value that exceeds the key value of the record pointed to by the pointer of the index A.

ステップ16) 検索条件を満たすレコードがインデックスBにあるかを判定し、ある場合には、ステップ17に移行し、ない場合には処理を終了する。   Step 16) It is determined whether or not a record satisfying the search condition exists in the index B. If there is a record, the process proceeds to Step 17, and if not, the process ends.

ステップ17) インデックスBのポインタを該当するレコードのところに進める。   Step 17) The index B pointer is advanced to the corresponding record.

ステップ18) インデックスBのポインタが指すレコードのキー値をマシンAに送る。   Step 18) The key value of the record pointed to by the pointer of index B is sent to machine A.

ステップ19) インデックスBのポインタが指すレコードのキー値でインデックスAを検索する。   Step 19) The index A is searched with the key value of the record pointed to by the pointer of the index B.

ステップ20) 検索条件を満たすレコードがインデックスAにあるかを判定し、ある場合は、ステップ21に移行し、ない場合はステップ22に移行する。   Step 20) It is determined whether or not a record satisfying the search condition exists in the index A. If there is a record, the process proceeds to Step 21, and if not, the process proceeds to Step 22.

ステップ21) インデックスA,BのレコードをマシンJに送りマシンJで両レコードを結合して出力する。   Step 21) The records of indexes A and B are sent to machine J, and both records are combined and output by machine J.

ステップ22) インデックスBのポインタが指すレコードのキー値を超える最小の値をインデックスAから検索する。   Step 22) The index A is searched for the minimum value that exceeds the key value of the record pointed to by the pointer of the index B.

ステップ23) 検索条件を満たすレコードがインデックスAにあるかを判定し、ある場合はステップ24に移行し、ない場合は、処理を終了する。   Step 23) It is determined whether or not there is a record satisfying the search condition in the index A. If there is a record, the process proceeds to Step 24, and if not, the process ends.

ステップ24) インデックスAのポインタを該当するレコードのところに進め、ステップ11の処理に移行する。   Step 24) The pointer of index A is advanced to the corresponding record, and the process proceeds to step 11.

また、結合操作を別々のジョブに区分し、それらのジョブを複数のプロセッサ間で最適にスケジューリングすることにより、データ・スキューの存在下で並列リレーショナル・データベース環境にある共通フィールド上の2つのデータベース・リレーションをマージ結合する技術がある。この技術は、最小メークスパン最適化技法を使用して、プロセッサ間でジョブの現集合をスケジューリングすることによって、2つのリレーションの自然結合のための全実行時間を最小することができる(例えば、特許文献1参照)。
特開平3−126169号公報
It also separates join operations into separate jobs and optimally schedules them across multiple processors, thereby allowing two database databases on a common field in a parallel relational database environment in the presence of data skew. There is a technology that merges relations. This technique can minimize the total execution time for the natural combination of two relations by scheduling the current set of jobs between processors using minimum make-span optimization techniques (eg, patents). Reference 1).
JP-A-3-126169

しかしながら、上記の図10に示すアルゴリズムをネットワークにより分散したシステムにそのまま適用すると、通信回数が増大し、性能が現れないという問題がある。   However, if the algorithm shown in FIG. 10 is applied to a system distributed by a network as it is, there is a problem that the number of communications increases and performance does not appear.

また、最小メークスパン最適化技法を使用して、マージ結合する技術は、マルチプロセッサシステムを想定したもので、分散システム間の通信はネットワークよりも高速なインターコネクトを前提としており、インデックス同士がコンピュータ内部のバス転送速度と比べて遅いネットワークで接続された分散システムについては考慮されていない。   In addition, the merge-joining technology using the minimum make-span optimization technique assumes a multiprocessor system, and communication between distributed systems is premised on interconnects that are faster than the network. No consideration is given to a distributed system connected by a network that is slower than the bus transfer speed of the network.

本発明は、上記の点に鑑みなされたもので、インデックス同士がコンピュータ内部のバス転送速度と比べて遅いネットワークで接続された分散システムにおいて、インデックス同士のマージ結合を高速化させ、処理中の通信回数を削減することが可能な分散インデックス結合システム及び方法及びプログラムを提供することを目的とする。   The present invention has been made in view of the above points. In a distributed system in which indexes are connected to each other via a network that is slower than the bus transfer speed inside the computer, the merge connection between the indexes is accelerated, and communication during processing is performed. It is an object of the present invention to provide a distributed index combining system, method and program capable of reducing the number of times.

図1は、本発明の原理を説明するための図である。   FIG. 1 is a diagram for explaining the principle of the present invention.

本発明(請求項1)は、ネットワークに複数のプロセッサが接続されている分散ネットワークシステムにおいて、該ネットワークを経由してインデックス同士をマージする分散インデックスの結合方法であって、
複数のレコードのインデックスからなるインデックスA,該インデックスAを走査するためのN個のポインタからなるポインタリスト及び、該ポインタに対応するレコードのキー値からなるキー値リストを格納する記憶手段Aを有するプロセッサAと、
複数のレコードのインデックスからなるインデックスB、該インデックスBを走査するためのN個のポインタからなるポインタリスト及び、該ポインタに対応するレコードのキー値からなるキー値リストを格納する記憶手段Bを有するプロセッサBと、
プロセッサAのインデックスAのレコードとプロセッサBのインデックスBのレコードを結合するプロセッサJと、がネットワークを介して接続されているシステムにおいて、
プロセッサAにおいて、
プロセッサBから、真偽値が設定された検索フラグリストBと、N個分のポインタに対応するレコードのキー値からなるキー値リストBを受信する受信Aステップ(ステップ1)と、
検索フラグリストBから取り出したi番目(i≧1)フラグが立っている場合は、インデックスAのポインタリストのi番目に該当するポインタが指すレコードを送信用バッファAに格納する検索フラグ処理Aステップ(ステップ2)と、
検索フラグリストAを初期化し、キー値リストBから取り出したi番目のキー値で記憶手段AからインデックスAを検索し、検索条件を満たすレコードがある場合は、該レコードを送信用バッファAに格納し、検索フラグリストAのi番目にフラグを立てる検索Aステップと、
プロセッサBから取得したキー値リストBのN番目の値を超える最小の値から順にN個分のキー値リストAを生成するキー値リストA生成ステップ(ステップ3)と、
キー値リストAと検索フラグリストAをプロセッサBに送信するリスト送信Aステップ(ステップ4)と、
バッファAに格納されたレコードの格納量が、予め決められた閾値以上になった場合に、該バッファのレコードをプロセッサJに送信するレコード送信Aステップと、
を行い、
プロセッサBにおいて、
プロセッサAから、真偽値が設定された検索フラグリストAと、N個分のポインタに対応するレコードのキー値からなるキー値リストAを受信する受信Bステップと、
検索フラグリストAから取り出したi番目(i≧1)フラグが立っている場合は、インデックスBのポインタリストのi番目に該当するポインタが指すレコードを送信用バッファBに格納する検索フラグ処理Bステップと、
検索フラグリストBを初期化し、キー値リストAから取り出したi番目のキー値で記憶手段BからインデックスBを検索し、検索条件を満たすレコードがある場合は、該レコードを送信用バッファBに格納し、検索フラグリストBのi番目にフラグを立てる検索Bステップと、
キー値リストAのN番目の値を超える最小の値から順にN個分のキー値リストBを生成するキー値リストB生成ステップ(ステップ5)と、
検索フラグリストBとキー値リストBをプロセッサAに送信するリスト送信Bステップ(ステップ6)と
バッファBに格納されたレコードの格納量が、予め決められた閾値以上になった場合に、該バッファのレコードをプロセッサJに送信するレコード送信Bステップと、
を行い、
プロセッサJは、
プロセッサAから受信したレコードをプロセッサA用バッファに格納し、プロセッサBから受信したレコードをプロセッサB用バッファに格納し、
プロセッサA用バッファとプロセッサB用バッファに格納されているレコードを結合して出力する
The present invention (claim 1), in the distributed network system in which a plurality of processors in the network are connected to a coupling method of distributed index merging index each other via the network,
A storage means A is provided for storing an index A composed of indexes of a plurality of records, a pointer list composed of N pointers for scanning the index A, and a key value list composed of key values of records corresponding to the pointers. Processor A;
There is provided storage means B for storing an index B composed of indexes of a plurality of records, a pointer list composed of N pointers for scanning the index B, and a key value list composed of key values of records corresponding to the pointers Processor B;
In a system in which a record of index A of processor A and a processor J that combines records of index B of processor B are connected via a network,
In processor A,
From the processor B, a receiving A step of receiving a search flag list B a true false value is set, the key value list B consisting of key value of the record corresponding to the pointer of the N content (Step 1),
When the i-th (i ≧ 1) flag extracted from the search flag list B is set, the search flag processing A step of storing the record pointed to by the i-th corresponding pointer in the pointer list of the index A in the transmission buffer A (Step 2)
The search flag list A is initialized, the index A is searched from the storage means A with the i-th key value extracted from the key value list B, and if there is a record that satisfies the search condition, the record is stored in the transmission buffer A. A search A step for setting the i-th flag in the search flag list A;
A key value list A generation step (step 3) for generating N key value lists A in order from the smallest value exceeding the Nth value of the key value list B acquired from the processor B;
A list transmission A step (step 4) for transmitting the key value list A and the search flag list A to the processor B;
A record transmission A step of transmitting a record of the buffer to the processor J when the storage amount of the record stored in the buffer A is equal to or greater than a predetermined threshold;
And
In processor B,
A reception B step for receiving a search flag list A in which a true / false value is set, and a key value list A composed of key values of records corresponding to N pointers;
When the i-th (i ≧ 1) flag extracted from the search flag list A is set, the search flag processing B step for storing the record pointed to by the i-th corresponding pointer in the pointer list of the index B in the transmission buffer B When,
The search flag list B is initialized, the index B is searched from the storage means B with the i-th key value extracted from the key value list A, and if there is a record that satisfies the search condition, the record is stored in the transmission buffer B. A search B step for setting the i-th flag in the search flag list B;
A key value list B generating step (step 5) for generating N key value lists B in order from the smallest value exceeding the Nth value of the key value list A;
A list transmission B step (step 6) for transmitting the search flag list B and the key value list B to the processor A ;
A record transmission B step of transmitting a record of the buffer to the processor J when the storage amount of the record stored in the buffer B exceeds a predetermined threshold;
And
Processor J is
Records received from the processor A are stored in the processor A buffer, records received from the processor B are stored in the processor B buffer,
The records stored in the processor A buffer and the processor B buffer are combined and output .

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

本発明(請求項)は、ットワークに複数のプロセッサが接続されている分散ネットワークシステムにおいて、該ネットワークを経由してインデックス同士をマージする分散インデックスの結合システムであって、
複数のレコードのインデックスからなるインデックスA,該インデックスAを走査するためのN個のポインタからなるポインタリスト及び、該ポインタに対応するレコードのキー値からなるキー値リストを格納する記憶手段130Aを有するプロセッサAと、
複数のレコードのインデックスからなるインデックスB、該インデックスBを走査するためのN個のポインタからなるポインタリスト及び、該ポインタに対応するレコードのキー値からなるキー値リストを格納する記憶手段130Bを有するプロセッサBと、
プロセッサAのインデックスAのレコードとプロセッサBのインデックスBのレコードを結合するプロセッサJと、を有し、
プロセッサAは
プロセッサBから、真偽値が設定された検索フラグリストBと、N個分のポインタに対応するレコードのキー値からなるキー値リストBを受信する受信A手段と、
検索フラグリストBから取り出したi番目(i≧1)フラグが立っている場合は、インデックスAのポインタリストのi番目に該当するポインタが指すレコードを送信用バッファAに格納する検索フラグ処理A手段と、
検索フラグリストAを初期化し、キー値リストBから取り出したi番目のキー値で記憶手段AからインデックスAを検索し、検索条件を満たすレコードがある場合は、該レコードを送信用バッファAに格納し、検索フラグリストAのi番目にフラグを立てる検索A手段110Aと、
プロセッサBから取得したキー値リストBのN番目の値を超える最小の値から順にN個分のキー値リストAを生成するキー値リストA生成手段120Aと、
キー値リストAと検索フラグリストAをプロセッサBに送信するリスト送信A手段141Aと、
バッファAに格納されたレコードの格納量が、予め決められた閾値以上になった場合に、該バッファのレコードをプロセッサJに送信するレコード送信A手段と、
を有し、
プロセッサBは
プロセッサAから、真偽値が設定された検索フラグリストAと、N個分のポインタに対応するレコードのキー値からなるキー値リストAを受信する受信B手段と、
検索フラグリストAから取り出したi番目(i≧1)フラグが立っている場合は、インデックスBのポインタリストのi番目に該当するポインタが指すレコードを送信用バッファBに格納する検索フラグ処理B手段110Bと、
検索フラグリストBを初期化し、キー値リストAから取り出したi番目のキー値で記憶手段BからインデックスBを検索し、検索条件を満たすレコードがある場合は、該レコードを送信用バッファBに格納し、検索フラグリストBのi番目にフラグを立てる検索B手段と、
プロセッサAから取得したキー値リストAのN番目の値を超える最小の値から順にN個分のキー値リストBを生成するキー値リストB生成手段120Bと、
検索フラグリストBとキー値リストBをプロセッサAに送信するリスト送信B手段と、
バッファBに格納されたレコードの格納量が、予め決められた閾値以上になった場合に、該バッファのレコードをプロセッサJに送信するレコード送信B手段141Bと、
を有し、
プロセッサJは、
プロセッサAから受信したレコードを格納するプロセッサA用バッファと、
プロセッサBから受信したレコードを格納するプロセッサB用バッファと、
プロセッサA用バッファとプロセッサB用バッファに格納されているレコードを結合して出力するレコード結合手段220と、を有する。
The present invention (Claim 2), in the distributed network system in which a plurality of processors in the network are connected to a coupling system distributed index merging index each other via the network,
A storage unit 130A is provided for storing an index A composed of indexes of a plurality of records, a pointer list composed of N pointers for scanning the index A, and a key value list composed of key values of records corresponding to the pointers. Processor A;
The storage unit 130B stores an index B composed of indexes of a plurality of records, a pointer list composed of N pointers for scanning the index B, and a key value list composed of key values of records corresponding to the pointers. Processor B;
A processor J that combines the record of index A of processor A and the record of index B of processor B ;
Processor A,
Receiving A means for receiving a search flag list B in which true / false values are set and a key value list B consisting of key values of records corresponding to N pointers from the processor B;
When the i-th (i ≧ 1) flag taken out from the search flag list B is set, the search flag processing A means for storing in the transmission buffer A the record pointed to by the i-th corresponding pointer in the pointer list of the index A When,
The search flag list A is initialized, the index A is searched from the storage means A with the i-th key value extracted from the key value list B, and if there is a record that satisfies the search condition, the record is stored in the transmission buffer A. A search A means 110A for setting the i-th flag in the search flag list A;
Key value list A generation means 120A for generating N key value lists A in order from the smallest value exceeding the Nth value of the key value list B acquired from the processor B;
List transmission A means 141A for transmitting the key value list A and the search flag list A to the processor B;
A record transmission A means for transmitting the record of the buffer to the processor J when the storage amount of the record stored in the buffer A exceeds a predetermined threshold;
Have
Processor B is,
Receiving B means for receiving, from the processor A, a search flag list A in which true / false values are set, and a key value list A composed of key values of records corresponding to N pointers;
When the i-th (i ≧ 1) flag taken out from the search flag list A is set, the search flag processing B means for storing the record pointed to by the i-th corresponding pointer in the pointer list of the index B in the transmission buffer B 110B,
The search flag list B is initialized, the index B is searched from the storage means B with the i-th key value extracted from the key value list A, and if there is a record that satisfies the search condition, the record is stored in the transmission buffer B. And a search B means for setting the i-th flag in the search flag list B ,
Key value list B generation means 120B for generating N key value lists B in order from the smallest value exceeding the Nth value of the key value list A acquired from the processor A;
A list transmission B means for transmitting the search flag list B and the key value list B to the processor A;
A record transmission B means 141B for transmitting the record of the buffer to the processor J when the storage amount of the record stored in the buffer B exceeds a predetermined threshold;
Have
Processor J is
A processor A buffer for storing records received from the processor A;
A buffer for processor B for storing a record received from processor B;
And a record combining unit 220 that combines and outputs the records stored in the processor A buffer and the processor B buffer .

また、本発明(請求項6)は、プロセッサAにおいて、
バッファAに格納されたレコードの格納量が、予め決められた閾値以上になった場合に、該バッファAのレコードをプロセッサJに送信するレコードA送信手段141Aを有し、
プロセッサBにおいて、
バッファBに格納されたレコードの格納量が、予め決められた閾値以上になった場合に、該バッファBのレコードをプロセッサJに送信するレコードB送信手段141Bを有し、
プロセッサJは、
プロセッサAから受信したレコードを格納するプロセッサA用バッファと、
プロセッサBから受信したレコードを格納するプロセッサB用バッファと、
プロセッサA用バッファとプロセッサB用バッファに格納されているレコードを結合して出力するレコード結合手段220と、を有する。
Further, according to the present invention (Claim 6), in the processor A,
A record A transmission unit 141A for transmitting a record of the buffer A to the processor J when the storage amount of the record stored in the buffer A exceeds a predetermined threshold;
In processor B,
A record B transmission unit 141B for transmitting the record of the buffer B to the processor J when the storage amount of the record stored in the buffer B exceeds a predetermined threshold;
Processor J is
A processor A buffer for storing records received from the processor A;
A buffer for processor B for storing a record received from processor B;
And a record combining unit 220 that combines and outputs the records stored in the processor A buffer and the processor B buffer.

また、本発明(請求項7)は、プロセッサBの検索B手段110Bにおいて、
検索フラグリストAから取り出したi番目(i≧1)フラグが立っている場合は、インデックスBのポインタリストのi番目のポインタが指すレコードを送信用バッファBに格納する手段と、
キー値リストから取り出したi番目のキー値で記憶手段BからインデックスBを検索し、検索条件を満たすレコードがある場合は、該レコードを送信用バッファBに格納し、検索フラグリストBのi番目にフラグを立てる手段と、を含む。
Further, according to the present invention (Claim 7), in the search B means 110B of the processor B,
Means for storing in the transmission buffer B the record pointed to by the i-th pointer in the pointer list of the index B when the i-th (i ≧ 1) flag taken out from the search flag list A is set;
The index B is searched from the storage means B with the i-th key value extracted from the key value list. If there is a record satisfying the search condition, the record is stored in the transmission buffer B, and the i-th key in the search flag list B is stored. Means for flagging.

また、本発明(請求項8)は、プロセッサAの検索A手段110Aにおいて、
検索フラグリストBから取り出したi番目(i≧1)フラグが立っている場合は、インデックスAのポインタリストのi番目のポインタが指すレコードを送信用バッファAに格納する手段と、
キー値リストから取り出したi番目のキー値で記憶手段AからインデックスAを検索し、検索条件を満たすレコードがある場合は、該レコードを送信用バッファAに格納し、検索フラグリストAのi番目にフラグを立てる手段と、を含む。
Further, according to the present invention (claim 8), in the search A means 110A of the processor A,
Means for storing in the transmission buffer A the record pointed to by the i-th pointer in the pointer list of the index A when the i-th (i ≧ 1) flag taken out from the search flag list B is set;
The index A is searched from the storage means A with the i-th key value extracted from the key value list. If there is a record satisfying the search condition, the record is stored in the transmission buffer A, and the i-th key in the search flag list A is stored. Means for flagging.

上記のように本発明によれば、各プロセッサにおいて、インデックスを走査するポインタをN個有し、プロセッサ間においてN個のポインタからなるポインタリスト単位で、N個分のポインタに対応するレコードのキー値のみ(キー値リスト)を送信することにより、処理負荷が低減される。これは、ネットワーク経由の場合、データ送受信の起動・停止に関わる処理のオーバヘッドが大きいため、送受信するデータの総量は同じであっても、そのやり取りに要する回数を減らすことにより、処理時間が短縮される。   As described above, according to the present invention, each processor has N pointers for scanning an index, and the key of the record corresponding to the pointers for N pointers in units of a pointer list composed of N pointers between the processors. By transmitting only the value (key value list), the processing load is reduced. This is because the processing overhead associated with starting / stopping data transmission / reception is large over a network, so even if the total amount of data to be transmitted / received is the same, the processing time can be shortened by reducing the number of times required for that exchange. The

さらに、キー値のみ送信するのでは、自分が送ったキー値が他方のプロセッサで検索されたかどうかを知ることができなくなるため、インデックスを検索した結果「真」だったものを記録した検索フラグリストも同時に送信する。検索フラグは、真/偽値のみを持つため、レコード全体を相手のプロセッサに送信することに比べ情報量としては十分小さく、結果として通信量の削減につながる。   Furthermore, if only the key value is sent, it will not be possible to know whether the key value sent by the other processor has been searched or not, so the search flag list that records what was "true" as a result of searching the index Will be sent at the same time. Since the search flag has only a true / false value, the amount of information is sufficiently small compared to transmitting the entire record to the other processor, resulting in a reduction in communication amount.

さらに、プロセッサAまたはプロセッサBとプロセッサJとの間の通信を行う際に、送信対象をバッファリングしてまとめて処理することで、ネットワーク経由の通信におけるデータ送受信の起動・停止に関わる処理のオーバヘッドを削減し、通信効率を向上させることが可能となる。   Further, when performing communication between the processor A or the processor B and the processor J, processing overhead related to the start / stop of data transmission / reception in communication via the network is performed by buffering and processing the transmission targets. And the communication efficiency can be improved.

以下、図面と共に本発明の実施の形態を説明する。   Hereinafter, embodiments of the present invention will be described with reference to the drawings.

図3は、本発明の一実施の形態における分散インデックス結合システムの構成を示す。   FIG. 3 shows the configuration of a distributed index combining system according to an embodiment of the present invention.

同図に示す分散インデックス結合システムは、インデックスAを有するプロセッサAと、インデックスBを有するプロセッサBと、プロセッサAとプロセッサBのレコードを結合を統括し、以下に説明する動作のトリガとなるプロセッサJから構成される。   The distributed index combination system shown in FIG. 1 is a processor A that has an index A, a processor B that has an index B, and a processor J that controls the combination of the records of the processor A and the processor B and triggers the operations described below. Consists of

プロセッサAとプロセッサBは、同様の構成であり、それぞれ、入出力部100、検索部110、キー値リスト処理部120、キー値リスト記憶部130、通信部140、検索フラグリスト処理部150、バッファ170から構成される。また、図示しないが、以下に説明する検索フラグリストは、メモリに格納するものとする。   The processor A and the processor B have the same configuration, and are respectively an input / output unit 100, a search unit 110, a key value list processing unit 120, a key value list storage unit 130, a communication unit 140, a search flag list processing unit 150, and a buffer. 170. Further, although not shown, a search flag list described below is stored in a memory.

キー値リスト記憶部130は、図4に示すように、ポインタリストとキー値リストを格納する。以下の説明において、「ポインタ」とは、インデックスのどこを検索しているかを指すポインタであり、複数のポインタをリスト化したものを「ポインタリスト」と呼ぶ。また、ポインタリストで指し示しているインデックスのレコードのキー値のみをリスト化したものがキー値リストである。図4の例では、ポインタリストの先頭は、インデックスの先頭のレコードを指しており、当該レコードのキー値「0034」がキー値リストに設定されている。ポインタリストの2番目はインデックスのn番目のレコードを指しており、当該レコードのキー値「0305」がキー値リストに設定されている。   As shown in FIG. 4, the key value list storage unit 130 stores a pointer list and a key value list. In the following description, the “pointer” is a pointer indicating where the index is searched, and a list of a plurality of pointers is referred to as a “pointer list”. The key value list is a list of only the key values of the index records pointed to by the pointer list. In the example of FIG. 4, the top of the pointer list points to the top record of the index, and the key value “0034” of the record is set in the key value list. The second pointer list points to the nth record in the index, and the key value “0305” of the record is set in the key value list.

なお、プロセッサJにはレコード全体が送信される。   Note that the entire record is transmitted to the processor J.

プロセッサJは、インデックスAを持つプロセッサA,インデックスBを持つプロセッサBとは別の、インデックス同士のマージ結合を統括するプロセッサで、以下のフローチャートで表される処理全体を実行するトリガとなるプロセッサである。プロセッサJは、マージ処理部210、レコード結合部220、通信部230、プロセッサB用バッファ240、プロセッサA用バッファ250を有し、マージ処理部210は、検索条件入力装置310と接続され、レコード結合部220は、結合結果出力装置320と接続されている。   The processor J is a processor that supervises merge join between indexes, which is different from the processor A having the index A and the processor B having the index B, and is a processor that triggers the entire processing represented by the following flowchart. is there. The processor J includes a merge processing unit 210, a record combining unit 220, a communication unit 230, a processor B buffer 240, and a processor A buffer 250. The merge processing unit 210 is connected to the search condition input device 310 and records combining. The unit 220 is connected to the combined result output device 320.

マージ処理部210は、プロセッサA,Bに対して、検索条件入力装置310から入力された検索条件をプロセッサA,Bに出力する。   The merge processing unit 210 outputs the search condition input from the search condition input device 310 to the processors A and B to the processors A and B.

レコード結合部220は、プロセッサA及び、プロセッサBの通信部140から送信され、バッファ240,250に格納されたインデックスの検索結果の該当レコードを結合し、結合結果出力装置320に出力する。この処理が実行されるということは、両インデックスに共通するキー値を持つレコードがあったということを示している。   The record combining unit 220 combines the corresponding records of the index search results transmitted from the communication units 140 of the processor A and the processor B and stored in the buffers 240 and 250, and outputs the combined records to the combination result output device 320. Execution of this processing indicates that there is a record having a key value common to both indexes.

以下に、上記の構成における動作を説明する。   The operation in the above configuration will be described below.

図5は、本発明の一実施の形態における全体の動作のシーケンスチャートである。   FIG. 5 is a sequence chart of the entire operation in the embodiment of the present invention.

ステップ51) プロセッサJは、検索条件入力装置から検索条件が入力されると、プロセッサA,Bに対して、検索条件を送信することにより、インデックスA,Bの結合処理の開始を指示する。   Step 51) When the search condition is input from the search condition input device, the processor J sends the search condition to the processors A and B to instruct the start of the index A and B combination processing.

ステップ52) プロセッサAは、キーリスト処理部120AにおいてインデックスAの先頭から順にN個分のキー値リストAを生成する。   Step 52) The processor A generates N key value lists A in order from the top of the index A in the key list processing unit 120A.

ステップ53) 検索フラグリスト処理部150Aにおいて、インデクスAの検索フラグリストAを初期化する。   Step 53) The search flag list processing unit 150A initializes the search flag list A of the index A.

ステップ54) 通信部140Aを介して、キー値リストAと検索フラグリストAを送信する。   Step 54) The key value list A and the search flag list A are transmitted via the communication unit 140A.

ステップ55) プロセッサBは、インデックスBの検索フラグリストBを初期化する。   Step 55) The processor B initializes the search flag list B of the index B.

ステップ56) ステップ54で受信した検索フラグリストAを確認し、プロセッサAで検索されたインデックスAのレコードに対応するインデックスBのレコードをバッファBに格納する。なお、初回の場合は、ステップ53で初期化された検索フラグリストAを参照することになるため、バッファBに格納するレコードはない。   Step 56) The search flag list A received in step 54 is confirmed, and the record of index B corresponding to the record of index A searched by the processor A is stored in the buffer B. In the case of the first time, since the search flag list A initialized in step 53 is referred to, there is no record to be stored in the buffer B.

ステップ57) キー値リストAをキーとしてインデクスBを検索し、検索されたレコードがあった場合は、バッファBに格納し、検索フラグリストBにフラグ「真」を設定する。   Step 57) The index B is searched using the key value list A as a key. If there is a searched record, it is stored in the buffer B, and the flag “true” is set in the search flag list B.

ステップ58) 通信部140Bは、バッファBに格納されたインデックスBのレコードの格納量が所定のバッファ格納閾値を超えているかを判定し、超えている場合は、バッファBに格納されたレコード群をプロセッサJに送信する。超えていない場合はステップ61に移行する。   Step 58) The communication unit 140B determines whether the storage amount of the record of the index B stored in the buffer B exceeds a predetermined buffer storage threshold, and if so, the record group stored in the buffer B is selected. To processor J. If not, the process proceeds to step 61.

プロセッサ59) プロセッサJでは、プロセッサBから受信したレコード群をバッファB240に格納する。   Processor 59) In the processor J, the record group received from the processor B is stored in the buffer B240.

ステップ60) プロセッサJのレコード結合部220では、バッファA250に格納されているインデックスAのレコードと、バッファB240に格納されているインデックスBのレコードが結合可能であるかを判定し、結合可能であれば結合する。   Step 60) The record combining unit 220 of the processor J determines whether the record of the index A stored in the buffer A250 and the record of the index B stored in the buffer B240 can be combined. Combine.

ステップ61) キー値リスト処理部120Bは、インデクスBにおいて、キー値リストAのN番目の値(リスト中の最大値)を超える最小の値から順にN個分のキー値リストBを作成する。   Step 61) The key value list processing unit 120B creates N key value lists B in order from the smallest value exceeding the Nth value (maximum value in the list) of the key value list A in the index B.

ステップ62) 通信部140Bからキー値リストBと検索フラグリストBをプロセッサAに送信する。   Step 62) The key value list B and the search flag list B are transmitted from the communication unit 140B to the processor A.

ステップ63) プロセッサAでは、検索フラグリスト処理部150Aは、インデクスAの検索フラグリストAを初期化する。   Step 63) In the processor A, the search flag list processing unit 150A initializes the search flag list A of the index A.

ステップ64) プロセッサAの検索部110Aは、検索フラグリストBを確認し、プロセッサBで検索されたインデックスBのレコードに対応するインデックスAのレコードをバッファ170Aに格納する。   Step 64) The search unit 110A of the processor A confirms the search flag list B, and stores the record of the index A corresponding to the record of the index B searched by the processor B in the buffer 170A.

ステップ65) 検索部110Aは、キー値リストBをキーとして、インデックスAを検索し、検索されたレコードがあったら、バッファ170Aに格納し、検索フラグリスト処理部150Aは、該当する検索フラグリストAに「真」を設定する。   Step 65) The search unit 110A searches the index A using the key value list B as a key, and if there is a searched record, stores it in the buffer 170A, and the search flag list processing unit 150A sets the corresponding search flag list A Set to true.

ステップ66) 通信部140Aは、バッファ170Aに格納されたインデクスAのレコードの格納量が所定のバッファ格納閾値を超えているかを判定し、超えている場合は、バッファ170Aに格納されたレコード群をプロセッサJに送信する。超えていない場合はステップ69に移行する。   Step 66) The communication unit 140A determines whether the storage amount of the index A record stored in the buffer 170A exceeds a predetermined buffer storage threshold, and if so, the record group stored in the buffer 170A is selected. To processor J. If not, the process proceeds to step 69.

ステップ67) プロセッサJでは、プロセッサAから受信したレコード群をバッファA250に格納する。   Step 67) In the processor J, the record group received from the processor A is stored in the buffer A250.

ステップ68) プロセッサJのレコード結合部220では、バッファA250に格納されているインデックスAのレコードと、バッファB240に格納されているインデックスBのレコードが結合可能であるかを判定し、結合可能であれば結合する。   Step 68) The record combining unit 220 of the processor J determines whether the record of the index A stored in the buffer A250 and the record of the index B stored in the buffer B240 can be combined. Combine.

ステップ69) キー値リスト処理部120Aは、インデクスAにおいてキー値リストBのN番目の値(リスト中の最大値)を超える最小の値から順にN個分のキー値リストを作成する。   Step 69) The key value list processing unit 120A creates N key value lists in order from the smallest value exceeding the Nth value (maximum value in the list) of the key value list B in the index A.

ステップ70) プロセッサAは、通信部140Aからキー値リストと検索フラグリストAをプロセッサBに送信する。   Step 70) The processor A transmits the key value list and the search flag list A to the processor B from the communication unit 140A.

以降、ステップ55以下の処理を繰り返す。   Thereafter, the processing after step 55 is repeated.

次に、マージ結合処理を説明する。   Next, the merge join process will be described.

図6は、本発明の一実施の形態におけるマージ結合のフローチャートである。   FIG. 6 is a flowchart of merge join in one embodiment of the present invention.

ステップ110) プロセッサBにおいて、入出力部100Bを介してレコードを指すN個のポインタリストが入力されると、キー値リスト処理部120Bは、ポインタがインデックスBの先頭レコードを指すように、キー値リスト記憶部130BのN個のインデックスBのポインタリストを初期化する。   Step 110) When N pointer lists indicating records are input via the input / output unit 100B in the processor B, the key value list processing unit 120B causes the key value so that the pointer points to the first record of the index B. The pointer list of N indexes B in the list storage unit 130B is initialized.

ステップ116) プロセッサAにおいて、インデックスAのレコードを指すN個のポインタが入出力部100Aを介して入力されると、キー値リスト処理部120Aにおいて、インデックスAの先頭レコードから順にN個分のレコードを指すように、N個のポインタを初期化し、初期化済みのインデックスAのレコードを指すN個のポインタリストを出力する。   Step 116) When N pointers pointing to the record of index A are input through the input / output unit 100A in the processor A, the key value list processing unit 120A records N records in order from the first record of the index A. N pointers are initialized so as to point to, and a list of N pointers pointing to the records of the index A that has been initialized is output.

ステップ117) プロセッサBから送られてきたキー値リストのうち、インデックスAを検索した結果、「真」となったものを記録するための検索フラグリストを初期化し、初期化済みのインデックスAの検索フラグリストを出力する。   Step 117) Among the key value list sent from the processor B, the search flag list for recording the index value of “true” as a result of searching the index A is initialized, and the index A that has been initialized is searched. Output flag list.

ステップ120) キー値リスト処理部120Aにおいて、キー値リスト記憶部130AからインデックスAのレコードを指すN個のポインタリストを読み込み、N個のポインタリストが示すインデックスAの各レコードのキー値を取得してリスト化し、キー値リストとしてキー値リスト記憶部130Aに格納すると共に、通信部140Aを介してプロセッサBに送信する。   Step 120) In the key value list processing unit 120A, the N pointer lists indicating the records of the index A are read from the key value list storage unit 130A, and the key values of the records of the index A indicated by the N pointer lists are acquired. Are stored in the key value list storage unit 130A as a key value list and transmitted to the processor B via the communication unit 140A.

ステップ122) このとき、インデックスAを検索した結果「真」となったものを記録したインデックスAの検索フラグリストAもプロセッサBに送信する。   Step 122) At this time, the search flag list A of the index A in which the result of searching the index A is “true” is also transmitted to the processor B.

ステップ125) プロセッサBの通信部140Bでキー値リストを受信すると、キー値リスト処理部120Bは、そのキー値リストをメモリ(図示せず)のプロセッサAのキー値リスト領域に格納する。そして、検索部110Bは、プロセッサAから取得したインデックスAのN個のキー値リストのレコードのキー値を検索キーとして、キー値リスト記憶部130BからインデックスBを検索し、インデックスBのレコードを指すN個のポインタリストを取得する。当該ステップの詳細については後述する。   Step 125) When the key value list is received by the communication unit 140B of the processor B, the key value list processing unit 120B stores the key value list in the key value list area of the processor A in a memory (not shown). Then, the search unit 110B searches the index value B from the key value list storage unit 130B using the key values of the N key value list records of the index A acquired from the processor A as search keys, and points to the record of the index B. Obtain N pointer lists. Details of this step will be described later.

ステップ130) キー値リスト処理部120Bは、取得したインデックスBのレコードを指すN個のポインタリストが示すインデックスBの各レコードのキー値を取得してキー値リストとしてキー値リスト記憶部130Bに格納すると共に、通信部140Bを介してプロセッサAに送信する。   Step 130) The key value list processing unit 120B acquires the key value of each record of the index B indicated by the N pointer lists indicating the acquired record of the index B, and stores it as a key value list in the key value list storage unit 130B. At the same time, the data is transmitted to the processor A via the communication unit 140B.

ステップ132) このとき、プロセッサBでは、インデックスBを検索した結果「真」となったものを記録したインデックスBの検索フラグリストBもプロセッサAに送信する。   Step 132) At this time, the processor B also transmits to the processor A the search flag list B of the index B in which the index B is searched for “true”.

ステップ135) プロセッサAの通信部140を介してプロセッサBからキー値リストを取得すると、キー値リスト処理部120において、そのキー値リストをメモリ(図示せず)に格納する。検索部110Aは、取得したインデックスBのN個のキー値リストのレコードのキー値を検索キーとして、キー値リスト記憶部記憶部130AからインデックスAを検索し、インデックスBのレコードを指すN個のポインタリストを取得する。詳細については後述する。さらに、検索フラグリスト処理部150Aは、インデックスAを検索した結果「真」となったものを記録したインデックスAの検索フラグリストを出力する。   Step 135) When the key value list is obtained from the processor B via the communication unit 140 of the processor A, the key value list processing unit 120 stores the key value list in a memory (not shown). The retrieval unit 110A retrieves the index A from the key value list storage unit 130A by using the key values of the N key value list records of the index B acquired as the retrieval key, and N retrievals indicating the index B records. Get the pointer list. Details will be described later. Further, the search flag list processing unit 150A outputs the search flag list of the index A in which the index “A” as a result of searching the index A is recorded.

次に、上記のステップ125のインデックスBの検索処理について詳細に説明する。   Next, the index B search process in step 125 will be described in detail.

図7は、本発明の一実施の形態におけるインデックス検索処理のフローチャートである。   FIG. 7 is a flowchart of the index search process according to the embodiment of the present invention.

ステップ205) プロセッサBの検索フラグリスト処理部150Bは、プロセッサAから送られてきたキー値リストのうち、インデックスBを検索した結果「真」となったものを記録するための検索フラグリストBを初期化する。   Step 205) The search flag list processing unit 150B of the processor B uses the search flag list B for recording the key value list sent from the processor A that is “true” as a result of searching the index B. initialize.

ステップ210) プロセッサBのキー値リスト処理部120Bにおいて、メモリ(図示せず)に、N個分まとめて処理するためのループカウンタjを設け、j=1と初期化する。   Step 210) In the key value list processing unit 120B of the processor B, a loop counter j is provided in a memory (not shown) for processing all at a time, and is initialized as j = 1.

ステップ211) 検索フラグリスト処理部150Bは、インデックスAの検索フラグリストAからカウンタjに相当する検索フラグを取り出す。   Step 211) The search flag list processing unit 150B extracts a search flag corresponding to the counter j from the search flag list A of the index A.

ステップ212) 検索フラグリスト処理部150Bは、検索フラグAに、インデックスAのj番目の検索フラグが立っているかどうかを確認する。立っている場合は、ステップ213に移行し、立っていない場合はステップ216に移行する。   Step 212) The search flag list processing unit 150B confirms whether or not the jth search flag of the index A is set in the search flag A. If standing, the process proceeds to step 213, and if not standing, the process proceeds to step 216.

ステップ213) ステップ212にて、インデックスAのj番目の検索フラグが立っていたということは、前回インデックスBを検索した際に、ステップ251にてj番目に記録したポインタが指すレコードのキー値がインデックスAにて検索されたということを意味する。よって、検索部110Bは、以下の処理を行う。   Step 213) The fact that the j-th search flag of index A was set in step 212 means that the key value of the record pointed to by the j-th pointer recorded in step 251 when the index B was searched last time. It means that the search is made with the index A. Therefore, the search unit 110B performs the following processing.

1.インデックスBのレコードを指すN個のポインタリストからj番目のポインタを取り出す。   1. The jth pointer is taken out from the list of N pointers indicating the record of index B.

2.キー値リスト記憶部130Bから1.で取得したポインタが指すインデックスBのレコードを取得する。   2. From the key value list storage unit 130B. The record of the index B pointed to by the pointer acquired in (1) is acquired.

3.2.で取得したレコードをプロセッサJに送るためのバッファ170Bに格納する。   3.2. Is stored in the buffer 170B for sending to the processor J.

ステップ215) キー値リスト処理部120Bは、プロセッサAから送信されたインデックスAのN個のキー値リストからカウンタjに相当するキー値(インデックスAのキー値リスト中j番目のキー値)を取り出す。   Step 215) The key value list processing unit 120B extracts the key value corresponding to the counter j (jth key value in the key value list of the index A) from the N key value lists of the index A transmitted from the processor A. .

ステップ225) 検索部110Bは、ステップ215で取り出されたインデックスAのキー値リスト中j番目のキー値を用いて、キー値リスト記憶部130BからインデックスBを検索する。検索結果が「真」の場合はインデックスBの検索結果該当レコードを指すポインタが出力される。   Step 225) The retrieval unit 110B retrieves the index B from the key value list storage unit 130B using the j-th key value in the key value list of the index A extracted in step 215. When the search result is “true”, a pointer indicating the record corresponding to the search result of index B is output.

ステップ230) 検索部110Bは、検索条件を満たすレコードが、キー値リスト記憶部130BのインデックスBに存在するか否かを判定する。ステップ225における検索結果が「真」の場合はステップ232に移行し、「偽」の場合はステップ265に移行する。   Step 230) The search unit 110B determines whether or not a record satisfying the search condition exists in the index B of the key value list storage unit 130B. If the search result in step 225 is “true”, the process proceeds to step 232, and if “false”, the process proceeds to step 265.

ステップ232) 以下の処理を行う。   Step 232) The following processing is performed.

1.ステップ225で得られたポインタが指すインデックスBの検索結果該当レコードを取得する。   1. The record corresponding to the search result of the index B indicated by the pointer obtained in step 225 is acquired.

2.1.で取得したレコードをプロセッサJに送るためのバッファ170Bに格納する。この処理が行われるということは、両インデックスに共通するキー値を持つレコードがあったということである。   2.1. Is stored in the buffer 170B for sending to the processor J. This processing means that there is a record having a key value common to both indexes.

ステップ233) 検索フラグリスト処理部150Bは、インデックスAのキー値リストのうちj番目のキーが検索されたことをプロセッサAに伝えるため、インデックスBの検索フラグリストのj番目のフラグを立てる。   Step 233) The search flag list processing unit 150B sets the jth flag in the search flag list of the index B to notify the processor A that the jth key in the key value list of the index A has been searched.

ステップ265) ループ用のカウンタjがNを超えていないかどうか確認する。Nを超えていない、すなわち、N回のループが終了していなければ、ステップ270に移行し、Nを超えている、すなわち、N回のループが終了していればステップ238に移行する。   Step 265) It is confirmed whether the counter j for the loop does not exceed N. If N is not exceeded, that is, N loops are not completed, the process proceeds to step 270. If N is exceeded, that is, N loops are completed, the process proceeds to step 238.

ステップ270) カウンタjを1インクリメントし、ステップ215に移行する。   Step 270) The counter j is incremented by 1, and the process proceeds to Step 215.

ステップ238) 通信部140Bは、プロセッサJに送るためのバッファ170Bの格納量が予め決められた閾値を超えていないかどうかを確認し、超えていなければステップ240に移行し、超えていればステップ239に移行する。   Step 238) The communication unit 140B confirms whether the storage amount of the buffer 170B to be sent to the processor J does not exceed a predetermined threshold value. If not, the process proceeds to step 240. 239.

ステップ239) バッファ170Bに格納されたインデックスBの検索結果該当レコードを全てプロセッサJに送信する。当該検索結果該当レコードを取得したプロセッサJの動作については、図9において詳述する。   Step 239) All the records corresponding to the search result of the index B stored in the buffer 170B are transmitted to the processor J. The operation of the processor J that acquired the record corresponding to the search result will be described in detail with reference to FIG.

ステップ240) 検索部110Bは、ステップ265の条件分岐により、ステップ215にて取り出されたインデックスAのキー値リスト中のN番目のキー値を用いて、キー値リスト記憶部130BのインデックスBから、「キー値を超える最小の値」を検索する。検索結果が「真」の場合は、インデックスBの検索結果該当レコードを指すポインタを出力する。   Step 240) The search unit 110B uses the N-th key value in the key value list of the index A extracted in Step 215 by the conditional branch of Step 265, from the index B of the key value list storage unit 130B. Search for “minimum value over key value”. If the search result is “true”, a pointer indicating the record corresponding to the search result of index B is output.

ステップ245) ステップ240において、プロセッサJから与えられた検索条件を満たすレコードがインデックスBに存在するかどうか確認し、存在すれば、ステップ251に移行し、存在しなければステップ252に移行する。   Step 245) In Step 240, it is confirmed whether or not a record satisfying the search condition given from the processor J exists in the index B. If it exists, the process proceeds to Step 251, and if it does not exist, the process proceeds to Step 252.

ステップ251) キー値リスト処理部120Bは、インデックスBの検索結果該当レコードから順にN個分のレコードを指すように、インデックスBのレコードを指すN個のポインタリストへ記録する。その後、インデックスB検索処理を終了し、図4のステップ130に移行する。   Step 251) The key value list processing unit 120B records in the N pointer lists indicating the records of the index B so as to indicate the N records in order from the record corresponding to the search result of the index B. Thereafter, the index B search process is terminated, and the process proceeds to step 130 in FIG.

ステップ252) ステップ245において、検索条件を満たすレコードがインデックスBに存在しない場合は、インデックスBの検索フラグリスト中のフラグが1つ以上立っているかどうかを確認する。(ステップ232にてインデックスAのキー値リストのうちいずれかのキーが検索されていれば、ステップ245でインデックスBの検索が最後までたどり着いたと判定されたとしても、処理を継続し、プロセッサAにプロセッサB側の検索結果を伝える必要がある)もし、立っていたら「インデックスB検索処理」を終了し、図4のステップ130に移行する。立っていなければ処理を終了する。   Step 252) In Step 245, if there is no record satisfying the search condition in the index B, it is confirmed whether one or more flags in the search flag list of the index B are set. (If any key in the key value list of index A is searched in step 232, even if it is determined in step 245 that the search of index B has been completed, the processing is continued and processor A is (It is necessary to convey the search result on the processor B side). If standing, the “index B search process” is terminated, and the process proceeds to step 130 in FIG. If not standing, the process is terminated.

図8は、本発明の一実施の形態におけるインデックスA検索処理のフローチャートである。   FIG. 8 is a flowchart of the index A search process according to the embodiment of the present invention.

ステップ305) プロセッサBから送られてきたキー値リストのうち、インデックスAを検索した結果「真」となったものを記録するための検索フラグリストを初期化する。   Step 305) Of the key value list sent from the processor B, a search flag list for recording a list of “true” as a result of searching the index A is initialized.

ステップ310) プロセッサAのキー値リスト処理部120Aにおいて、メモリ(図示せず)にN個分纏めて処理するためのループカウンタiを設け、i=1とする。   Step 310) In the key value list processing unit 120A of the processor A, a loop counter i is provided in a memory (not shown) for processing N pieces collectively, and i = 1 is set.

ステップ311) インデックスBの検索フラグリストから、カウンタiに相当する検索フラグを取り出す。   Step 311) The search flag corresponding to the counter i is extracted from the search flag list of the index B.

ステップ312) インデックスBのi番目の検索フラグが立っているかどうかを確認し、立っていた場合はステップ313に移行し、立っていない場合はステップ316に移行する。   Step 312) It is confirmed whether or not the i-th search flag of the index B is set. If it is set, the process goes to Step 313. If it is not set, the process goes to Step 316.

ステップ313) ステップ312にてインデックスBのi番目の検索フラグが立っていたということは、前回インデックスAを検索した際、ステップ351にてi番目に記録したポインタが指すレコードのキー値がインデックスBにて検索されたことを意味する。よって、検索部110Aは、以下の処理を行う。   Step 313) The fact that the i-th search flag of index B was set in step 312 indicates that the key value of the record pointed to by the i-th recorded pointer in step 351 is index B when the index A was previously searched. It means that it was searched by. Therefore, the search unit 110A performs the following processing.

1.キー値リスト記憶部130AからインデックスAのレコードを指すN個のポインタリストからi番目のポインタを取り出す。   1. The i-th pointer is extracted from the N pointer list indicating the record of index A from the key value list storage unit 130A.

2.1.で取得したポインタが指すインデックスAのレコードを取得する。   2.1. The record of the index A pointed to by the pointer acquired in (1) is acquired.

3.2.で取得したレコードをプロセッサJに送るためのバッファ170Aに格納する。   3.2. Is stored in the buffer 170A for sending to the processor J.

ステップ315) キー値リスト処理部120Aは、プロセッサBから送信されたN個のキー値リストから、カウンタiに相当するキー値(インデックスBのキー値リスト中i番目のキー値)を取り出す。   Step 315) The key value list processing unit 120A extracts the key value corresponding to the counter i (the i-th key value in the key value list of the index B) from the N key value lists transmitted from the processor B.

ステップ326) 検索部110Aは、ステップ315で取り出されたインデックスAのキー値リスト中j番目のキー値を用いて、キー値リスト記憶部130AからインデックスAを検索する。検索結果が「真」の場合はインデックスAの検索結果該当レコードを指すポインタが出力される。   Step 326) The retrieval unit 110A retrieves the index A from the key value list storage unit 130A using the j-th key value in the key value list of the index A extracted in Step 315. If the search result is “true”, a pointer indicating the record corresponding to the search result of index A is output.

ステップ331) 検索部110Aは、検索条件を満たすレコードが、キー値リスト記憶部130AのインデックスAに存在するか否かを判定する。検索結果が「真」の場合はステップ332に移行し、「偽」の場合はステップ365に移行する。   Step 331) The search unit 110A determines whether or not a record satisfying the search condition exists in the index A of the key value list storage unit 130A. If the search result is “true”, the process proceeds to step 332, and if it is “false”, the process proceeds to step 365.

ステップ332) 検索部110Aは、以下の処理を行う。   Step 332) The retrieval unit 110A performs the following processing.

1.ステップ326で得られたポインタが指すインデックスAの検索結果該当レコードを取得する。   1. The record corresponding to the search result of index A pointed to by the pointer obtained in step 326 is acquired.

2.1.で取得したレコードをプロセッサJに送るためのバッファ170Aに格納する(この処理が行われるということは、両インデックスに共通するキー値を持つレコードがあったということである)。   2.1. Is stored in the buffer 170A for sending to the processor J (this processing means that there is a record having a key value common to both indexes).

ステップ333) 検索フラグリスト処理部150Aは、インデックスBのキー値リストのうちi番目のキーが検索されたことをプロセッサBに伝えるため、インデックスAの検索フラグリストのi番目のフラグを立てる。   Step 333) The search flag list processing unit 150A sets the i-th flag in the search flag list of the index A to notify the processor B that the i-th key in the key value list of the index B has been searched.

ステップ365) ループ用カウンタiがNを超えていないかどうか確認し、Nを超えていない、すなわち、N回のループが終了していなければステップ370に移行し、Nを超えている、すなわち、N回のループが終了していれば、ステップ338に移行する。   Step 365) Check if the loop counter i does not exceed N. If N is not exceeded, that is, if N loops are not completed, the process proceeds to Step 370, where N is exceeded. If N loops have been completed, the process proceeds to step 338.

ステップ370) カウンタiを1インクリメントし、ステップ315に移行する。   Step 370) The counter i is incremented by 1, and the process proceeds to Step 315.

ステップ338) プロセッサJに送るためのバッファ170Aの格納量が予め決められた閾値を超えていないかどうかを確認し、超えていなければステップ341に移行し、超えていればステップ339に移行する。   Step 338) It is confirmed whether or not the storage amount of the buffer 170A to be sent to the processor J exceeds a predetermined threshold value. If it does not exceed, the process proceeds to Step 341. If it exceeds, the process proceeds to Step 339.

ステップ339) バッファ170Aに格納されたインデックスAの検索結果該当レコードをプロセッサJに送る。   Step 339) The search record corresponding to the index A stored in the buffer 170A is sent to the processor J.

ステップ341) 検索部110Aは、ステップ365の条件分岐により、ステップ315にて取り出されたインデックスBのキー値リスト中N番目のキー値を用いて、キー値リスト記憶部130AのインデックスAから「キー値を超える最小の値」を検索する。検索結果が「真」の場合は、インデックスAの検索結果該当レコードを指すポインタを出力する。   Step 341) The search unit 110A uses the N-th key value in the key value list of the index B extracted in Step 315 by the conditional branch in Step 365 to search for “key” from the index A of the key value list storage unit 130A. Search for “minimum value over value”. If the search result is “true”, a pointer indicating the record corresponding to the search result of index A is output.

ステップ346) ステップ341において、プロセッサJから与えられた検索条件を満たすレコードがインデックスAに存在するかどうかを判定し、存在すればステップ351に移行し、存在しなければステップ352に移行する。   Step 346) In Step 341, it is determined whether or not a record satisfying the search condition given by the processor J exists in the index A. If there is a record, the process proceeds to Step 351. If not, the process proceeds to Step 352.

ステップ351) キー値リスト処理部120Aは、インデックスAの検索結果の該当レコードから順にN個分のレコードを指すように、インデックスAのレコードを指すN個のポインタリストへ記録する。その後「インデックスA検索処理」を終了し、図4のステップ120に移行する。   Step 351) The key value list processing unit 120A records in the N pointer lists indicating the records of the index A so as to indicate N records in order from the corresponding record of the search result of the index A. Thereafter, the “index A search process” is terminated, and the process proceeds to step 120 in FIG.

ステップ352) インデックスAの検索フラグリストの中のフラグが1つ以上立っているかどうかを確認する(ステップ332にて、インデックスBのキー値リストのうちいずれかのキーが検索されていれば、ステップ346でインデックスAの検索が最後までたどり着いたと判定されたとしても、処理を継続し、プロセッサBにプロセッサA側の検索結果を伝える必要がある)。もし立っていたたら、「インデックスA検索処理リ」を終了し、図4のステップ120に移行する。もし立っていなければ処理を終了する。   Step 352) It is confirmed whether or not one or more flags in the search flag list of index A are set (if any key in the key value list of index B is searched in step 332), step Even if it is determined in 346 that the search for the index A has been completed, it is necessary to continue the processing and transmit the search result on the processor A side to the processor B). If standing, “index A search processing” is terminated, and the process proceeds to step 120 in FIG. If not standing, the process is terminated.

次に、プロセッサA,プロセッサBからインデックスA,インデックスBの検索結果の該当レコードを取得したプロセッサJの動作について説明する。   Next, the operation of the processor J that has acquired the corresponding records of the search results of the index A and index B from the processors A and B will be described.

図9は、本発明の一実施の形態におけるプロセッサJによるインデックスA,B結合処理のフローチャートである。   FIG. 9 is a flowchart of the index A and B combining process by the processor J in the embodiment of the invention.

ステップ410) 通信部230は、プロセッサAまたはプロセッサBからの検索結果該当レコードが届くまで通信を待ち受ける。   Step 410) The communication unit 230 waits for communication until the record corresponding to the search result from the processor A or the processor B arrives.

ステップ415) 通信部230は、プロセッサAまたは、プロセッサBから検索結果該当レコードを受信すると、検索結果該当レコードの送信元がプロセッサAかどうかを確認し、プロセッサAであった場合は、ステップ420に移行し、そうでなければステップ440に移行する。   Step 415) Upon receiving the search result corresponding record from the processor A or the processor B, the communication unit 230 checks whether or not the transmission source of the search result corresponding record is the processor A. Otherwise, go to step 440.

ステップ420) 通信部230は、プロセッサAから受信した検索結果該当レコードをプロセッサA用のバッファ250に格納する。   Step 420) The communication unit 230 stores the record corresponding to the search result received from the processor A in the buffer 250 for the processor A.

ステップ425) プロセッサA用のバッファに格納されたレコードのキー値の最大値が、プロセッサB用のバッファに格納されたレコードのキー値の最大値以上になっているかどうか確認する(インデックスA,Bの結合をプロセッサJにて行うには、両方のインデックスA,Bが揃った状態で行う必要がある。図7、図8に示したアルゴリズムでは、キー値は小さい値から順番に処理していくので、ここで最大値を確認し、他方の最大値以上であれば、キー値が等しいレコードまで結合することが可能となる)。   Step 425) It is confirmed whether the maximum value of the key value of the record stored in the buffer for the processor A is equal to or greater than the maximum value of the key value of the record stored in the buffer for the processor B (index A, B). In order for the processor J to perform the combination, it is necessary to perform both of the indexes A and B. In the algorithms shown in FIGS. Therefore, the maximum value is confirmed here, and if it is equal to or greater than the other maximum value, it is possible to combine records having the same key value).

ステップ430) 最大値以上になっている場合は、ステップ435に移行し、なっていない場合はステップ440に移行する。   Step 430) If it is equal to or greater than the maximum value, the process proceeds to step 435, and if not, the process proceeds to step 440.

ステップ435) レコード結合部220は、プロセッサA用のバッファ250、プロセッサB用のバッファ240から、キー値が等しいレコードまでを抽出し、結合し、インデックスA,Bの結合処理結果として結合結果出力装置320に出力する。   Step 435) The record combining unit 220 extracts and combines the records having the same key value from the buffer 250 for the processor A and the buffer 240 for the processor B, and combines them to obtain a combined result output device as a result of combining the indexes A and B. To 320.

ステップ440) 検索結果該当レコードの送信元がプロセッサBかどうかを確認する。プロセッサBから受信した場合はステップ445に移行し、そうでない場合はステップ410に戻る。   Step 440) It is confirmed whether or not the transmission source of the record corresponding to the search result is the processor B. If received from the processor B, the process proceeds to step 445; otherwise, the process returns to step 410.

ステップ445) 通信部230は、プロセッサBから受信した検索結果該当レコードをプロセッサB用のバッファ240に格納する。   Step 445) The communication unit 230 stores the record corresponding to the search result received from the processor B in the buffer 240 for the processor B.

ステップ450) レコード結合部220は、プロセッサB用のバッファ240に格納されたレコードのキー値の最大値が、プロセッサA用のバッファ250に格納されたレコードのキー値の最大値以上になっているかどうかを確認する(インデックスA,Bの結合をプロセッサJにて行うには、両方のインデックスキー値が揃った状態で行う必要がある。図7、図8に示したアルゴリズムでは、キー値は小さい値から順番に処理していくので、ここで最大値を確認し、他方の最大値以上であれば、キー値が等しいレコードまで結合することが可能となる)。   Step 450) The record combining unit 220 determines that the maximum value of the key value of the record stored in the processor B buffer 240 is equal to or greater than the maximum value of the key value of the record stored in the processor A buffer 250. (In order to combine the indexes A and B with the processor J, it is necessary to perform both of the index key values together. In the algorithms shown in FIGS. 7 and 8, the key value is small.) Since the processing is performed in order from the value, the maximum value is confirmed here, and if it is equal to or larger than the other maximum value, it is possible to combine records having the same key value).

ステップ455) プロセッサB用のバッファ240に格納されたレコードのキー値の最大値が、プロセッサA用のバッファ250に格納されたレコードのキー値の最大値以上になっている場合は、ステップ460に移行し、そうでなければステップ410に戻る。   Step 455) When the maximum value of the key value of the record stored in the buffer 240 for the processor B is equal to or larger than the maximum value of the key value of the record stored in the buffer 250 for the processor A, the process proceeds to step 460. Otherwise, return to step 410.

ステップ460) レコード結合部220は、プロセッサA用のバッファ250、プロセッサB用のバッファ240からキー値が等しいレコードまでを抽出し、結合して結合結果出力装置320に出力する。   Step 460) The record combining unit 220 extracts the records having the same key value from the buffer 250 for the processor A and the buffer 240 for the processor B, combines them, and outputs them to the combination result output device 320.

以下に、本発明による手法と、従来の技術による手法で500万件のデータ同士を全件マージ結合した場合の比較データを図10に示す。モックアップによる試験のため、インデックス読み込み処理等に違いがあり、インデックス読み込み処理時間等を公平に比較することはできないが、本発明により、ネットワーク転送処理時間が減少していることが確認できた。   FIG. 10 shows comparison data when 5 million pieces of data are merged and joined by the method according to the present invention and the method according to the conventional technique. Due to the mock-up test, there is a difference in index reading processing and the like, and the index reading processing time cannot be compared fairly, but it was confirmed that the network transfer processing time was reduced by the present invention.

本発明は、図3に示すプロセッサの構成に基づいて説明したが、この例に限定されることなく、各プロセッサの構成要素の動作をプログラムとして構築し、各プロセッサ(コンピュータ)にインストールして実行させる、または、ネットワークを介して流通させることが可能である。   Although the present invention has been described based on the configuration of the processor shown in FIG. 3, the present invention is not limited to this example, and the operation of each processor component is constructed as a program, installed in each processor (computer), and executed. Or can be distributed via a network.

また、構築されたプログラムをハードディスクや、フレキシブルディスク、CD−ROM等の可搬記憶媒体に格納し、コンピュータにインストールする、または、配布することが可能である。   In addition, the constructed program can be stored in a portable storage medium such as a hard disk, a flexible disk, or a CD-ROM, and can be installed or distributed in a computer.

なお、本発明は、上記の実施の形態に限定されることなく、特許請求の範囲内において種々変更・応用が可能である。   The present invention is not limited to the above-described embodiment, and various modifications and applications can be made within the scope of the claims.

本発明は、DBMS(Data Base Management System)やRDBMS(Relational Date Base Management System)に適用可能である。   The present invention is applicable to DBMS (Data Base Management System) and RDBMS (Relational Date Base Management System).

本発明の原理を説明するための図である。It is a figure for demonstrating the principle of this invention. 本発明の原理構成図である。It is a principle block diagram of this invention. 本発明の一実施の形態における分散インデックス結合システムの構成図である。It is a block diagram of the distributed index coupling | bonding system in one embodiment of this invention. 本発明の一実施の形態におけるレコードリスト記憶部を説明するための図である。It is a figure for demonstrating the record list memory | storage part in one embodiment of this invention. 本発明の一実施の形態における全体の動作のフローチャートである。It is a flowchart of the whole operation | movement in one embodiment of this invention. 本発明の一実施の形態におけるマージ結合のフローチャートである。It is a flowchart of the merge connection in one embodiment of this invention. 本発明の一実施の形態におけるインデックスB検索処理のフローチャートである。It is a flowchart of the index B search process in one embodiment of this invention. 本発明の一実施の形態におけるインデックスA検索処理のフローチャートである。It is a flowchart of the index A search process in one embodiment of this invention. 本発明の一実施の形態におけるプロセッサJによるインデックスA,B結合処理のフローチャートである。It is a flowchart of the index A and B combining process by the processor J in one embodiment of this invention. 本発明の手法と従来の手法の比較結果である。It is a comparison result of the method of the present invention and the conventional method. 従来のマージ結合のフローチャートである。It is a flowchart of the conventional merge join.

符号の説明Explanation of symbols

100 入出力部
110 検索手段、検索部
120 キー値リスト生成手段、キー値リスト処理部
130 記憶手段、キー値リスト記憶部
140 通信部
141 送信手段
150 検索フラグリスト処理部
151 検索フラグリストB初期化手段
152 検索フラグリスト
210 マージ処理部
220 レコード結合手段、レコード結合部
230 通信部
240 バッファB
250 バッファA
310 検索条件入力装置
320 結合結果出力装置
100 Input / output unit 110 Search unit, search unit 120 Key value list generation unit, key value list processing unit 130 Storage unit, key value list storage unit 140 Communication unit 141 Transmission unit 150 Search flag list processing unit 151 Search flag list B initialization Means 152 Search Flag List 210 Merge Processing Unit 220 Record Combining Unit, Record Combining Unit 230 Communication Unit 240 Buffer B
250 Buffer A
310 Search condition input device 320 Combined result output device

Claims (2)

ットワークに複数のプロセッサが接続されている分散ネットワークシステムにおいて、該ネットワークを経由してインデックス同士をマージする分散インデックスの結合方法であって、
複数のレコードのインデックスからなるインデックスA,該インデックスAを走査するためのN個のポインタからなるポインタリスト及び、該ポインタに対応するレコードのキー値からなるキー値リストを格納する記憶手段Aを有するプロセッサAと、
複数のレコードのインデックスからなるインデックスB、該インデックスBを走査するためのN個のポインタからなるポインタリスト及び、該ポインタに対応するレコードのキー値からなるキー値リストを格納する記憶手段Bを有するプロセッサBと、
前記プロセッサAの前記インデックスAのレコードと前記プロセッサBの前記インデックスBのレコードを結合するプロセッサJと、が前記ネットワークを介して接続されているシステムにおいて、
前記プロセッサAにおいて、
前記プロセッサBから、真偽値が設定された検索フラグリストBと、N個分のポインタに対応するレコードのキー値からなるキー値リストBを受信する受信Aステップと、
前記検索フラグリストBから取り出したi番目(i≧1)フラグが立っている場合は、インデックスAのポインタリストのi番目に該当するポインタが指すレコードを送信用バッファAに格納する検索フラグ処理Aステップと、
検索フラグリストAを初期化し、前記キー値リストBから取り出したi番目のキー値で前記記憶手段AからインデックスAを検索し、検索条件を満たすレコードがある場合は、該レコードを前記送信用バッファAに格納し、前記検索フラグリストAのi番目にフラグを立てる検索Aステップと、
前記プロセッサBから取得した前記キー値リストBのN番目の値を超える最小の値から順にN個分のキー値リストAを生成するキー値リストA生成ステップと、
前記キー値リストAと前記検索フラグリストAを前記プロセッサBに送信するリスト送信Aステップと、
前記バッファAに格納されたレコードの格納量が、予め決められた閾値以上になった場合に、該バッファのレコードを前記プロセッサJに送信するレコード送信Aステップと、
を行い、
前記プロセッサBにおいて、
前記プロセッサAから、真偽値が設定された検索フラグリストAと、N個分のポインタに対応するレコードのキー値からなるキー値リストAを受信する受信Bステップと、
前記検索フラグリストAから取り出したi番目(i≧1)フラグが立っている場合は、インデックスBのポインタリストのi番目に該当するポインタが指すレコードを送信用バッファBに格納する検索フラグ処理Bステップと、
検索フラグリストBを初期化し、前記キー値リストAから取り出したi番目のキー値で前記記憶手段BからインデックスBを検索し、検索条件を満たすレコードがある場合は、該レコードを前記送信用バッファBに格納し、前記検索フラグリストBのi番目にフラグを立てる検索Bステップと、
前記キー値リストAのN番目の値を超える最小の値から順にN個分のキー値リストBを生成するキー値リストB生成ステップと、
前記検索フラグリストBと前記キー値リストBを前記プロセッサAに送信するリスト送信Bステップと、
前記バッファBに格納されたレコードの格納量が、予め決められた閾値以上になった場合に、該バッファのレコードを前記プロセッサJに送信するレコード送信Bステップと、
を行い、
前記プロセッサJは、
前記プロセッサAから受信したレコードをプロセッサA用バッファに格納し、前記プロセッサBから受信したレコードをプロセッサB用バッファに格納し、
前記プロセッサA用バッファと前記プロセッサB用バッファに格納されているレコードを結合して出力する
ことを特徴とする分散インデックスの結合方法。
In a distributed network system to network multiple processors are connected to a coupling method of distributed index merging index each other via the network,
A storage means A is provided for storing an index A composed of indexes of a plurality of records, a pointer list composed of N pointers for scanning the index A, and a key value list composed of key values of records corresponding to the pointers. Processor A;
There is provided storage means B for storing an index B composed of indexes of a plurality of records, a pointer list composed of N pointers for scanning the index B, and a key value list composed of key values of records corresponding to the pointers Processor B;
In the system in which the processor A that combines the record of the index A of the processor A and the record of the index B of the processor B is connected via the network,
In the processor A,
From the processor B, and the search flag list B a true false value is set, and receiving A step of receiving a key value list B consisting of key value of the record corresponding to the pointer of the N content,
When the i-th (i ≧ 1) flag taken out from the search flag list B is set, the search flag processing A for storing the record pointed to by the i-th pointer in the pointer list of the index A in the transmission buffer A Steps,
The search flag list A is initialized, the index A is searched from the storage means A with the i-th key value extracted from the key value list B, and if there is a record satisfying the search condition, the record is stored in the transmission buffer. A search A step of storing in A and flagging the i-th flag in the search flag list A;
A key value list A generation step of generating N key value lists A in order from the smallest value exceeding the Nth value of the key value list B acquired from the processor B;
A list transmission A step of transmitting the key value list A and the search flag list A to the processor B;
A record transmission A step of transmitting a record of the buffer to the processor J when the storage amount of the record stored in the buffer A is equal to or greater than a predetermined threshold;
And
In the processor B,
A reception B step for receiving from the processor A a search flag list A in which true / false values are set, and a key value list A consisting of key values of records corresponding to N pointers;
When the i-th (i ≧ 1) flag taken out from the search flag list A is set, the search flag processing B for storing the record pointed to by the i-th corresponding pointer in the pointer list of the index B in the transmission buffer B Steps,
The search flag list B is initialized, the index B is searched from the storage means B with the i-th key value extracted from the key value list A, and if there is a record that satisfies the search condition, the record is stored in the transmission buffer. A search B step for storing in B and flagging the i th flag in the search flag list B;
A key value list B generating step for generating N key value lists B in order from the smallest value exceeding the Nth value of the key value list A;
A list transmission B step of transmitting the search flag list B and the key value list B to the processor A;
A record transmission B step of transmitting a record of the buffer to the processor J when the storage amount of the record stored in the buffer B exceeds a predetermined threshold;
The stomach line,
The processor J is
The record received from the processor A is stored in the processor A buffer, the record received from the processor B is stored in the processor B buffer,
A method of combining distributed indexes, wherein the records stored in the processor A buffer and the processor B buffer are combined and output .
ットワークに複数のプロセッサが接続されている分散ネットワークシステムにおいて、該ネットワークを経由してインデックス同士をマージする分散インデックスの結合システムであって、
複数のレコードのインデックスからなるインデックスA,該インデックスAを走査するためのN個のポインタからなるポインタリスト及び、該ポインタに対応するレコードのキー値からなるキー値リストを格納する記憶手段Aを有するプロセッサAと、
複数のレコードのインデックスからなるインデックスB、該インデックスBを走査するためのN個のポインタからなるポインタリスト及び、該ポインタに対応するレコードのキー値からなるキー値リストを格納する記憶手段Bを有するプロセッサBと、
前記プロセッサAの前記インデックスAのレコードと前記プロセッサBの前記インデックスBのレコードを結合するプロセッサJと、を有し、
前記プロセッサAは
前記プロセッサBから、真偽値が設定された検索フラグリストBと、N個分のポインタに対応するレコードのキー値からなるキー値リストBを受信する受信A手段と、
前記検索フラグリストBから取り出したi番目(i≧1)フラグが立っている場合は、インデックスAのポインタリストのi番目に該当するポインタが指すレコードを送信用バッファAに格納する検索フラグ処理A手段と、
検索フラグリストAを初期化し、前記キー値リストBから取り出したi番目のキー値で前記記憶手段AからインデックスAを検索し、検索条件を満たすレコードがある場合は、該レコードを前記送信用バッファAに格納し、前記検索フラグリストAのi番目にフラグを立てる検索A手段と、
前記プロセッサBから取得した前記キー値リストBのN番目の値を超える最小の値から順にN個分のキー値リストAを生成するキー値リストA生成手段と、
前記キー値リストAと前記検索フラグリストAを前記プロセッサBに送信するリスト送信A手段と、
前記バッファAに格納されたレコードの格納量が、予め決められた閾値以上になった場合に、該バッファのレコードを前記プロセッサJに送信するレコード送信A手段と、
を有し、
前記プロセッサBは
前記プロセッサAから、真偽値が設定された検索フラグリストAと、N個分のポインタに対応するレコードのキー値からなるキー値リストAを受信する受信B手段と、
前記検索フラグリストAから取り出したi番目(i≧1)フラグが立っている場合は、インデックスBのポインタリストのi番目に該当するポインタが指すレコードを送信用バッファBに格納する検索フラグ処理B手段と、
検索フラグリストBを初期化し、前記キー値リストAから取り出したi番目のキー値で前記記憶手段BからインデックスBを検索し、検索条件を満たすレコードがある場合は、該レコードを前記送信用バッファBに格納し、前記検索フラグリストBのi番目にフラグを立てる検索B手段と、
前記プロセッサAから取得した前記キー値リストAのN番目の値を超える最小の値から順にN個分のキー値リストBを生成するキー値リストB生成手段と、
前記検索フラグリストBと前記キー値リストBを前記プロセッサAに送信するリスト送信B手段と、
前記バッファBに格納されたレコードの格納量が、予め決められた閾値以上になった場合に、該バッファのレコードを前記プロセッサJに送信するレコード送信B手段と、
を有し、
前記プロセッサJは、
前記プロセッサAから受信したレコードを格納するプロセッサA用バッファと、
前記プロセッサBから受信したレコードを格納するプロセッサB用バッファと、
前記プロセッサA用バッファと前記プロセッサB用バッファに格納されているレコードを結合して出力するレコード結合手段と、
を有することを特徴とする分散インデックスの結合システム。
In a distributed network system in which a plurality of processors are connected to a network, a coupling system of distributed index merging index each other via the network,
A storage means A is provided for storing an index A composed of indexes of a plurality of records, a pointer list composed of N pointers for scanning the index A, and a key value list composed of key values of records corresponding to the pointers. Processor A;
There is provided storage means B for storing an index B composed of indexes of a plurality of records, a pointer list composed of N pointers for scanning the index B, and a key value list composed of key values of records corresponding to the pointers Processor B;
A processor J for combining the record of the index A of the processor A and the record of the index B of the processor B ;
The processor A,
Receiving A means for receiving from the processor B a search flag list B in which true / false values are set, and a key value list B consisting of key values of records corresponding to N pointers;
When the i-th (i ≧ 1) flag taken out from the search flag list B is set, the search flag processing A for storing the record pointed to by the i-th pointer in the pointer list of the index A in the transmission buffer A Means,
The search flag list A is initialized, the index A is searched from the storage means A with the i-th key value extracted from the key value list B, and if there is a record satisfying the search condition, the record is stored in the transmission buffer. Search A means for storing in A and flagging the i-th flag in the search flag list A;
And key value list A generating means for generating a N-th key value list A of N content from the minimum value in the order exceeds the value of the key value list B acquired from the processor B,
List transmission A means for transmitting the key value list A and the search flag list A to the processor B;
A record transmission A means for transmitting a record of the buffer to the processor J when the storage amount of the record stored in the buffer A is equal to or greater than a predetermined threshold;
Have
The processor B is
Receiving B means for receiving, from the processor A, a search flag list A in which true / false values are set, and a key value list A consisting of key values of records corresponding to N pointers;
When the i-th (i ≧ 1) flag taken out from the search flag list A is set, the search flag processing B for storing the record pointed to by the i-th corresponding pointer in the pointer list of the index B in the transmission buffer B Means,
The search flag list B is initialized, the index B is searched from the storage means B with the i-th key value extracted from the key value list A, and if there is a record that satisfies the search condition, the record is stored in the transmission buffer. Search B means stored in B and flagging the i-th flag in the search flag list B ;
Key value list B generating means for generating N key value lists B in order from the smallest value exceeding the Nth value of the key value list A acquired from the processor A;
List transmission B means for transmitting the search flag list B and the key value list B to the processor A;
A record transmission B means for transmitting a record in the buffer to the processor J when the storage amount of the record stored in the buffer B exceeds a predetermined threshold;
Have
The processor J is
A processor A buffer for storing records received from the processor A;
A processor B buffer for storing records received from the processor B;
Record combining means for combining and outputting records stored in the processor A buffer and the processor B buffer;
A distributed index combining system comprising:
JP2008301691A 2008-11-26 2008-11-26 Distributed index join method and system Expired - Fee Related JP5244559B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008301691A JP5244559B2 (en) 2008-11-26 2008-11-26 Distributed index join method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008301691A JP5244559B2 (en) 2008-11-26 2008-11-26 Distributed index join method and system

Publications (2)

Publication Number Publication Date
JP2010128721A JP2010128721A (en) 2010-06-10
JP5244559B2 true JP5244559B2 (en) 2013-07-24

Family

ID=42329076

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008301691A Expired - Fee Related JP5244559B2 (en) 2008-11-26 2008-11-26 Distributed index join method and system

Country Status (1)

Country Link
JP (1) JP5244559B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11727009B2 (en) 2020-09-29 2023-08-15 Hcl Technologies Limited System and method for processing skewed datasets

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5342087B2 (en) * 2011-03-30 2013-11-13 株式会社日立製作所 Computer system and data management method

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11727009B2 (en) 2020-09-29 2023-08-15 Hcl Technologies Limited System and method for processing skewed datasets

Also Published As

Publication number Publication date
JP2010128721A (en) 2010-06-10

Similar Documents

Publication Publication Date Title
KR101171501B1 (en) Transaction aggregation to increase transaction processing throughput
US20120323919A1 (en) Distributed reverse semantic index
US20100138405A1 (en) Hybrid Push/Pull Execution of Continuous SQL Queries
US20110137864A1 (en) High throughput, reliable replication of transformed data in information systems
US20120303761A1 (en) Breakpoint continuous transmission method
US20110029477A1 (en) Information similarity and related statistical techniques for use in distributed computing environments
US8781980B2 (en) Matching pattern of events with interval conditions
US20140201240A1 (en) System and method to retrieve relevant multimedia content for a trending topic
CN104376127A (en) Data manipulation method and device
CN104584524A (en) Aggregating data in a mediation system
US20100005147A1 (en) Ordered message processing
US10783127B2 (en) Componentized data storage
US9813331B2 (en) Assessing response routes in a network
US7774308B2 (en) Anti-item for deletion of content in a distributed datastore
JP5244559B2 (en) Distributed index join method and system
US20150066908A1 (en) Presenting a combined search results summary in a graphical view
US20090147780A1 (en) Priority-Based Data Message Publishing Method and System According to a Data Message Chain
CN115114370B (en) Master-slave database synchronization method and device, electronic equipment and storage medium
CN110990363B (en) Distributed database multithreading collaborative transaction log playback method and system
US20200320075A1 (en) Method of Extracting Relationships from a Nosql Database
Gasieniec et al. Adaptive broadcasting with faulty nodes
JP5112137B2 (en) Distributed index join method and system
JP4966175B2 (en) Distributed index join method and system
US8732158B1 (en) Method and system for matching queries to documents
CN113238711B (en) Efficient hash calculation method in field of electronic data evidence obtaining

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20110118

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20120927

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20121009

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20121206

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: 20130402

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20130408

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

Free format text: PAYMENT UNTIL: 20160412

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

LAPS Cancellation because of no payment of annual fees