JPH0496837A - Index constituting method for data base processing device - Google Patents

Index constituting method for data base processing device

Info

Publication number
JPH0496837A
JPH0496837A JP2214716A JP21471690A JPH0496837A JP H0496837 A JPH0496837 A JP H0496837A JP 2214716 A JP2214716 A JP 2214716A JP 21471690 A JP21471690 A JP 21471690A JP H0496837 A JPH0496837 A JP H0496837A
Authority
JP
Japan
Prior art keywords
tree
index
search
key
update
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2214716A
Other languages
Japanese (ja)
Inventor
Tetsuji Sato
哲司 佐藤
Takashi Hozai
芳西 崇
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 JP2214716A priority Critical patent/JPH0496837A/en
Publication of JPH0496837A publication Critical patent/JPH0496837A/en
Pending legal-status Critical Current

Links

Landscapes

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

Abstract

PURPOSE:To simultaneously execute many retrieval processings and update processings without complicating the constitution of a balance tree by constituting a device of a function part, which takes a key value to be retrieved as the input to output function values, and a tree part having tree structures corresponding to respective outputted function values. CONSTITUTION:The key to be retrieved is inputted to a partition function part 2, and a directory 3 is referred to by the output value to determine a pointer to corresponding trees 4-1 to 4-3. This pointer determines one of plural trees constituting the tree part which the entry of the key to be searched is stored in one of leaf nodes 5-1 to 5-3 belonging to, and the tree pointed by the pointer is searched to search the entry having the objective key value. Consequently, highly simultaneous executability is realized though many retrieval processings and update processings exist together and are simultaneously executed.

Description

【発明の詳細な説明】 [産業上の利用分野] 本発明はデータベース処理2置において、データベース
の検索処理および更新処理を高速化するインデックスの
構成方法に関し、特に、複数の検索処理と複数の更新処
理が並列に処理された時の同時走行性を高めるためのイ
ンデックス構成方法に関する。
Detailed Description of the Invention [Field of Industrial Application] The present invention relates to a method of configuring an index for speeding up database search processing and update processing in a database processing system. This invention relates to an index configuration method for increasing concurrency when processes are processed in parallel.

[従来の技術] データベースの検索あるいは更新処理を高速化する従来
技術として、検索・更新条件に指定する列に対してあら
かじめインデックスと称する2次情報を生成しておき、
該インデックスを用いて目的とする行の格納位置を探索
する手法が広・く知られている。本方法では、検索・更
新条イ′1゛として指定する列の値をキー値として、デ
ータへ−スに格納された各行の格納位置と、キー値を絹
とするエントリの集まりをあらかじめインデックスとじ
て生成しておいて、指定された条件に合致するキー値の
エントリから行の格納位置を示す情報を得て、目的とす
る行を検索あるいは更新する。処理対象となる行をイン
デックスから直接に特定できることから、データベース
の検索及び更新処理を高速化できる。
[Prior Art] As a conventional technique for speeding up database search or update processing, secondary information called an index is generated in advance for columns specified in search/update conditions.
A method of searching for the storage position of a target row using the index is widely known. In this method, the storage position of each row stored in the data base and a collection of entries with the key value as the key value are indexed in advance, using the value of the column specified as the search/update column '1' as the key value. information indicating the storage position of the row is obtained from the entry with the key value that matches the specified condition, and the target row is searched or updated. Since the row to be processed can be directly identified from the index, database search and update processing can be speeded up.

一般にインデックスは、目的とする行へのポインタを探
索する処理を最短時間で、かつ、いずれのポインタでも
均一の時間で探索できるようにする為に、バランス木構
造を採用している。なお、バランス木を用いたインデッ
クスの構成法および検索・更新処理法は、Jeffre
y D、 Ul1man著、國井利泰・大保信夫訳「デ
ータベース・システムの原理Jに詳細に記述されている
In general, an index employs a balanced tree structure in order to search for a pointer to a target row in the shortest possible time, and to search for any pointer in a uniform amount of time. The index construction method and search/update processing method using a balanced tree are described by Jeffrey
It is described in detail in ``Principles of Database Systems J'' by D. Ulman, translated by Toshiyasu Kunii and Nobuo Oyasu.

第2図に、インデックスを備えたデータベース処理装置
の概念図を示す。端末100は問い合わせの入力と結果
の出力を行う。通常は複数台の端末100を使用し、そ
れぞれ独立の処理要求を受付ける。実行制御部110は
、複数の端末100から入力された検索や更新処理に矛
盾が生じないように、実行順序の制御を行う。データベ
ースアクセス部120は、実行制御gI!lloから入
力された処理要求に基づいて、実際にデータベースの検
索や更新処理を実行する。このデータベースアクセス部
120では、検索/更新の処理要求によっては、インデ
ックスを使用するか、あるいは、使用した方が短時間で
処理できる場合はイ〉デックスを使用する。インデック
ス格納W l 30は、データベースのアクセスを高速
化するための2次情報であるインデックスを格納してい
る。データベース格納部140は、検索/更新処理の対
象となるデータベースを永続的に格納しておくものであ
り、通常はディスク装置等の2次記憶媒体で実現する。
FIG. 2 shows a conceptual diagram of a database processing device equipped with an index. The terminal 100 inputs inquiries and outputs results. Usually, a plurality of terminals 100 are used, each accepting independent processing requests. The execution control unit 110 controls the execution order so that there are no inconsistencies in the search and update processes input from the plurality of terminals 100. The database access unit 120 executes execution control gI! Based on the processing request input from llo, the database search and update processing are actually executed. The database access unit 120 uses an index depending on the search/update processing request, or uses an index if processing can be completed in a shorter time. The index storage W l 30 stores an index that is secondary information for speeding up database access. The database storage unit 140 permanently stores a database to be searched/updated, and is usually realized by a secondary storage medium such as a disk device.

なお、インデックス格納部130とデータベース格納部
14.0は、物理的には一体であってもよい。以下に、
従来のインデックスの構成法を説明する。
Note that index storage section 130 and database storage section 14.0 may be physically integrated. less than,
The conventional method of configuring an index will be explained.

第3図は、14個の行データに対する従来のインデック
ス構成を示した図である。図中、1は探索開始点、5−
10から5−17はデータベースを構成する14個の行
へのエントリを保持するりフノード、11−1から11
−4はリーフノードを探索するための分岐ノードである
。リーフノード5−10〜5−17の各エントりは、行
の格納位置を示すポインタ($aから$n)と該行のキ
ー値(]  ]3.−88との組からなる。また、分岐
ノード11−1〜11−4内の数値はしきい値を表わす
。探索開始点と分岐ノード、分岐ノードと分岐ノード/
リーフノード間は、図中の矢印で示すようにポインタで
連結されている。図の例では、1つの分岐ノードから最
大3個の分岐ノードあるいはリーフノードに分岐できる
場合を示している。いずれのノードに分岐するかは、分
岐ノードに格納されたしきい値と探索するキーの値とを
比較することで決定される。なお、探索開始点1が指す
分岐ノード11−1のことを特にルートノードという。
FIG. 3 is a diagram showing a conventional index structure for 14 row data. In the figure, 1 is the search starting point, 5-
10 to 5-17 hold entries for the 14 rows that make up the database; 11-1 to 11;
-4 is a branch node for searching for leaf nodes. Each entry of the leaf nodes 5-10 to 5-17 consists of a pair of a pointer ($a to $n) indicating the storage position of the row and a key value of the row (] ] 3.-88. Numerical values in branch nodes 11-1 to 11-4 represent threshold values.Search starting point and branch node, branch node and branch node/
Leaf nodes are connected by pointers as shown by arrows in the figure. The illustrated example shows a case where one branch node can branch to a maximum of three branch nodes or leaf nodes. Which node to branch to is determined by comparing the threshold value stored in the branch node with the value of the key to be searched. Note that the branch node 11-1 pointed to by the search starting point 1 is particularly referred to as a root node.

第3図の例は、1つの分岐ノードから最大3方向に分岐
できる3次のバランス木で、がっ、り一フノードに格納
できる組の数も3個に制限した場合を示しているが、一
般に、m方向への分岐が待人るm次のパラシス木では、
木の高さをhとすると、木全体で最大In’個の行を管
理できる。m次のパラシス木では、ルートノードは、少
なくとも2つの分岐を持ち、それ以外の各分岐ノードは
、m/2以上m以下の分岐を行える。べ個の行をm次の
バランス木で管理すると、探索の回数は、10g、\と
なり、大量の行数のデータベースであっても、少ない探
索回数で目的とする行を探索できる。例えば、mが10
0の時には100万個の千テであっても3回の探索で目
的とする行のエントリが得られる。
The example in Figure 3 is a third-order balanced tree that can branch in a maximum of three directions from one branch node, and the number of pairs that can be stored in a single branch node is limited to three. Generally, in an m-th order parasis tree where a branch is waiting in the m direction,
If the height of the tree is h, a maximum of In' rows can be managed in the entire tree. In an m-th order parasis tree, the root node has at least two branches, and each other branch node can take m/2 or more and m or less branches. If the number of rows is managed using an m-th balanced tree, the number of searches will be 10g,\, and even in a database with a large number of rows, the desired row can be searched for with a small number of searches. For example, m is 10
When it is 0, even if there are 1,000,000 1,000,000 entries, the entry for the target row can be obtained by searching three times.

第3図において、キー値が28の(テを検索する処理は
、探索開始点1からルートノード11−1を探し、該ル
ートノード11−1の持つしきい値30と比較する。比
較の結果から、30より小さいノードへのポインタによ
って分岐ノード112を探す。分岐ノード〕】−2ても
同様に探索するキー値28としきい値(15と22)と
を比較し、比較結果からリーフノード5−12を探す。
In FIG. 3, the process of searching for (te) with a key value of 28 searches for the root node 11-1 from the search starting point 1 and compares it with the threshold value 30 that the root node 11-1 has. , search for branch node 112 using a pointer to a node smaller than 30. Search for branch node ] -2 in the same way. Compare key value 28 with thresholds (15 and 22), and from the comparison result leaf node 5 Find -12.

そして、リーフノード5−12に格納されているキー値
28のエントリから目的とする行の格納位置$fを得る
。この例では、3回の探索で14個の行から目的とする
行の格納位置を得ている。
Then, the storage position $f of the target row is obtained from the entry of the key value 28 stored in the leaf node 5-12. In this example, the storage position of the target row is obtained from 14 rows through three searches.

第4図は、第3図に示したバランス木によるインデック
スに1個のエントリを追加した時の従来のバランス木の
再構成の状態を示した図である。
FIG. 4 is a diagram showing the state of reconfiguration of the conventional balance tree when one entry is added to the index based on the balance tree shown in FIG.

追加するエントリは、キー値が8で格納位置が$1とす
る。追加するエントリのキー値8でバランス木を探索す
ると、第3図のリーフノード5−10に追加するのが適
当であることが判る。しかし、リーフノード5−10は
、すてに3個のエントリを保持しており、これ以上のエ
ントリを追加できない。このため、リーフノード5−1
oは、第4図に示すように、リーフノード5−21と5
−22に分割される。シの分割操作にともなって、上位
の分岐ノードも更新される。第3図の例では、リーフノ
ード5−10の親ノード11−2に空き領域がないこと
から、第4図に示すように、分岐ノート11−2は分岐
ノード11−13と1114に分割される。更に、その
親である分岐ノード(ルートノード)11−1にも空き
領域がないことから、分岐ノード11−1は11−11
と11−12に分割され、その上位に新たなルートノー
ド11−10が追加される。
The entry to be added has a key value of 8 and a storage location of $1. When the balance tree is searched using the key value 8 of the entry to be added, it is found that it is appropriate to add the entry to the leaf node 5-10 in FIG. However, the leaf node 5-10 already holds three entries and cannot add any more entries. Therefore, leaf node 5-1
o is the leaf node 5-21 and 5 as shown in FIG.
-22. Along with the division operation, the upper branch node is also updated. In the example of FIG. 3, there is no free space in the parent node 11-2 of the leaf node 5-10, so the branch note 11-2 is divided into branch nodes 11-13 and 1114 as shown in FIG. Ru. Furthermore, since there is no free space in the branch node (root node) 11-1, which is its parent, the branch node 11-1 becomes 11-11.
and 11-12, and a new root node 11-10 is added above it.

このように、バランス木に新たなエントリを追加するに
は、リーフノードの分割を必要とする場合があり、それ
に伴って分岐ノードの分割を行ってバランス木、すなわ
ち、インデックス全体を再構成する必要が生じる場合が
ある。データベースから行を削除する場合には、インデ
ックスのり−フノートからエントリを削除するが、この
場合も、リーフノードの統合を行い、それに伴いインデ
ックスの再構成を必要とする場合がある。インデックス
の再構成中は、ノード間のポインタチエインが不確定で
あるから、他の検索処理や更新処理を実行できない。
In this way, adding a new entry to the balance tree may require splitting a leaf node, which in turn requires splitting the branching node and reconstructing the balance tree, i.e., the entire index. may occur. When deleting a row from the database, the entry is deleted from the index notebook, but in this case as well, leaf nodes may be merged and the index may need to be reconfigured accordingly. While the index is being reconfigured, the pointer chain between nodes is uncertain, so other search or update processing cannot be executed.

インデックスの再構成をエントリの追加あるいは削除処
理時に行うと、頻繁にインデックスの再構成が行われ、
他の検索処理および更新処理が中断される。この量産に
解決する従来方法として、オントリの追加・削除を行う
ときにはインデックスの再構成を行わずに、別途、再構
成をする契機を設ける方法が、例えば、”Wiebre
n de J onge。
If you reorganize the index when adding or deleting entries, the index will be reorganized frequently.
Other search and update processes are interrupted. As a conventional method to solve this problem in mass production, there is a method that does not reconfigure the index when adding or deleting an entry, but instead provides a separate opportunity to reconfigure the index.
n de J onge.

Ardie   5chijf  :  Concur
renL Access  t。
Ardie 5chijf: Concur
renL Access t.

B  −trees、   Internationa
l  Conferencd  onDatabase
s、 Parallel Architectures
、 andTheir Applications、 
 I EEE ComputerSociety Pr
ess、 pp、 312−320″に示されている。
B-trees, International
l Conferenced on Database
s, Parallel Architectures
, andTheir Applications,
I EEE Computer Society Pr
ess, pp. 312-320''.

この方法では、リーフノードおよび各分岐ノドを横方向
にリンクするポインタチェイ〉をあらかじめ形成してお
いて、インデックスの再構成を横方向に行うことが提案
されている。インデックスの再構成をエントリの追加・
削除時に行わないことから、エントリの追加・削除が繰
返されると、パラシス木の構造が乱れて、前述した!&
適探索時間が保証されなくなる。しかし、エントリの追
加・削除時にインデックスの再構成を行うことによる他
の処理の中断による処理時間の長大化が解決されること
から、エントリの追加・削除処理を高速化できる。本方
法では、構造が乱れたバランス木は、適当な契機を見て
再構成を行いバランス状態を回復するとしている。この
再構成処理は、ノート間で横方向にリンクされたポイン
タチエインを用いて階層的に行う。この理由は、第4図
に示した従来法では、インデックスの再構成を縦方向に
行っていたことから、ルートノードを更新する処理が頻
繁に起こり、複数のインデックスを探索する処理が同時
に実行されている場合には、ルートノードの更新処理に
よって他のインデックス探索処理が中断されるのを萌く
ためである。
In this method, it is proposed that a pointer chain that horizontally links leaf nodes and each branch node is formed in advance, and the index is reconfigured horizontally. Reorganize the index by adding entries/
Since this is not done when deleting entries, if entries are added and deleted repeatedly, the structure of the parasis tree will become disordered, which is explained above! &
Appropriate search time is no longer guaranteed. However, by reconfiguring the index when adding or deleting an entry, the increase in processing time due to interruption of other processes can be solved, so the process of adding or deleting entries can be speeded up. In this method, a balanced tree with a disordered structure is reconfigured at an appropriate opportunity to restore the balanced state. This reconstruction process is performed hierarchically using pointer chains that are horizontally linked between notes. The reason for this is that in the conventional method shown in Figure 4, indexes are reconfigured vertically, so the process of updating the root node occurs frequently, and the process of searching multiple indexes is executed simultaneously. This is to prevent other index search processes from being interrupted by the root node update process.

以上述へたように、上記提案された従来方法は、エント
リの追加・削除を伴うインデックスの更新処理の高速化
と、複数のインデックス検索・更新処理が同時走行して
いる場合に、更新処理に伴うインデックス構造の再構成
によって、同時走行性が阻害される要因を解決しようと
したものである。
As mentioned above, the conventional method proposed above aims to speed up the index update process that involves adding and deleting entries, and to speed up the update process when multiple index search/update processes are running simultaneously. This attempt was made to resolve the factors that impede concurrency through the accompanying reconfiguration of the index structure.

[発明が解決しようとする課題] データベースの検索処理や更新処理は、インデックスを
用いて高速化することができるが、複数の処理を同時に
実行しようとすると、他の処理の影響を受けて実行が待
たされる問題があった。特に、エントリの追加や削除を
伴う更新処理では、インデックス構造を再構成する必要
があり、再構成を行っている期間は、他の検索処理や更
新処理を行えなった。
[Problem to be solved by the invention] Database search and update processes can be sped up using indexes, but when multiple processes are attempted to be executed simultaneously, execution may be affected by other processes. There was a problem with waiting. In particular, in update processing that involves adding or deleting entries, it is necessary to reconfigure the index structure, and other search processing or update processing cannot be performed while the reorganization is being performed.

この間団を解決する従来技術として、上述のインデック
スの再構成を更新処理とは分離し、更新処理ではインデ
ックスの再構成を行わない方法が提案されている。しか
し、この方法では、バランス木構造のインデックスに横
方向へのポインタチエインを設けて、階層的にインデッ
クスを再構成するために、インデックスの内部構造が複
雑になる問題がある。
As a conventional technique for solving this problem, a method has been proposed in which the above-mentioned index reconfiguration is separated from the update process, and the index reconfiguration is not performed in the update process. However, this method has a problem in that the internal structure of the index becomes complicated because horizontal pointer chains are provided in the balanced tree-structured index and the index is hierarchically reconfigured.

本発明の目的は、複数の行からなるデータベースに対し
て、行の検索条件となるキーの値から該行の格納位置を
得るインデックスを備えたデータベース処理装置におい
て、バランス木の構成を複雑にすること無く、多数の検
索処理と更新処理を同時実行できるインデックス構成法
を提供することにある。
An object of the present invention is to complicate the configuration of a balanced tree in a database processing device that is equipped with an index that obtains the storage position of a row from the value of a key that is a search condition for a database for a database consisting of a plurality of rows. An object of the present invention is to provide an index construction method that allows a large number of search processes and update processes to be executed simultaneously without any problems.

[課題を解決するための手段] 上記目的を達成するために、本発明のインデックス構成
法は、検索しようとするキー値を入力として関数値を出
力する関数部と、該関数部から出力される関数値の各々
に対応した木構造の複数個のツリーからなるツリー部と
でインデックスを構成するを特徴とするものである。更
に、エントリの追加あるいは削除を伴う更新処理時に、
あるいは、インデックスの再構成が必要となった契機を
捕らえて、前記関数の関数値によってR+5記ツリー部
を構成するツリーの1個あるいは複数個を単位としてイ
ンデックスの再構成を行うことを特徴とするものである
[Means for Solving the Problems] In order to achieve the above object, the index construction method of the present invention includes a function part that inputs a key value to be searched and outputs a function value, and a function part that outputs a function value by inputting a key value to be searched. The index is characterized in that an index is constructed with a tree part consisting of a plurality of trees in a tree structure corresponding to each function value. Furthermore, during update processing that involves adding or deleting entries,
Alternatively, the index may be reconfigured in units of one or more of the trees constituting the R+5 tree section based on the function value of the function, upon the occurrence of a need for index reconfiguration. It is something.

[作 用] 本発明のインデックスの構成法では、インデックスを複
数のツリーからなるツリー部と該ツリー部への分岐を行
う関数部とて構成したことによって、同時に実行される
複数の検索処理および更新処理を複数のツリーに分配し
て処理する二とかできる。また、インデックスの再構成
を行う場合は、複数ツリーの1個あるいは複数個を単位
として再構成を行うことができるため、再構成を行って
いないツリーに関わる検索処理および更新処理を同時に
実行することができる。
[Operation] In the index configuration method of the present invention, by configuring the index as a tree section consisting of a plurality of trees and a function section that branches to the tree section, multiple search processes and updates can be performed simultaneously. It is possible to distribute processing to multiple trees. Furthermore, when reconfiguring an index, it is possible to perform the reconfiguration in units of one or more of multiple trees, so search processing and update processing related to trees that have not been reconfigured can be executed at the same time. I can do it.

[実施例] 以下1本発明の一実施例について図面により説明する。[Example] An embodiment of the present invention will be described below with reference to the drawings.

第1図は本発明の一実施例のインデックス構成を示す図
である。図中、lはインデックスの探索を開始する探索
開始点、2は分配関数部、3はディレクトリ、4−1か
ら4−3はツリー、5−1から5−3はキー値に対応す
る行の格納位置を保持しておくエントリからなるリーフ
ノードである。
FIG. 1 is a diagram showing an index structure according to an embodiment of the present invention. In the figure, l is the search starting point for starting the index search, 2 is the distribution function part, 3 is the directory, 4-1 to 4-3 are the trees, and 5-1 to 5-3 are the rows corresponding to the key values. This is a leaf node consisting of entries that hold storage locations.

分配関数部2は、検索処理あるいは更新処理に伴うイン
デックスの探索先を、指定されるキー値から複数のツリ
ーに配分する関数を求める部分であり、このような関数
の例としては剰余関数を用いることができる。ディレク
トリ3は、分配関数部2て得られた値から、対1.ぢす
るツリーへのポインタを保持している。、1−1から4
−3のツリーは、第3図の従来例で示したバランス木と
同様の構成である。5−1から5−3のリーフノードに
ついても第3図の従来例で示したものと同様である 以下に、第1図に示した構成のインデックスにおける探
索処理の手順を示す。最初に、検索しよつとするキーを
分配関数部2の入力として、該分配関数部2の出力値か
らデイしクトリ3を#照して対応するツリー4−1〜4
−3へのポインタを決定する。このポインタは、探索し
ようとしているキーのエントリが、ツリー部を構成する
複数のツリーのいずれの配下のリーフノード5−1〜5
已に格納されているかを決定するポインタであ(ハボイ
シタの指すツリーを従来法と同様にして探索することに
よって、目的とするキー値を持つエントリを探索するこ
とができる。例えば、I’TI図の実施例では、キー値
が1,3,12,15゜22.28が同一のツリー4〜
1の配下に管理されており、分配関数部2にこれらのキ
ー値が入力されれば、同一の値が分配関数部2から出力
され、二の出力値でディレクトリ3を参照するとツリー
4−1へのポインタが得られる。
The distribution function part 2 is a part that calculates a function that allocates index search destinations during search processing or update processing to multiple trees from a specified key value, and a remainder function is used as an example of such a function. be able to. Directory 3 calculates pair 1. from the values obtained by distribution function section 2. It holds a pointer to the tree to be edited. , 1-1 to 4
The tree of -3 has the same structure as the balanced tree shown in the conventional example of FIG. The leaf nodes 5-1 to 5-3 are also similar to those shown in the conventional example shown in FIG. 3. Below, the search processing procedure for the index having the configuration shown in FIG. 1 will be described. First, the key to be searched is input to the distribution function section 2, and the directory 3 is checked from the output value of the distribution function section 2 to find the corresponding tree 4-1 to 4-4.
- Determine the pointer to 3. This pointer indicates which leaf node 5-1 to 5 of the multiple trees that make up the tree part contains the entry of the key to be searched.
(By searching the tree pointed to by Haboishita in the same way as the conventional method, you can search for an entry with the desired key value. For example, if the I'TI diagram In the example, the key values 1, 3, 12, 15°22.28 are the same tree 4 to
If these key values are input to the distribution function unit 2, the same value will be output from the distribution function unit 2, and if you refer to the directory 3 with the output value of 2, the tree 4-1 will be displayed. You will get a pointer to .

エントリの追加あるいは削除を伴う更新処理の場合は、
従来と同様に、上述の探索処理に加えて、エントリの追
加・削除によってくずれたバランス木の状態を回復する
インデックスの再構成を行う必要がある。ここで、第4
図の例と同様に、キー値が8のエントリを追加する場合
を考える。分配関数部2によってキー値8がツリー4−
1配下のエントリであると判定された時は、ツリー4−
1を再構成する。このように、第1図で示したインデッ
クスの構成では、再構成によるツリーの更新がツリー部
を構成する1つのツリーに限定される。
For update processing that involves adding or deleting entries,
As in the past, in addition to the above-mentioned search process, it is necessary to reconstruct the index to restore the state of the balanced tree that has been disrupted due to the addition or deletion of entries. Here, the fourth
As in the example shown in the figure, consider adding an entry with a key value of 8. The key value 8 is set to tree 4- by the distribution function part 2.
When it is determined that the entry is under 1, the tree 4-
Reconfigure 1. In this manner, in the index configuration shown in FIG. 1, updating of the tree by reconfiguration is limited to one tree forming the tree section.

このため、キー値8のエントリを追加するためにツリー
4−1を再構成していても、他のツリーである4−2や
4−3等の配下にあるエントリへの検索処理や更新処理
を同時に実行することができる。
Therefore, even if tree 4-1 is reconfigured to add an entry with key value 8, search processing and update processing for entries under other trees 4-2, 4-3, etc. can be executed simultaneously.

以上の本発明の詳細な説明では、エントリの追加あるい
は削除にともなうインデックスの再構成を行う契機につ
いて明確に規定していないが、従来と同様の再構成を行
う契機をエントリの追加や削除とは同期させずに独自に
行うことも容易である。
In the above detailed description of the present invention, the trigger for reconfiguring the index due to the addition or deletion of an entry is not clearly stipulated. It is also easy to do it independently without synchronizing.

また、第1図の実施例では、関数部を分配関数部2とデ
ィレクトリ3とて構成している場合を示したが、直接に
ツリー4−1〜4−3へのポインタを計算できるような
配分関数部を実現することもできる。この場合には、デ
ィレクトリ3は不要となり、分配関数部から直接にツリ
ー部を構成する個々のツリーへポインタチエインが形成
される。
In addition, in the embodiment shown in FIG. 1, the function part is composed of the distribution function part 2 and the directory 3, but it is possible to directly calculate pointers to the trees 4-1 to 4-3. It is also possible to implement an allocation function section. In this case, the directory 3 becomes unnecessary, and a pointer chain is formed directly from the distribution function section to each tree forming the tree section.

更に、第1図に示した実施例では、説明を容易とするた
めに、ツリー部をツリー4−1〜4−3とそれにつなが
るリーフノード5−1〜5−3を分けているが、本来、
リーフノードはツリーの一部であり、ツリーの内部にエ
ントリを混在させた構成とする事も容易である。また、
ツリーが無くてデイクトリから直接にリーフノードへの
ポインタチエインを形成することも容易である。
Furthermore, in the embodiment shown in FIG. 1, for ease of explanation, the tree part is divided into trees 4-1 to 4-3 and leaf nodes 5-1 to 5-3 connected to them. ,
A leaf node is a part of a tree, and it is easy to configure a tree with a mixture of entries. Also,
It is also easy to form a chain of pointers directly from the directory to the leaf nodes without a tree.

要するに、本発明の特徴は、従来はバランス木等で一体
として形成されていたインデックスを、分配関数を計算
する関数部と該関数部からポイシトされる複数のツリー
からなるツリー部とて構成したことてあり、分配関数の
具体的な計算式や、ツリー部の構成および各ツリーの構
成には依存しない、 [発明の効果] 以上説明したように、本発明によれば、インデックスを
関数部とツリー部とて構成することによって、複数の検
索処理や更新処理が混在して同時に実行される場合であ
っても、高い同時実行性を実現することができる。特に
、従来のインデックス構造で問題となっていた、更新処
理に伴うインデックスの再構成によって他の検索処理や
更新処理の実行が阻害されることが大幅に改善され、シ
ステム全体のスループットを向上できる。
In short, the feature of the present invention is that the index, which was conventionally formed as a single unit such as a balance tree, is configured as a tree section consisting of a function section that calculates a distribution function and a plurality of trees pointed from the function section. [Effects of the Invention] As explained above, according to the present invention, the index can be divided into the function part and the tree. By configuring it as a single section, high concurrency can be achieved even when a plurality of search processes and update processes are mixed and executed simultaneously. In particular, the problem with conventional index structures, in which index reconfiguration accompanying update processing inhibits the execution of other search and update processing, is greatly improved, and the throughput of the entire system can be improved.

【図面の簡単な説明】[Brief explanation of the drawing]

第1図は本発明の一実施例のインデックス構成を示す構
成図、第2図は本発明で対象とするデータベース処理製
置の概念図、第3図は従来カインデックスの構成例をi
云す図、第4図は第3図のインデックスの構成例におい
て従来のインデックスの再構成を説明するための図であ
る。 インデックス探索開始点、 2 分配関数部、  3・ディレクトリ、4−1〜4−
:3 ツリ 5−1〜5−3 リーフノート。
FIG. 1 is a block diagram showing an index configuration according to an embodiment of the present invention, FIG. 2 is a conceptual diagram of a database processing installation targeted by the present invention, and FIG. 3 is a configuration example of a conventional index.
FIG. 4 is a diagram for explaining the conventional index reconfiguration in the index configuration example of FIG. 3. Index search starting point, 2 Distribution function section, 3 Directory, 4-1 to 4-
:3 Tree 5-1 to 5-3 Leaf note.

Claims (2)

【特許請求の範囲】[Claims] (1)N(N≧2の整数)個の行からなるデータベース
に対して、行の検索条件となるキーの値から該行の格納
位置を得るインデックス手段を備えたデータベース処理
装置において、 キー値を入力として関数値を出力する関数部と、該関数
部から出力される関数値によって選択される、k(k≧
2の整数)個のツリーからなるツリー部とで前記インデ
ックスを構成することを特徴するインデックス構成方法
(1) For a database consisting of N (an integer of N≧2) rows, in a database processing device equipped with indexing means for obtaining the storage position of a row from the value of a key that is a search condition for the row, a key value k (k≧
An index construction method characterized in that the index is constructed from a tree section consisting of (an integer number of 2) trees.
(2)データベースへの行の追加、削除、行の更新に伴
なって、ツリー部の再構成が必要となった時は、該行の
追加、削除、更新を契機として、あるいは、他の再構成
を必要とする契機に於いて、前記関数部の関数値によっ
て前記ツリー部を構成するツリーの1個あるいは複数個
を単位として再構成を行うことを特徴とする請求項(1
)記載のインデックス構成方法。
(2) When it becomes necessary to reconfigure the tree section due to the addition, deletion, or update of a row to the database, the addition, deletion, or update of the row may trigger Claim (1) characterized in that, when configuration is required, one or more of the trees constituting the tree section is reconfigured based on the function value of the function section.
) index configuration method described.
JP2214716A 1990-08-14 1990-08-14 Index constituting method for data base processing device Pending JPH0496837A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2214716A JPH0496837A (en) 1990-08-14 1990-08-14 Index constituting method for data base processing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2214716A JPH0496837A (en) 1990-08-14 1990-08-14 Index constituting method for data base processing device

Publications (1)

Publication Number Publication Date
JPH0496837A true JPH0496837A (en) 1992-03-30

Family

ID=16660441

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2214716A Pending JPH0496837A (en) 1990-08-14 1990-08-14 Index constituting method for data base processing device

Country Status (1)

Country Link
JP (1) JPH0496837A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0689215A (en) * 1992-04-27 1994-03-29 Internatl Business Mach Corp <Ibm> Computer system for information retrieval and operating method of memory device of system thereof
JP2012234415A (en) * 2011-05-02 2012-11-29 Fujitsu Ltd Index management method, index management program and index management device
JP2016139361A (en) * 2015-01-29 2016-08-04 株式会社東芝 Sampling apparatus and sampling program
JP2017500640A (en) * 2013-12-31 2017-01-05 華為技術有限公司Huawei Technologies Co.,Ltd. Method and device for changing root node

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0689215A (en) * 1992-04-27 1994-03-29 Internatl Business Mach Corp <Ibm> Computer system for information retrieval and operating method of memory device of system thereof
JP2012234415A (en) * 2011-05-02 2012-11-29 Fujitsu Ltd Index management method, index management program and index management device
JP2017500640A (en) * 2013-12-31 2017-01-05 華為技術有限公司Huawei Technologies Co.,Ltd. Method and device for changing root node
US10289710B2 (en) 2013-12-31 2019-05-14 Huawei Technologies Co., Ltd. Method for modifying root node, and modification apparatus
JP2016139361A (en) * 2015-01-29 2016-08-04 株式会社東芝 Sampling apparatus and sampling program

Similar Documents

Publication Publication Date Title
US5319779A (en) System for searching information using combinatorial signature derived from bits sets of a base signature
AU2002229734B2 (en) Database system and query optimiser
Di Battista et al. On-line planarity testing
US7558802B2 (en) Information retrieving system
AU608872B2 (en) Device for enabling concurrent access of indexed sequential data files
US7080091B2 (en) Inverted index system and method for numeric attributes
US7194456B2 (en) Method of querying a structure of compressed data
CN104281652B (en) Strong point data partition method one by one in metric space
US20060074858A1 (en) Method and apparatus for querying relational databases
JPH11212980A (en) Production of index and retrieval method
AU2002229734A1 (en) Database system and query optimiser
US7080072B1 (en) Row hash match scan in a partitioned database system
KR102088435B1 (en) Effective retrieval apparatus based on diversity index of retrieval result and method thereof
JP4758429B2 (en) Shared memory multiprocessor system and information processing method thereof
US20190073195A1 (en) Computing device sort function
JPH0496837A (en) Index constituting method for data base processing device
JP6459669B2 (en) Column store type database management system
KR20220099745A (en) A spatial decomposition-based tree indexing and query processing methods and apparatus for geospatial blockchain data retrieval
US6694324B1 (en) Determination of records with a specified number of largest or smallest values in a parallel database system
Hoffer et al. Optimal performance of inverted files
CN112860734A (en) Seismic data multi-dimensional range query method and device
JPH05334153A (en) Index management system
CN109388638B (en) Method and system for distributed massively parallel processing of databases
Hu et al. Binary search on a tape
Borodin et al. Intra-page Indexing in Generalized Search Trees of PostgreSQL.