JP5112137B2 - Distributed index join method and system - Google Patents
Distributed index join method and system Download PDFInfo
- Publication number
- JP5112137B2 JP5112137B2 JP2008084576A JP2008084576A JP5112137B2 JP 5112137 B2 JP5112137 B2 JP 5112137B2 JP 2008084576 A JP2008084576 A JP 2008084576A JP 2008084576 A JP2008084576 A JP 2008084576A JP 5112137 B2 JP5112137 B2 JP 5112137B2
- Authority
- JP
- Japan
- Prior art keywords
- index
- record
- processor
- list
- search
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
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つのデータベースが結合条件でソートされている場合には、先頭から順次突き合わせてマージするマージ結合や、一方のデータベースのレコードをハッシュ表に展開することにより結合条件を満たすレコードを求めるハッシュやインデックスを用いたハッシュ結合等が知られている。この例を図9に示す。 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
ステップ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
ステップ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参照)。
しかしながら、上記の図9に示すアルゴリズムをネットワークにより分散したシステムにそのまま適用すると、通信回数が増大し、性能が現れないという問題がある。 However, if the algorithm shown in FIG. 9 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個(N≧2)のポインタからなるポインタリスト及び該ポインタに対応するソートされたレコードのキー値からなるレコードリストを格納する記憶手段Aを有するプロセッサAと、
複数のレコードのインデックスからなるインデックスB、該インデックスBを走査するためのN個(N≧2)のポインタからなるポインタリスト及び該ポインタに対応するソートされたレコードのキー値からなるレコードリストを格納する記憶手段Bを有するプロセッサBと、
プロセッサAのインデックスAのレコードとプロセッサBのインデックスBのレコードを結合するプロセッサJと、がネットワークを介して接続されているシステムにおいて、
プロセッサAにおいて、
全てのインデックスAの先頭から順にN個分のレコードリストAを生成してプロセッサBに送信する初期レコード送信ステップを行い(ステップ1)、
プロセッサBにおいて、
プロセッサAから送信されたレコードリストAに基づいて、記憶手段BからインデックスBを検索するインデックス検索ステップBと(ステップ2)、
インデックス検索ステップBにより検索条件を満たしたインデックスBのレコードとインデックスAのレコードとをプロセッサJに送信する結合レコード送信ステップBと(ステップ3)、
インデックスBにおいて、レコードリストAのN番目の値(リスト中の最大値)を超える最小の値から順にN個分のレコードリストBを生成して(ステップ5)プロセッサAに送信する(ステップ6)レコードリスト送信ステップBと、を行い、
プロセッサAにおいて、
プロセッサBから送信されたレコードリストBに基づいて、記憶手段AからインデックスAを検索するインデックス検索ステップA(ステップ7)と、
インデックス検索ステップAにより検索条件を満たしたインデックスAのレコードとインデックスBのレコードとをプロセッサJに送信する結合レコード送信ステップAと(ステップ8)、
インデックスAにおいて、レコードリストBのN番目の値(リスト中の最大値)を超える最小の値から順にN個分のレコードリストAを生成して(ステップ10)プロセッサBに送信する(ステップ11)レコードリスト送信ステップAと、を行う。
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,
Stores an index A composed of indexes of a plurality of records, a pointer list composed of N (N ≧ 2) pointers for scanning the index A, and a record list composed of key values of sorted records corresponding to the pointers Processor A having storage means A for
An index B composed of indexes of a plurality of records, a pointer list composed of N (N ≧ 2) pointers for scanning the index B, and a record list composed of key values of sorted records corresponding to the pointers are stored. Processor B having storage means B for
In a 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 a network,
In processor A,
An initial record transmission step of generating N record lists A in order from the top of all indexes A and transmitting them to the processor B is performed (step 1).
In processor B,
Index search step B for searching index B from storage means B based on record list A transmitted from processor A (step 2),
A combined record transmission step B for transmitting the record of the index B and the record of the index A that satisfy the search condition by the index search step B to the processor J (step 3);
In the index B, N record lists B are generated in order from the smallest value exceeding the Nth value (maximum value in the list) of the record list A (step 5) and transmitted to the processor A (step 6). Perform record list transmission step B ,
In processor A,
Index search step A (step 7) for searching index A from storage means A based on record list B transmitted from processor B ;
A combined record transmission step A for transmitting the record of the index A and the record of the index B that satisfy the search condition in the index retrieval step A to the processor J (step 8);
In the index A, N record lists A are generated in order from the smallest value exceeding the Nth value (maximum value in the list) of the record list B (step 10) and transmitted to the processor B (step 11). Record list transmission step A is performed.
図2は、本発明の原理構成図である。 FIG. 2 is a principle configuration diagram of the present invention.
本発明(請求項2)は、ネットワークに複数のプロセッサが接続されている分散ネットワークシステム上で、該ネットワークを経由してインデックス同士をマージする分散インデックスの結合システムであって、
システムは、
複数のレコードのインデックスからなるインデックスA、該インデックスAを走査するためのN個(N≧2)のポインタからなるポインタリスト及び該ポインタに対応するソートされたレコードのキー値からなるレコードリストを格納する記憶手段130Aを有するプロセッサAと、
複数のレコードのインデックスからなるインデックスB、該インデックスBを走査するためのN個(N≧2)のポインタからなるポインタリスト及び該ポインタに対応するソートされたレコードのキー値からなるレコードリストを格納する記憶手段130Bを有するプロセッサBと、
プロセッサAのインデックスAのレコードとプロセッサBのインデックスBのレコードを結合するプロセッサJと、有し、
プロセッサAは、
全てのインデックスAの先頭から順にN個分のレコードリストAを生成してプロセッサBに送信する初期レコード送信手段Aと、
プロセッサBから送信されたレコードリストBに基づいて、記憶手段AからインデックスAを検索するインデックス検索手段110Aと、
インデックス検索手段110Aにより検索条件を満たしたインデックスAのレコードとインデックスBのレコードとをプロセッサJに送信する結合レコード送信手段141Aと、
インデックスAにおいて、レコードリストBのN番目の値(リスト中の最大値)を超える最小の値から順にN個分のレコードリストAを生成してプロセッサBに送信するレコードリスト送信手段140Aと、を有し、
プロセッサBは、
プロセッサAから送信されたレコードリストAに基づいて、記憶手段130BからインデックスBを検索するインデックス検索手段110Bと、
インデックス検索手段Bにより検索条件を満たしたインデックスBのレコードとインデックスAのレコードとをプロセッサJに送信する結合レコード送信手段141Bと、
インデックスBにおいて、レコードリストAのN番目の値(リスト中の最大値)を超える最小の値から順にN個分のレコードリストBを生成してプロセッサAに送信するレコードリスト送信手段140Bと、を有する。
The present invention (claim 2), on a 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,
the system,
Stores an index A composed of indexes of a plurality of records, a pointer list composed of N (N ≧ 2) pointers for scanning the index A, and a record list composed of key values of sorted records corresponding to the pointers Processor A having storage means 130A for
An index B composed of indexes of a plurality of records, a pointer list composed of N (N ≧ 2) pointers for scanning the index B, and a record list composed of key values of sorted records corresponding to the pointers are stored. Processor B having storage means 130B for
A processor J coupling a record of the index B of the record and processor B Index A processor A, a,
Processor A
Initial record transmitting means A for generating N record lists A in order from the top of all indexes A and transmitting them to the processor B ;
Based on the record list B transmitted from the processor B, the index search means 110A for searching the index A from the storage means A ;
A combined record transmission unit 141A that transmits the record of index A and the record of index B that satisfy the search condition by the
In the index A, record list transmission means 140A for generating N record lists A in order from the smallest value exceeding the Nth value (maximum value in the list) of the record list B and transmitting it to the processor B. Have
Processor B
Based on the record list A transmitted from the processor A, the index search means 110B for searching the index B from the storage means 130B;
Combined record transmission means 141B for transmitting the record of index B and the record of index A that satisfy the search condition by the index search means B to the processor J;
In the index B, record list transmission means 140B for generating N record lists B in order from the smallest value exceeding the Nth value (maximum value in the list) of the record list A and transmitting it to the processor A. Have.
上記のように本発明によれば、各プロセッサにおいて、インデックスを走査するポインタをN個有し、プロセッサ間においてN個のポインタからなるポインタリスト単位で、N個分のポインタに対応するレコード(レコードリスト)を送信することにより、処理負荷が低減される。これは、ネットワーク経由の場合、データ送受信の起動・停止に関わる処理のオーバーヘッドが大きいため、送受信するデータの総量は同じであっても、そのやり取りに要する回数を減らすことにより、処理時間が短縮される。 As described above, according to the present invention, each processor has N pointers for scanning an index, and records (records) corresponding to N pointers in a pointer list unit including N pointers between processors. By transmitting (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 the exchange. The
以下、図面と共に本発明の実施の形態を説明する。 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のレコードを結合する、プロセッサA、Bとは別のプロセッサJから構成される。 The distributed index combination system shown in FIG. 1 includes a processor A having an index A, a processor B having an index B, and a processor J different from the processors A and B that combine the records of the processors A and B. The
プロセッサAとプロセッサBは、同様の構成であり、それぞれ、入出力部100、インデックス検索部110、レコードリスト処理部120、レコードリスト記憶部130、レコードリスト通信部140から構成される。
The processor A and the processor B have the same configuration, and include an input / output unit 100, an
レコードリスト記憶部130は、図4に示すように、ポインタリストとレコードリストを格納する。以下の説明において、「ポインタ」とは、インデックスのどこを検索しているかを指すポインタであり、複数のポインタをリスト化したものを「ポインタリスト」と呼ぶ。また、ポインタリストで指し示しているインデックスのレコードをレコードリストである。図4の例では、ポインタリストの先頭は、インデックスの先頭のレコードを指しており、当該レコードのキー値「0034」がレコードリストに設定されている。ポインタリストの2番目はインデックスのn番目のレコードを指しており、当該レコードのキー値「0305」がレコードリストに設定されている。
As shown in FIG. 4, the record
プロセッサJは、インデックスAを持つプロセッサA,インデックスBを持つプロセッサBとは別の、インデックス同士のマージ結合を統括するプロセッサで、以下のフローチャートで表される処理全体を実行するトリガとなるプロセッサである。プロセッサJは、マージ処理部210とレコード結合部220を有し、マージ処理部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 and a
マージ処理部210は、プロセッサA,Bに対して、検索条件入力装置310から入力された検索条件をプロセッサA,Bに出力する。
The merge processing unit 210 outputs the search condition input from the search
レコード結合部220は、プロセッサA及び、プロセッサBのレコードリスト通信部140から送信されたインデックスの検索結果の該当レコードを結合し、結合結果出力装置320に出力する。この処理が実行されるということは、両インデックスに共通するキー値を持つレコードがあったということを示している。
The
以下に、上記の構成における動作を説明する。 The operation in the above configuration will be described below.
図5は、本発明の一実施の形態におけるマージ結合のフローチャートである。 FIG. 5 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 /
ステップ116) プロセッサAにおいて、インデックスAのレコードを指すN個のポインタが入出力部100Aを介して入力されると、レコードリスト処理部120Aにおいて、インデックスAの先頭レコードから順にN個分のレコードを指すように、N個のポインタを初期化し、初期化済みのインデックスAのレコードを指すN個のポインタリストを出力する。
Step 116) When N pointers pointing to the records of the index A are input via the input /
ステップ120) レコードリスト処理部120Aにおいて、レコードリスト記憶部130AからインデックスAのレコードを指すN個のポインタリストを読み込み、N個のポインタリストが示すインデックスAの各レコードのキー値を取得してリスト化し、レコードリストとしてレコードリスト記憶部130Aに格納すると共に、レコードリスト通信部140Aを介してプロセッサBに送信する。
Step 120) In the record
ステップ125) プロセッサBのレコードリスト通信部140Bでレコードリストを受信すると、レコードリスト処理部120Bは、そのレコードリストをメモリ(図示せず)のプロセッサAのレコードリスト領域に格納する。そして、インデックス検索部110Bは、プロセッサAから取得したインデックスAのN個のレコードリストのレコードのキー値を検索キーとして、レコードリスト記憶部130BからインデックスBを検索し、インデックスBのレコードを指すN個のポインタリストを取得する。当該ステップの詳細については後述する。
Step 125) When the record list is received by the record
ステップ130) レコードリスト処理部120Bは、取得したインデックスBのレコードを指すN個のポインタリストが示すインデックスBの各レコードのキー値を取得してレコードリストとしてレコードリスト記憶部130Bに格納すると共に、レコードリスト通信部140Bを介してプロセッサAに送信する。
Step 130) The record list processing unit 120B acquires the key value of each record of the index B indicated by the N pointer lists indicating the acquired records of the index B, stores the key value in the record list storage unit 130B as a record list, and The data is transmitted to the processor A via the record
ステップ135) プロセッサAのレコードリスト通信部140を介してプロセッサBからレコードリストを取得すると、レコードリスト処理部120において、そのレコードリストをメモリ(図示せず)に格納する。インデックス検索部110Aは、取得したインデックスBのN個のレコードリストのレコードのキー値を検索キーとして、レコードリスト記憶部記憶部130AからインデックスAを検索し、インデックスBのレコードを指すN個のポインタリストを取得する。詳細については後述する。
Step 135) When the record list is acquired from the processor B via the record
次に、上記のステップ125のインデックスBの検索処理について詳細に説明する。
Next, the index B search process in
図6は、本発明の一実施の形態におけるインデックス検索処理のフローチャートである。 FIG. 6 is a flowchart of the index search process according to the embodiment of the present invention.
ステップ210) プロセッサBのレコードリスト処理部120Bにおいて、メモリ(図示せず)に、N個分まとめて処理するためのループカウンタjを設け、j=1と初期化する。 Step 210) In the record list processing unit 120B of the processor B, a loop counter j is provided in the memory (not shown) for processing all N pieces and is initialized as j = 1.
ステップ215) レコードリスト処理部120Bは、プロセッサAから送信されたインデックスAのN個のレコードリストからカウンタjに相当するレコード(インデックスAのレコードリスト中j番目のレコード)を取り出す。 Step 215) The record list processing unit 120B extracts a record corresponding to the counter j (jth record in the record list of the index A) from the N record lists of the index A transmitted from the processor A.
ステップ225) インデックス検索部110Bは、ステップ215で取り出されたインデックスAのレコードリスト中j番目のレコードのキー値を用いて、レコードリスト記憶部130BからインデックスBを検索する。検索結果が「真」の場合はインデックスBの検索結果該当レコードを指すポインタが出力される。
Step 225) The
ステップ230) 検索条件を満たすレコードがインデックスBに存在するか否かを判定する。ステップ225における検索結果が「真」の場合はステップ235に移行し、「偽」の場合はステップ265に移行する。
Step 230) It is determined whether or not a record satisfying the search condition exists in the index B. If the search result in
ステップ235) レコードリスト処理部120Bは、ステップ225で得られたポインタが指すインデックスBの検索結果該当レコードをレコードリスト記憶部130Bから取得し、インデックスAのレコードリスト中j番目のレコードと共に、レコードリスト通信部140Bを介してプロセッサJに送信する。
Step 235) The record list processing unit 120B obtains the record corresponding to the search result of the index B indicated by the pointer obtained in
プロセッサJのレコード結合部220は、プロセッサBから送信されたインデックスBの検索結果該当レコードと、インデックスAのレコードリスト中j番目のレコードを結合して結合結果出力装置320に出力する。
The
ステップ265) ループ用のカウンタjがNを超えていないかどうか確認する。Nを超えていない、すなわち、N回のループが終了していなければ、ステップ270に移行し、Nを超えている、すなわち、N回のループが終了していればステップ240に移行する。 Step 265) It is confirmed whether the counter j for the loop does not exceed N. If N is not exceeded, that is, if 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 240.
ステップ270) カウンタjを1インクリメントし、ステップ215に移行する。 Step 270) The counter j is incremented by 1, and the process proceeds to Step 215.
ステップ240) インデックス検索部110Bは、ステップ265の条件分岐により、ステップ215にて取り出されたインデックスAのレコードリスト中のN番目のレコードのキー値を用いて、レコードリスト記憶部130BのインデックスBから、「キー値を超える最小の値」を検索する。検索結果が「真」の場合は、インデックスBの検索結果該当レコードを指すポインタを出力する。
Step 240) The
ステップ245) ステップ240において、プロセッサJから与えられた検索条件を満たすレコードがインデックスBに存在するかどうか確認し、存在すれば、ステップ251に移行し、存在しなければ処理を終了する。
Step 245) In
ステップ251) レコードリスト処理部120Bは、インデックスBの検索結果該当レコードを指すポインタリストとインデックスBのレコードを指すN個のポインタリストへ記録する。 Step 251) The record list processing unit 120B records the index B search result in the pointer list indicating the corresponding record and the N pointer list indicating the record in the index B.
図7は、本発明の一実施の形態におけるインデックスA検索処理のフローチャートである。 FIG. 7 is a flowchart of the index A search process according to the embodiment of the present invention.
ステップ310) プロセッサAのレコードリスト処理部120Aにおいて、メモリ(図示せず)にN個分纏めて処理するためのループカウンタiを設け、i=1とする。
Step 310) In the record
ステップ315) レコードリスト処理部120Aは、プロセッサBから送信されたN個のレコードリストから、カウンタiに相当するレコード(インデックスBのレコードリスト中i番目のレコード)を取り出す。
Step 315) The record
ステップ326) インデックス検索部110Aは、インデックスBのレコードリスト中i番目のレコードが入力されると、レコードリスト記憶部130Aから該i番目のレコードのキー値を用いてインデックスAを検索する。検索結果が「真」の場合はインデックスAの検索結果の該当レコードを指すポインタを出力する。
Step 326) When the i-th record in the record list of index B is input, the
ステップ331) ステップ326で出力されたレコードのポインタについて、検索条件を満たすレコードがインデックスAに存在するかどうかを確認し、存在していればステップ335に移行し、存在していなければステップ365に移行する。 Step 331) With respect to the pointer of the record output in Step 326, it is confirmed whether or not a record satisfying the search condition exists in the index A. If it exists, the process proceeds to Step 335. If not, the process proceeds to Step 365. Transition.
ステップ335) レコードリスト処理部120Aは、レコードリスト記憶部130から、ステップ325で得られたポインタが指すインデックスAの検索結果該当レコードを取得し、インデックスBのレコードリスト中i番目のレコードと共に、プロセッサJに送信する。ここで、プロセッサJは、インデックスAを持つプロセッサA、インデックスBを持つプロセッサBとは別の、インデックス同士のマージ結合を統括するプロセッサであり、本フローチャートで表される処理全体を実行するトリガとなるプロセッサである。
Step 335) The record
プロセッサJのレコード結合部220は、プロセッサAから送信されたインデックスAとインデックスBのレコードを結合する。この処理が行われるということは、両インデックスに共通するキー値を持つレコードがあったということである。プロセッサJのレコード結合部220は、インデックスAのi番目の分割範囲検索結果該当レコード及びインデックスBのレコード中i番目のレコードを結果出力装置320に出力する。
The
ステップ365) ループ用カウンタiがNを超えていないかどうか確認し、Nを超えていない、すなわち、N回のループが終了していなければステップ370に移行し、Nを超えている、すなわち、N回のループが終了していれば、ステップ341に移行する。 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 341.
ステップ370) カウンタiを1インクリメントし、ステップ315に移行する。 Step 370) The counter i is incremented by 1, and the process proceeds to Step 315.
ステップ341) ステップ365の条件分岐により、ステップ315にて取得済みのインデックスBのレコード中N番目のレコードのキー値を用いて、インデックスAから「キー値を超える最小の値」を検索し、インデックスAの検索結果が「真」の場合は、インデックスAの検索結果該当レコードを指すポインタを出力する。
Step 341) According to the conditional branch in
ステップ346) ステップ341において、プロセッサJから与えられた検索条件を満たすレコードがインデックスAに存在するかどうかを判定し、存在すればステップ351に移行し、存在しなければ処理を終了する。 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 it exists, the process proceeds to step 351, and if not, the process ends.
ステップ351) レコードリスト処理部120Aは、インデックスAの検索結果の該当レコードから順にN個分のレコードを指すように、インデックスAのレコードを指すN個のポインタリストへ記録する。
Step 351) The record
以下に、本発明による手法と、従来の技術による手法で500万件のデータ同士を全件マージ結合した場合の比較データを図8に示す。モックアップによる試験のため、インデックス読み込み処理等に違いがあり、インデックス読み込み処理時間等を公平に比較することはできないが、本発明により、ネットワーク転送処理時間が減少していることが確認できた。 FIG. 8 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 Data Base Management System)に適用可能である。 The present invention is applicable to DBMS (Data Base Management System) and RDBMS (Relational Data Base Management System).
100 入出力部
110 インデックス検索手段、インデックス検索部
120 レコードリスト処理部
130 記憶手段、レコードリスト記憶部
140 レコードリスト送信手段、レコードリスト通信部
141 結合レコード送信手段
210 マージ処理部
220 結合手段、レコード結合部
310 検索条件入力装置
320 検索結果出力装置
100 I /
Claims (2)
複数のレコードのインデックスからなるインデックスA、該インデックスAを走査するためのN個(N≧2)のポインタからなるポインタリスト及び該ポインタに対応するソートされたレコードのキー値からなるレコードリストを格納する記憶手段Aを有するプロセッサAと、
複数のレコードのインデックスからなるインデックスB、該インデックスBを走査するためのN個(N≧2)のポインタからなるポインタリスト及び該ポインタに対応するソートされたレコードのキー値からなるレコードリストを格納する記憶手段Bを有するプロセッサBと、
前記プロセッサAの前記インデックスAのレコードと前記プロセッサBの前記インデックスBのレコードを結合するプロセッサJと、が前記ネットワークを介して接続されているシステムにおいて、
前記プロセッサAにおいて、
全てのインデックスAの先頭から順にN個分のレコードリストAを生成して前記プロセッサBに送信する初期レコード送信ステップを行い、
前記プロセッサBにおいて、
前記プロセッサAから送信された前記レコードリストAに基づいて、前記記憶手段BからインデックスBを検索するインデックス検索ステップBと、
前記インデックス検索ステップBにより検索条件を満たしたインデックスBのレコードとインデックスAのレコードとを前記プロセッサJに送信する結合レコード送信ステップBと、
前記インデックスBにおいて、前記レコードリストAのN番目の値(リスト中の最大値)を超える最小の値から順にN個分のレコードリストBを生成して前記プロセッサAに送信するレコードリスト送信ステップBと、を行い、
前記プロセッサAにおいて、
前記プロセッサBから送信された前記レコードリストBに基づいて、前記記憶手段AからインデックスAを検索するインデックス検索ステップAと、
前記インデックス検索ステップAにより検索条件を満たしたインデックスAのレコードとインデックスBのレコードとを前記プロセッサJに送信する結合レコード送信ステップAと、
前記インデックスAにおいて、前記レコードリストBのN番目の値(リスト中の最大値)を超える最小の値から順にN個分のレコードリストAを生成して前記プロセッサBに送信するレコードリスト送信ステップAと、を行う、
ことを特徴とする分散インデックスの結合方法。 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,
Stores an index A composed of indexes of a plurality of records, a pointer list composed of N (N ≧ 2) pointers for scanning the index A, and a record list composed of key values of sorted records corresponding to the pointers Processor A having storage means A for
An index B composed of indexes of a plurality of records, a pointer list composed of N (N ≧ 2) pointers for scanning the index B, and a record list composed of key values of sorted records corresponding to the pointers are stored. Processor B having storage means B for
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,
Performing an initial record transmission step of generating N record lists A in order from the top of all indexes A and transmitting them to the processor B;
In the processor B,
Based on the record list A transmitted from the processor A, an index search step B for searching the index B from the storage means B;
A combined record transmission step B for transmitting the index B record and the index A record that satisfy the search condition in the index search step B to the processor J;
A record list transmission step B for generating N record lists B in order from the smallest value exceeding the Nth value (maximum value in the list) of the record list A in the index B and transmitting it to the processor A And
In the processor A,
Based on the record list B transmitted from the processor B, an index search step A for searching the index A from the storage means A;
A combined record transmission step A for transmitting the index A record and the index B record satisfying the search condition in the index retrieval step A to the processor J;
A record list transmission step A for generating N record lists A in order from the smallest value exceeding the Nth value (maximum value in the list) of the record list B in the index A and transmitting it to the processor B And do,
A distributed index combining method characterized by the above.
前記システムは、
複数のレコードのインデックスからなるインデックスA、該インデックスAを走査するためのN個(N≧2)のポインタからなるポインタリスト及び該ポインタに対応するソートされたレコードのキー値からなるレコードリストを格納する記憶手段Aを有するプロセッサAと、
複数のレコードのインデックスからなるインデックスB、該インデックスBを走査するためのN個(N≧2)のポインタからなるポインタリスト及び該ポインタに対応するソートされたレコードのキー値からなるレコードリストを格納する記憶手段Bを有するプロセッサBと、
前記プロセッサAの前記インデックスAのレコードと前記プロセッサBの前記インデックスBのレコードを結合するプロセッサJと、有し、
前記プロセッサAは、
全てのインデックスAの先頭から順にN個分のレコードリストAを生成して前記プロセッサBに送信する初期レコード送信手段Aと、
前記プロセッサBから送信されたレコードリストBに基づいて、前記記憶手段AからインデックスAを検索するインデックス検索手段Aと、
前記インデックス検索手段Aにより検索条件を満たしたインデックスAのレコードとインデックスBのレコードとを前記プロセッサJに送信する結合レコード送信手段Aと、
前記インデックスAにおいて、前記レコードリストBのN番目の値(リスト中の最大値)を超える最小の値から順にN個分のレコードリストAを生成して前記プロセッサBに送信するレコードリスト送信手段Aと、を有し、
前記プロセッサBは、
前記プロセッサAから送信された前記レコードリストAに基づいて、前記記憶手段BからインデックスBを検索するインデックス検索手段Bと、
前記インデックス検索手段Bにより検索条件を満たしたインデックスBのレコードとインデックスAのレコードとを前記プロセッサJに送信する結合レコード送信手段Bと、
前記インデックスBにおいて、前記レコードリストAのN番目の値(リスト中の最大値)を超える最小の値から順にN個分のレコードリストBを生成して前記プロセッサAに送信するレコードリスト送信手段Bと、
を有することを特徴とする分散インデックスの結合システム。 The network on a distributed network system in which a plurality of processors are connected to a coupling system distributed index merging index each other via the network,
The system
Stores an index A composed of indexes of a plurality of records, a pointer list composed of N (N ≧ 2) pointers for scanning the index A, and a record list composed of key values of sorted records corresponding to the pointers Processor A having storage means A for
An index B composed of indexes of a plurality of records, a pointer list composed of N (N ≧ 2) pointers for scanning the index B, and a record list composed of key values of sorted records corresponding to the pointers are stored. Processor B having storage means B for
A processor J coupling a record of the index B of the said a record index A processor B of the processor A, a,
The processor A is
Initial record transmitting means A for generating N record lists A in order from the top of all indexes A and transmitting them to the processor B ;
Based on the record list B transmitted from the processor B, the index search means A for searching the index A from the storage means A ;
Combined record transmission means A for transmitting the record of index A and the record of index B that satisfy the search condition by the index search means A to the processor J;
Record list transmission means A for generating N record lists A in order from the smallest value exceeding the Nth value (maximum value in the list) of the record list B in the index A and transmitting it to the processor B And having
The processor B
Before SL based on the record list A transmitted from the processor A, the index search unit B to find the index B from the storage unit B,
Combined record transmission means B for transmitting the record of index B and the record of index A that satisfy the search condition by the index search means B to the processor J;
Record list transmission means B for generating N record lists B in order from the smallest value exceeding the Nth value (maximum value in the list) of the record list A in the index B and transmitting it to the processor A When,
A distributed index combining system comprising:
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2008084576A JP5112137B2 (en) | 2008-03-27 | 2008-03-27 | Distributed index join method and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2008084576A JP5112137B2 (en) | 2008-03-27 | 2008-03-27 | Distributed index join method and system |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2009238008A JP2009238008A (en) | 2009-10-15 |
JP5112137B2 true JP5112137B2 (en) | 2013-01-09 |
Family
ID=41251857
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2008084576A Expired - Fee Related JP5112137B2 (en) | 2008-03-27 | 2008-03-27 | Distributed index join method and system |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP5112137B2 (en) |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPS61273633A (en) * | 1985-05-29 | 1986-12-03 | Fujitsu Ltd | Joint processing system for decentralized data base |
JPH05225250A (en) * | 1992-02-17 | 1993-09-03 | Fujitsu Ltd | Table coupling system for relational data base |
JPH07253991A (en) * | 1994-03-16 | 1995-10-03 | Mitsubishi Electric Corp | Join processing system |
-
2008
- 2008-03-27 JP JP2008084576A patent/JP5112137B2/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
JP2009238008A (en) | 2009-10-15 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
KR101171501B1 (en) | Transaction aggregation to increase transaction processing throughput | |
US9002802B2 (en) | High throughput, reliable replication of transformed data in information systems | |
US8392402B2 (en) | Hybrid push/pull execution of continuous SQL queries | |
Borkar et al. | Hyracks: A flexible and extensible foundation for data-intensive computing | |
US8510316B2 (en) | Database processing system and method | |
US6804672B1 (en) | Method and mechanism for dependency tracking | |
US9405855B2 (en) | Processing diff-queries on property graphs | |
US20120254089A1 (en) | Vector throttling to control resource use in computer systems | |
US11294920B2 (en) | Method and apparatus for accessing time series data in memory | |
US20120303761A1 (en) | Breakpoint continuous transmission method | |
US10871918B2 (en) | Writing composite objects to a data store | |
US9652492B2 (en) | Out-of-order execution of strictly-ordered transactional workloads | |
US8812492B2 (en) | Automatic and dynamic design of cache groups | |
CN110688382A (en) | Data storage query method and device, computer equipment and storage medium | |
US20170147652A1 (en) | Search servers, end devices, and search methods for use in a distributed network | |
CN107958023A (en) | Method of data synchronization, data synchronization unit and computer-readable recording medium | |
US20140219278A1 (en) | Assessing response routes in a network | |
US20150066908A1 (en) | Presenting a combined search results summary in a graphical view | |
JP5244559B2 (en) | Distributed index join method and system | |
JP5112137B2 (en) | Distributed index join method and system | |
JP4966175B2 (en) | Distributed index join method and system | |
US10984005B2 (en) | Database search apparatus and method of searching databases | |
Farag et al. | Adaptive query processing in data stream management systems under limited memory resources | |
WO2016082432A1 (en) | Data query method and device | |
JP2011192029A (en) | Information retrieval device, method and program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20100208 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20120528 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20120605 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20120806 |
|
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: 20121002 |
|
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20121010 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20151019 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 |