[go: up one dir, main page]

JP2525947B2 - Global index processing method - Google Patents

Global index processing method

Info

Publication number
JP2525947B2
JP2525947B2 JP2231450A JP23145090A JP2525947B2 JP 2525947 B2 JP2525947 B2 JP 2525947B2 JP 2231450 A JP2231450 A JP 2231450A JP 23145090 A JP23145090 A JP 23145090A JP 2525947 B2 JP2525947 B2 JP 2525947B2
Authority
JP
Japan
Prior art keywords
data
global index
index
access
global
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
JP2231450A
Other languages
Japanese (ja)
Other versions
JPH04112243A (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.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP2231450A priority Critical patent/JP2525947B2/en
Publication of JPH04112243A publication Critical patent/JPH04112243A/en
Application granted granted Critical
Publication of JP2525947B2 publication Critical patent/JP2525947B2/en
Priority to US08/899,150 priority patent/US5742809A/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

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

Description

【発明の詳細な説明】 〔概要〕 論理構造表現のテーブルまたはその一部分からなるデ
ータ単位の組を,独立したデータ編成を持つ複数の構造
化されたデータの格納単位に対応づけて格納する機能を
有するデータベース管理システムにおけるグローバルイ
ンデックス処理方式に関し, 分割格納されたデータなどに対して,高速な検索を可
能とする手段を提供することを目的とし, 異なるデータ編成をとることがある複数の格納単位に
またがった副次インデックスに関する情報をグローバル
インデックス情報として管理するディクショナリと,問
い合わせに対して,ディクショナリの登録情報に基づく
グローバルインデックスを用いたアクセスと他のアクセ
スとのコスト評価を行い,グローバルインデックスによ
るアクセスが低コストである場合に,グローバルインデ
ックスを使用したアクセス手順を生成する最適化処理部
とを備えるように構成する。
DETAILED DESCRIPTION [Outline] A function of storing a table of logical structure representation or a set of data units consisting of a part thereof in association with a plurality of structured data storage units having independent data organizations is stored. Concerning the global index processing method in the database management system that it has, it aims to provide a means that enables high-speed retrieval of data that has been divided and stored. A dictionary that manages information about spanned subsidiary indexes as global index information, and for queries, evaluates the cost of access using the global index based on the dictionary registration information and other access, and the access by the global index When cost is low In this case, an optimization processing unit that generates an access procedure that uses the global index is configured.

〔産業上の利用分野〕[Industrial applications]

本発明は,論理構造表現のテーブルまたはその一部分
からなるデータ単位の組を,独立したデータ編成を持つ
複数の構造化されたデータの格納単位に対応づけて格納
する機能を有するデータベース管理システムにおけるグ
ローバルインデックス処理方式に関する。
The present invention relates to a global in a database management system having a function of storing a set of data units consisting of a table of logical structure representation or a part thereof in association with a plurality of storage units of structured data having independent data organizations. Regarding the index processing method.

データベースのデータは,その処理形態やアクセス頻
度を考慮して,利用者に最適な格納構造を設定できるこ
とが,性能や運用の観点から必要となる。そこで,論理
構造に対して,分割格納が柔軟にでき,それらの格納単
位ごとにデータ処理形態に適したデータ編成を指定でき
るようにすることが考えられている。例えば,同一論理
構造のデータであっても,あるデータはほとんど乱処理
しかしないので,ハッシュ(Hash)編成にするとか,乱
処理と順処理とが混在するからBtree編成にするとかい
うような選択を,論理構造表現のテーブルまたはその一
部分からなるデータ単位に対して可能とする方法であ
る。
From the viewpoint of performance and operation, it is necessary for the data in the database to be able to set the optimal storage structure for the user in consideration of the processing form and access frequency. Therefore, it is considered that divided storage can be flexibly performed with respect to a logical structure and a data organization suitable for a data processing form can be designated for each storage unit. For example, even if the data has the same logical structure, some data rarely undergoes random processing. Therefore, it is necessary to select Hash organization or Btree organization because random processing and forward processing are mixed. , This method is possible for a data unit consisting of a logical structure representation table or a part thereof.

このような多様な格納構造をとり得るデータベース管
理システムにおいて,さらに効率的なアクセス手順を生
成できる手段が望まれる。
In a database management system that can have such various storage structures, a means that can generate a more efficient access procedure is desired.

〔従来の技術〕[Conventional technology]

第7図は従来技術によるデータベースの分割格納例を
示す。
FIG. 7 shows an example of divided storage of a database according to the prior art.

従来のリレーショナルデータベース管理システムで
は,同一論理構造のテーブルを重複定義することによ
り,独立したデータ編成を持つ分割格納を実現してい
る。第7図の例では,同一論理構造のテーブルT1,T2,T3
を重複定義し,カラムAの値によって,レコードをどの
テーブルに割り振るかを決めるようにし,データD1,D2,
D3という分割格納を実現している。
In a conventional relational database management system, redundant storage with independent data organization is realized by redundantly defining tables with the same logical structure. In the example of FIG. 7, tables T1, T2, T3 having the same logical structure
Is defined redundantly, and the table to which the record is to be allocated is determined according to the value of column A. Data D1, D2,
It realizes divided storage called D3.

このとき,分割したデータは各々独立したデータ編成
を持つことができるが,インデックスとして,対象とす
るデータ(ベースデータ)のデータ編成情報を管理して
いなかったため,副次インデックスは分割した個々のデ
ータに対してしか設定できない。すなわち,各々独立し
たデータ編成を持つデータD1,D2,D3に対して,例えばカ
ラムCの副次インデックスIX−1,IX−2,IX−3を,個別
に設定できるだけであった。
At this time, the divided data can have independent data organization, but since the data organization information of the target data (base data) was not managed as an index, the secondary index is the individual data Can only be set for. That is, for the data D1, D2, D3 each having an independent data organization, for example, the secondary indexes IX-1, IX-2, IX-3 of column C can be set individually.

なお,データベース管理システムに用いられる基本的
なデータ編成等を説明した参考文献としては,例えば以
下のものがある。
Note that, for example, the following references describe the basic data organization used in the database management system.

1)“The Ubiqutous B−Tree",DOUGLAS COMER,ACM Com
puting Surveys Vol.11,NO.2。
1) “The Ubiqutous B-Tree”, DOUGLAS COMER, ACM Com
puting Surveys Vol.11, NO.2.

2)“Dynamic Hashing Schemes",R.J.ENBODYPACM Comp
uting Surveys Vol.20,No.2。
2) “Dynamic Hashing Schemes”, RJENBODYPACM Comp
uting Surveys Vol.20, No.2.

〔発明が解決しようとする課題〕[Problems to be Solved by the Invention]

したがって,データ全体を対象とした副次キー検索処
理では,分割されたデータごとに,副次インデックスを
用いて検索する必要があり,特に,副次キーによる順検
索では,検索効率が悪いという問題があった。
Therefore, in the secondary key search process for the entire data, it is necessary to search by using the secondary index for each divided data. In particular, the sequential search by the secondary key has a problem that the search efficiency is poor. was there.

第7図の例において,テーブルT1,T2,T3のすべてのデ
ータを,カラムCの値で検索する場合,分割したデータ
D1,D2,D3ごとに設けられた副次インデックスIX−1,IX−
2,IX−3を,各々検索しなければならない。
In the example of FIG. 7, when searching all the data of the tables T1, T2, T3 by the value of column C, the divided data
Secondary indexes IX-1, IX- provided for D1, D2, D3
2, IX-3 must be searched respectively.

ところで,本発明者等は,論理構造に対して独立性の
高い格納構造を実現し,論理構造表現上のあるデータ単
位に対して,処理形態やアクセス頻度等の関係から最適
なデータ編成をとり得る格納構造を設定できるようにす
ると共に,性能や運用上の都合から格納構造を変更する
必要が生じた場合にも,できるだけ論理構造およびそれ
に密接に関係する応用プログラムに影響を与えないよう
にすることを考慮した格納構造の定義機構を考えてい
る。
By the way, the present inventors have realized a storage structure that is highly independent of the logical structure, and take an optimum data organization for a certain data unit in the logical structure representation from the relationship of the processing form and access frequency. The storage structure to be obtained can be set, and even if it is necessary to change the storage structure due to performance or operational reasons, the logical structure and application programs closely related to it should not be affected as much as possible. We are considering a mechanism for defining the storage structure that takes this into consideration.

この格納構造定義方式では,同一の論理構造のテーブ
ルを重複定義することなく,データの分割格納が可能で
あり,分割したデータごとに独立したデータ編成を定義
できる。しかし,分割されたデータの全体に対して副次
キー検索をしたい場合には,分割したデータごとに設け
られた副次インデックスを,前述した第7図の例と同様
に各々検索しなければならないので,検索効率が悪くな
るという問題が残る。
With this storage structure definition method, data can be divided and stored without duplicate definition of tables with the same logical structure, and independent data organization can be defined for each divided data. However, when it is desired to perform a secondary key search for the entire divided data, the secondary index provided for each divided data must be searched for as in the example of FIG. 7 described above. Therefore, there remains a problem that the search efficiency deteriorates.

本発明は上記問題点の解決を図り,分割格納されたデ
ータなどに対して,高速な検索を可能とする手段を提供
することを目的としている。
It is an object of the present invention to solve the above problems and to provide a means for enabling high-speed retrieval of data that is divided and stored.

〔課題を解決するための手段〕[Means for solving the problem]

第1図は本発明の原理説明図である。 FIG. 1 is an explanatory view of the principle of the present invention.

第1図において,10はCPUおよびメモリを備えたデータ
ベース処理方式,11はデータベースに対する問い合わせ,
12は問い合わせ11に対してデータベースへの最適なアク
セス経路を決定する最適化処理部,13は問い合わせ11に
対する答えを得るためのアクセス手順,14はデータベー
スに関する定義情報を記憶するディクショナリ,15はグ
ローバルインデックス情報,16はデータ編成ごとのアク
セス手段を部品化した情報を記憶するアクセス部品ライ
ブラリ,17はアクセス部品,18はデータベース,19は物理
媒体上で独立構造を有する格納単位(CS:Composit Stru
cture),20は複数の格納単位19にまたがるグローバルイ
ンデックス,21は論理構造表現のデータ単位と格納単位1
9との対応情報を定義する格納構造定義,22は論理構造表
現のデータ単位の1形態であるテーブルを表す。
In FIG. 1, 10 is a database processing method equipped with a CPU and memory, 11 is a database inquiry,
12 is an optimization processing unit that determines the optimal access route to the database for the inquiry 11, 13 is an access procedure for obtaining the answer to the query 11, 14 is a dictionary that stores the definition information about the database, and 15 is a global index. Information, 16 is an access component library that stores information obtained by dividing access means for each data organization, 17 is an access component, 18 is a database, and 19 is a storage unit having an independent structure on a physical medium (CS: Composit Stru
cture), 20 is a global index that spans multiple storage units 19, 21 is the data unit of the logical structure representation and storage unit 1
A storage structure definition for defining correspondence information with 9, and 22 denotes a table which is one form of a data unit of a logical structure expression.

例えば第1図(ロ)に示すように,論理構造の表現で
あるテーブル22またはその一部分からなるデータ単位の
組を,格納構造定義21によって,任意個数の格納単位19
に対応づけることができるようになっている。データベ
ース18を構成する個々の格納単位19は,データ編成を持
ち,その格納論理に基づいてレコードが物理媒体上に格
納される。
For example, as shown in FIG. 1 (b), a set of data units consisting of a table 22 which is a representation of a logical structure or a part thereof is defined by a storage structure definition 21 and an arbitrary number of storage units 19
Can be associated with. Each storage unit 19 that constitutes the database 18 has a data organization, and records are stored on the physical medium based on the storage logic.

本発明では,異なるデータ編成をとることがある複数
の格納単位19にまたがったインデックスを設けることが
できる。ここで述べるインデックスとは,アクセス効率
を向上させるためにデータ編成に基づく格納論理とは独
立なキー(副次キーと呼ぶ)を用いてデータをアクセス
できるようした副次インデックスである。この複数の格
納単位19にまたがったインデックスが,グローバルイン
デックス20である。
In the present invention, it is possible to provide an index that spans a plurality of storage units 19 that may have different data organizations. The index described here is a secondary index that allows data to be accessed using a key (called a secondary key) that is independent of the storage logic based on the data organization in order to improve access efficiency. The index that spans the plurality of storage units 19 is the global index 20.

ディクショナリ14は,グローバルインデックス20の定
義情報に関するグローバルインデックス情報15を管理す
る。
The dictionary 14 manages global index information 15 regarding definition information of the global index 20.

最適化処理部12は,問い合わせ11に対して,ディクシ
ョナリ14の登録情報に基づくグローバルインデックス20
を用いたアクセスと他のアクセスとのコスト評価を行
い,グローバルインデックス20によるアクセスが低コス
トである場合に,グローバルインデックス20を使用した
アクセス手順13を生成する。
The optimization processing unit 12 responds to the inquiry 11 by using the global index 20 based on the registration information in the dictionary 14.
The cost evaluation of the access using and the other access is performed, and when the access by the global index 20 is low cost, the access procedure 13 using the global index 20 is generated.

なお,第1図(イ)では,アクセス部品ライブラリ16
中に各データ編成ごとのアクセス部品17をあらかじめ用
意しておき,そのアクセス部品17の組み合わせによっ
て,アクセス手順13を生成できるようにしている。ただ
し,このアクセス部品17は,本発明の実施に必須なもの
ではない。
In addition, in FIG. 1A, the access component library 16
An access component 17 for each data organization is prepared in advance, and an access procedure 13 can be generated by combining the access components 17. However, the access component 17 is not essential for implementing the present invention.

〔作用〕[Action]

本発明では,独立した異なるデータ編成を持つ複数の
データにより構造化されたデータベースにおいて,それ
らの複数のデータにまたがるインデックス機能を装備し
ている。したがって,アクセス経路が多様化し,これら
の各データに対して個別に用意された副次インデックス
(以下,ローカルインデックスという)だけしかない場
合に比べて,副次検索の効率が向上する。データの性質
やアクセス状況によっては,ローカルインデックスは不
要となる。
In the present invention, a database structured by a plurality of data having different independent data organizations is equipped with an index function that spans the plurality of data. Therefore, the access route is diversified, and the efficiency of the secondary search is improved as compared with the case where there is only a secondary index (hereinafter referred to as a local index) individually prepared for each of these data. Depending on the nature of the data and the access status, the local index is unnecessary.

なお,格納構造定義21は,例えば (a)1つのテーブル22もしくはその一部分を,1つの格
納単位19に対応づける, (b)テーブル22もしくはその一部分の複数組を1つの
格納単位19に対応づける, (c)1つのテーブル22もしくはその一部分を,複数の
格納単位19に対応づける, または,これらの(a)〜(c)の組み合わせによる対
応づけを行う定義情報である。
The storage structure definition 21 is, for example, (a) one table 22 or a part thereof is associated with one storage unit 19, (b) a plurality of sets of the table 22 or a part thereof is associated with one storage unit 19. , (C) One table 22 or a part thereof is associated with a plurality of storage units 19, or is defined by a combination of these (a) to (c).

〔実施例〕〔Example〕

第2図は本発明の実施例に係るグローバルインデック
スによるアクセス手順説明図である。
FIG. 2 is an explanatory diagram of an access procedure by the global index according to the embodiment of the present invention.

グローバアルインデックス20は,副次キー30に対応し
て,データベース中の格納単位32(これを,ベースCSと
いう)の該当するレコード33へのポインタ情報31を管理
している。このポインタ情報31に,ベースCS32のデータ
編成を特定化できる情報を追加して持つことにより,異
なるデータ編成にまたがるインデックスを実現する。
The global index 20 manages pointer information 31 corresponding to a corresponding key 33 of a storage unit 32 (which is referred to as a base CS) in a database corresponding to a secondary key 30. By adding information that can identify the data organization of the base CS32 to this pointer information 31, an index that spans different data organizations is realized.

第1図に示す問い合わせ11に対する最適化処理部12で
は,異なるデータ編成を考慮したアクセス手順13を生成
する。そのアクセス手順13は,グローバルインデックス
20を使用する場合,第2図に示すような処理手順によっ
て,副次キー30をもとにレコード33へのアクセスを行
う。
The optimization processing unit 12 for the inquiry 11 shown in FIG. 1 generates an access procedure 13 considering different data organization. The access procedure 13 is a global index.
When using 20, the record 33 is accessed based on the secondary key 30 by the processing procedure as shown in FIG.

グローバルインデックス20によるベースCS32へのアク
セス手順13による処理は,以下の(a)〜(c)のよう
になる。
The processing by the access procedure 13 for accessing the base CS32 by the global index 20 is as shown in (a) to (c) below.

(a)副次キー30で管理されるポインタ情報31から,ベ
ースCS32のデータ編成を検出する。
(A) The data organization of the base CS32 is detected from the pointer information 31 managed by the subsidiary key 30.

(b)そのデータ編成のアクセス部品17をスケジュール
する。なお,アクセス部品17は,例えばBtree,ヒープ,
ハッシュというようなデータ編成に応じて,あらかじめ
アクセスモジュールへの組み込み用部品として用意され
ているものである。
(B) Schedule the access component 17 of the data organization. The access component 17 is, for example, Btree, heap,
It is prepared in advance as a component to be incorporated into the access module according to the data organization such as hash.

(c)副次キー30で管理されるすべてのポインタ情報31
について,上記(a),(b)の処理を行い,データ編
成に応じたアクセス部品17を組み合わせて用いることに
より,該当するレコード33へのアクセスを行う。
(C) All pointer information 31 managed by the secondary key 30
With respect to the above, the processes (a) and (b) are performed, and the corresponding record 33 is accessed by using the access components 17 according to the data organization in combination.

本実施例では,グローバルインデックス20も1つの格
納単位(CS)として管理し,そのメタデータとして,デ
ータ編成および管理対象のベースCS32の識別情報(CSi
d)を,ディクショナリ14で管理するようにしている。
実際のデータのベースCS32についても,そのメタデータ
として,データ編成などの情報をディクショナリ14で管
理する。これらのメタデータのディクショナリ14への登
録は,格納構造定義21によって行う。
In this embodiment, the global index 20 is also managed as one storage unit (CS), and as its metadata, the data organization and the identification information (CSi) of the base CS32 to be managed.
d) is managed by dictionary 14.
Regarding the actual data base CS32, the dictionary 14 manages information such as data organization as its metadata. The storage structure definition 21 registers these metadata in the dictionary 14.

グローバルインデックス20によるアクセス手順13は,
前述のように,CSとして管理されるグローバルインデッ
クス20のメタデータおよびベースCS32のメタデータを用
いて,最適化処理部12が生成する。
The access procedure 13 using the global index 20 is
As described above, the optimization processing unit 12 generates using the metadata of the global index 20 managed as CS and the metadata of the base CS32.

グローバルインデックス20による検索が実行される
と,当該副次キー30で管理されるベースCS32ごとに,そ
のベースCS情報および格納キーに基づき各CSのアクセス
手順を構成するアクセス部品17をスケジュールして,該
当するレコード33を取り出す。
When the search by the global index 20 is executed, for each base CS32 managed by the sub key 30, the access component 17 that constitutes the access procedure of each CS is scheduled based on the base CS information and the storage key, The corresponding record 33 is retrieved.

第3図は,本発明の実施例によるグローバルインデッ
クス20の最下位レコードの構造を示している。
FIG. 3 shows the structure of the lowest record of the global index 20 according to the embodiment of the present invention.

このグローバルインデックスレコード40の先頭には,
レコードヘッダが存在し,レコードヘッダには,その副
次キーで管理するベースCSのポインタ数などのレコード
管理情報が設定されるようになっている。同一のベース
CSに対して,複数の格納キーがあってもかまわない。
At the beginning of this global index record 40,
A record header exists, and record management information such as the number of base CS pointers managed by the secondary key is set in the record header. Same base
There may be multiple storage keys for CS.

第4図(イ)は,テーブル内のCSに対するグローバル
インデックス20の例,第4図(ロ)は,テーブル間のCS
に対するグローバルインデックス20の例を示す。
Fig. 4 (a) shows an example of global index 20 for CS in the table, and Fig. 4 (b) shows CS between tables.
Here is an example of a global index 20 for.

第4図(イ)に示す例では,テーブルTにおけるカラ
ムAの値によって,格納単位を以下のように分割してい
る。
In the example shown in FIG. 4A, the storage unit is divided as follows according to the value of the column A in the table T.

(a)Aの値が0以上で100未満の場合 格納単位をCS1とし,そのデータ編成は,カラムBの
値をキーとするBtree編成とする。
(A) When the value of A is 0 or more and less than 100 The storage unit is CS1 and its data organization is Btree organization with the value of column B as a key.

(b)Aの値が100以上で1000未満の場合 格納単位をCS2とし,そのデータ編成は,カラムBの
値をキーとするHash編成とする。
(B) When the value of A is 100 or more and less than 1000 The storage unit is CS2, and its data organization is Hash organization with the value of column B as a key.

(c)Aの値が1000以上の場合 格納単位をCS3とし,そのデータ編成は,カラムBの
値をキーとするBtree編成とする。
(C) When the value of A is 1000 or more The storage unit is CS3, and its data organization is Btree organization with the value of column B as a key.

グローバルインデックス(GX−1)20は,カラムCを
キーとし,これらの複数の異なるデータ編成をとる格納
単位CS1,CS2,CS3にまたがって用意される。
The global index (GX-1) 20 is prepared across the storage units CS1, CS2, CS3 that use the column C as a key and that have a plurality of different data organizations.

第4図(ロ)に示す例では,テーブルT1に対して格納
単位CS1が対応づけられ,テーブルT2に対して格納単位C
S2が対応づけられている。格納単位CS1のデータ編成
は,カラムAの値をキーとするBtree編成であり,格納
単位CS2のデータ編成は,カラムXの値をキーとするBtr
ee編成である。グローバルインデックス(GIX−2)20
は,カラムBをキーとした格納単位CS1,CS2の格納キー
を管理する。
In the example shown in FIG. 4B, the storage unit CS1 is associated with the table T1 and the storage unit C is associated with the table T2.
S2 is associated. The data organization of storage unit CS1 is Btree organization that uses the value of column A as a key, and the data organization of storage unit CS2 is Btr that uses the value of column X as a key.
ee organization. Global Index (GIX-2) 20
Manages the storage keys of storage units CS1 and CS2 with column B as the key.

以下,第4図(イ)の例に基づいて,格納構造定義,
最適化処理によるアクセス手順の生成論理,およびグロ
ーバルインデックスのレコード内容による実行時の処理
の具体例を,第5図および第6図に従って説明する。
Below, based on the example of Figure 4 (a), the storage structure definition,
A specific example of the access procedure generation logic by the optimization process and the process at the time of execution by the record contents of the global index will be described with reference to FIGS. 5 and 6.

(1)格納構造定義フェーズ 第4図(イ)に示す格納構造の定義では,テーブルT
をカラムAの範囲値により3つのベースCSに分割し,個
々のCS識別子(CSid)を定義するとともに,データ編成
として格納単位CS1,CS3のデータ編成をBtree,格納単位C
S2のデータ編成をHashと定義する。
(1) Storage structure definition phase In the storage structure definition shown in FIG.
Is divided into three base CSs by the range value of column A, each CS identifier (CSid) is defined, and the data organization of storage units CS1 and CS3 is Btree and storage unit C.
The data organization of S2 is defined as Hash.

次に,格納単位CS1,CS2,CS3に対するグローバルイン
デックス20を定義する。このグローバルインデックス20
のデータ編成は,カラムCをキーとするBtreeインデッ
クス編成とする。これらは,各ベースCSおよびグローバ
ルインデックス20のメタデータとして,ディクショナリ
14に登録される。
Next, the global index 20 for the storage units CS1, CS2, CS3 is defined. This Global Index 20
The data organization of is a Btree index organization with column C as a key. These are the dictionary as metadata of each base CS and global index 20.
Registered in 14.

(2)最適化処理フェーズ 副次キーを利用する問い合わせ11に対して,同一副次
キーのローカルインデックス,すなわち格納単位ごとの
個別の副次インデックスがあるかどうかを調べ,もしあ
る場合には,グローバルインデックス20とローカルイン
デックスのどちらが最適パスかを評価する。グローバル
インデックス20によるバスが最適であると判断され,そ
の選択が決定されたならば,第5図に示すアクセス手順
13のような各種アクセス手順と実行時スケジュール手順
を生成する。
(2) Optimization processing phase For queries 11 that use a secondary key, it is checked whether there is a local index of the same secondary key, that is, an individual secondary index for each storage unit, and if there is, Evaluate whether the global index 20 or the local index is the best path. If the bus according to the global index 20 is judged to be optimal and its selection is decided, the access procedure shown in FIG.
Generate various access procedures and run-time schedule procedures such as 13.

すなわち,最適化処理部12は,ディクショナリ14の定
義情報に従って,次の処理を行う。
That is, the optimization processing unit 12 performs the following processing according to the definition information of the dictionary 14.

(a)同一副次キーでローカルインデックスがある場
合,そのコスト評価を行うとともに,グローバルインデ
ックスを用いた場合のコスト評価を行う。
(A) When there is a local index with the same secondary key, the cost of the local index is evaluated, and the cost when the global index is used is evaluated.

(b)グローバルインデックスによるアクセスが低コス
トである場合,グローバルインデックスを使用すること
を決定する。
(B) Decide to use the global index if access by the global index is low cost.

(c)ディクショナリ14に登録されたグローバルインデ
ックスのメタデータにより,グローバルインデックスCS
のアクセス手順を生成する。ここではアクセス部品17
のうち,Btreeインデックスアクセス部品を用いる。
(C) The global index CS is registered by the metadata of the global index registered in the dictionary 14.
Generate access procedures for. Here access parts 17
Of these, the Btree index access component is used.

(d)グローバルインデックスが対象とする格納単位CS
1,CS2,CS3を検出し,これらに対するスケジュール手順
を生成する。
(D) Storage unit CS targeted by the global index
It detects 1, CS2, CS3 and generates a schedule procedure for them.

(e)格納単位CS1のメタデータから,Btreeアクセス部
品を用いるCS1のアクセス手順を生成する。
(E) The CS1 access procedure using the Btree access component is generated from the metadata of the storage unit CS1.

(f)格納単位CS2のメタデータから,Hashアクセス部品
を用いるCS2のアクセス手順を生成する。
(F) The CS2 access procedure using the Hash access component is generated from the metadata of the storage unit CS2.

(g)格納単位CS3のメタデータから,Btreeアクセス部
品を用いるCS3のアクセス手順を生成する。
(G) A CS3 access procedure using the Btree access component is generated from the metadata of the storage unit CS3.

(3)実行時処理フェーズ 最適化処理部12によって生成されたアクセス手順13が
実行されると,実行時に特定化された副次キーが示すグ
ローバルインデックスの最下位レコードの内容(ポイン
タ情報)に基づいて,ベースCSnへのスケージュール手
順が決定する。
(3) Runtime processing phase When the access procedure 13 generated by the optimization processing unit 12 is executed, it is based on the content (pointer information) of the lowest record of the global index indicated by the secondary key specified at execution time. Determines the schedule procedure for base CSn.

この例におけるグローバルインデックスの最下位レコ
ードは,例えば第6図に示すようになっているものとす
る。
The lowest record of the global index in this example is assumed to be as shown in FIG. 6, for example.

この場合,グローバルインデックスレコード40におけ
るレコードヘッダ情報のポインタ数は4である。副次キ
ーであるカラムCの値“aaa"に対して,該当レコードが
格納単位CS1に2個,格納単位CS2に1個,格納単位CS3
に1個存在する。
In this case, the number of pointers of the record header information in the global index record 40 is 4. For the value “aaa” in column C, which is a secondary key, there are two corresponding records in storage unit CS1, one in storage unit CS2, and storage unit CS3.
There is one in.

実行時には,副次キーの値“aaa"に対して,グローバ
ルインデックスレコード40におけるポインタP1〜P4のベ
ースCS情報および格納キーに基づき,各CSのデータ編成
に応じたアクセス手順をスケジュールし,該当するレコ
ードにアクセスする。
At the time of execution, the access procedure according to the data organization of each CS is scheduled for the secondary key value "aaa" based on the base CS information and the storage key of the pointers P1 to P4 in the global index record 40, and the corresponding Access records.

〔発明の効果〕〔The invention's effect〕

以上説明したように,本発明によれば,データベース
設計の観点からの分割格納に対して,処理効率を低下さ
せることなく,検索処理を実行できるようになる。具体
的には,例えば以下の効果がある。
As described above, according to the present invention, search processing can be executed for divided storage from the viewpoint of database design without lowering processing efficiency. Specifically, for example, there are the following effects.

(a)分割されたデータ全体に対して,あるカラム属性
のユニーク性の保証が,そのカラムを副次キーとしてグ
ローバルインデックスを設定することにより,効率よく
実施できるようになる。
(A) The uniqueness of a certain column attribute can be guaranteed for all the divided data efficiently by setting a global index using that column as a secondary key.

(b)分割されたデータごとの副次インデックスである
ローカルインデックスによる検索に比べて,グローバル
インデックスを利用することにより,一般に検索効率が
良くなる。
(B) The search efficiency is generally improved by using the global index as compared with the search by the local index which is a secondary index for each divided data.

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

第1図は本発明の原理説明図, 第2は本発明の実施例に係るグローバルインデックスに
よるアクセス手順説明図, 第3図は本発明の実施例によるグローバルインデックス
の最下位レコードの構造, 第4図は本発明の実施例に係るグローバルインデックス
の例, 第5図は本発明の実施例によるアクセス手順の生成処理
例, 第6図は本発明の実施例におけるグローバルインデック
スの最下位レコードの例, 第7図は従来技術によるデータベースの分割格納例を示
す。 図中,10はデータベース処理装置,11は問い合わせ,12は
最適化処理部,13はアクセス手順,14はディクショナリ,1
5はグローバルインデックス情報,16はアクセス部品ライ
ブラリ,17はアクセス部品,18はデータベース,19は格納
単位,20はグローバルインデックス,21は格納構造定義,2
2はテーブルを表す。
FIG. 1 is a diagram for explaining the principle of the present invention, FIG. 2 is a diagram for explaining an access procedure by the global index according to the embodiment of the present invention, FIG. 3 is a structure of the lowest record of the global index according to the embodiment of the present invention, and FIG. FIG. 5 is an example of a global index according to the embodiment of the present invention, FIG. 5 is an example of access procedure generation processing according to the embodiment of the present invention, FIG. 6 is an example of the lowest record of the global index in the embodiment of the present invention, FIG. 7 shows an example of divided storage of a database according to the prior art. In the figure, 10 is a database processor, 11 is an inquiry, 12 is an optimization processor, 13 is an access procedure, 14 is a dictionary, 1
5 is global index information, 16 is access component library, 17 is access component, 18 is database, 19 is storage unit, 20 is global index, 21 is storage structure definition, 2
2 represents a table.

フロントページの続き (72)発明者 三谷 政昭 神奈川県川崎市中原区上小田中1015番地 富士通株式会社内 (72)発明者 林 知博 神奈川県川崎市中原区上小田中1015番地 富士通株式会社内 (72)発明者 小幡 孝司 神奈川県川崎市中原区上小田中1015番地 富士通株式会社内 (72)発明者 関根 裕 神奈川県川崎市中原区上小田中1015番地 富士通株式会社内 (72)発明者 浦 満広 神奈川県川崎市中原区上小田中1015番地 富士通株式会社内 (72)発明者 石井 卓二 神奈川県川崎市中原区上小田中1015番地 富士通株式会社内Front page continued (72) Inventor Masaaki Mitani 1015 Kamiodanaka, Nakahara-ku, Kawasaki, Kanagawa, Fujitsu Limited (72) Inventor Tomohiro Hayashi 1015, Uedota, Nakahara-ku, Kawasaki, Kanagawa Prefecture, Fujitsu Limited (72) Inventor Koji Obata 1015 Kamiodanaka, Nakahara-ku, Kawasaki City, Kanagawa Prefecture, Fujitsu Limited (72) Inventor, Hiroshi Sekine 1015, Kamikodanaka, Nakahara-ku, Kawasaki City, Kanagawa Prefecture, Fujitsu Limited (72) Inventor, Mitsuhiro Ura, Kawasaki City, Kanagawa Prefecture 1015 Kamiodanaka, Nakahara-ku, Fujitsu Limited (72) Inventor Takuji Ishii 1015, Kamikodanaka, Nakahara-ku, Kawasaki-shi, Kanagawa Within Fujitsu Limited

Claims (1)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】論理構造表現のテーブル(22)またはその
一部分からなるデータ単位の組を,独立したデータ編成
を持つ複数の構造化されたデータの格納単位(19)に対
応づけて格納する機能を有するデータベース管理システ
ムにおけるグローバルインデックス処理方式であって, 異なるデータ編成をとることがある複数の前記格納単位
にまたがった副次インデックスの定義情報をグローバル
インデックス情報(15)として管理するディクショナリ
(14)と, 問い合わせに対して,前記ディクショナリの登録情報に
基づくグローバルインデックス(20)を用いたアクセス
と他のアクセスとのコスト評価を行い,グローバルイン
デックスによるアクセスが低コストである場合に,グロ
ーバルインデックスを使用したアクセス手順(13)を生
成する最適化処理部(12)とを備えたことを特徴とする
グローバルインデックス処理方式。
1. A function of storing a table (22) of a logical structure representation or a set of data units consisting of a part thereof in association with a plurality of structured data storage units (19) having independent data organizations. (14) which is a global index processing method in a database management system having, and which manages, as global index information (15), definition information of a secondary index that spans multiple storage units that may have different data organizations And for the inquiry, the cost of the access using the global index (20) based on the registered information of the dictionary and other accesses is evaluated, and the global index is used when the access by the global index is low cost. Generated access procedure (13) Global indexing scheme, characterized in that a processing unit (12).
JP2231450A 1990-08-31 1990-08-31 Global index processing method Expired - Fee Related JP2525947B2 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2231450A JP2525947B2 (en) 1990-08-31 1990-08-31 Global index processing method
US08/899,150 US5742809A (en) 1990-08-31 1997-07-23 Database generic composite structure processing system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2231450A JP2525947B2 (en) 1990-08-31 1990-08-31 Global index processing method

Publications (2)

Publication Number Publication Date
JPH04112243A JPH04112243A (en) 1992-04-14
JP2525947B2 true JP2525947B2 (en) 1996-08-21

Family

ID=16923716

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2231450A Expired - Fee Related JP2525947B2 (en) 1990-08-31 1990-08-31 Global index processing method

Country Status (1)

Country Link
JP (1) JP2525947B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0962698A (en) * 1995-08-29 1997-03-07 Nec Software Ltd Table data retrieving method
US9229983B2 (en) 2012-11-30 2016-01-05 Amazon Technologies, Inc. System-wide query optimization

Also Published As

Publication number Publication date
JPH04112243A (en) 1992-04-14

Similar Documents

Publication Publication Date Title
US6236988B1 (en) Data retrieval system
US5878409A (en) Method and apparatus for implementing partial declustering in a parallel database system
US7113957B1 (en) Row hash match scan join using summary contexts for a partitioned database system
Freeston The BANG file: a new kind of grid file
US5943677A (en) Sparsity management system for multi-dimensional databases
US20030074348A1 (en) Partitioned database system
US6845375B1 (en) Multi-level partitioned database system
US6092061A (en) Data partitioning by co-locating referenced and referencing records
Seeger et al. Multi-disk B-trees
JPH09212528A (en) Method of storing a database, method of retrieving records from a database, and database storage / retrieval system
US7010517B2 (en) Organization of SQL working memory in a transaction-bounded processing environment
Ouksel et al. Storage mappings for multidimensional linear dynamic hashing
US6944633B1 (en) Performing a join in a partitioned database system
Moulder An implementation of a data management system on an associative processor
US7363284B1 (en) System and method for building a balanced B-tree
US7203686B1 (en) Partition join in a partitioned database system
US7310719B2 (en) Memory management tile optimization
US7263536B1 (en) System and method for updating an index in a database
US8849795B2 (en) Optimizing the execution of a query in a multi-database system
US7984072B2 (en) Three-dimensional data structure for storing data of multiple domains and the management thereof
JP2525947B2 (en) Global index processing method
Feelifl et al. A fast convergence technique for online heatbalancing of btree indexed database over shared-nothing parallel systems
US8321420B1 (en) Partition elimination on indexed row IDs
CN103902743A (en) Self-help query method for controlling data through service nouns
Palvia Expressions for batched searching of sequential and hierarchical files

Legal Events

Date Code Title Description
FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20080531

Year of fee payment: 12

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

Free format text: PAYMENT UNTIL: 20090531

Year of fee payment: 13

LAPS Cancellation because of no payment of annual fees