JPH05120348A - Control system for buffer memory - Google Patents

Control system for buffer memory

Info

Publication number
JPH05120348A
JPH05120348A JP3283454A JP28345491A JPH05120348A JP H05120348 A JPH05120348 A JP H05120348A JP 3283454 A JP3283454 A JP 3283454A JP 28345491 A JP28345491 A JP 28345491A JP H05120348 A JPH05120348 A JP H05120348A
Authority
JP
Japan
Prior art keywords
buffer
index
data
search
storage device
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
JP3283454A
Other languages
Japanese (ja)
Inventor
Kazuyoshi Kawamura
和義 川村
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.)
NEC Solution Innovators Ltd
Original Assignee
NEC Solution Innovators 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 NEC Solution Innovators Ltd filed Critical NEC Solution Innovators Ltd
Priority to JP3283454A priority Critical patent/JPH05120348A/en
Publication of JPH05120348A publication Critical patent/JPH05120348A/en
Pending legal-status Critical Current

Links

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02TCLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO TRANSPORTATION
    • Y02T10/00Road transport of goods or passengers
    • Y02T10/10Internal combustion engine [ICE] based vehicles
    • Y02T10/12Improving ICE efficiencies

Landscapes

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

Abstract

PURPOSE:To provide the control system for buffer memory which can reduce the number of times for inputting/outputting between a main storage device and a second-order storage device in the case of a retrieval processing in at a data base system and can shorten the response time of the retrieval processing without using an I/O buffer storing an index block having the high possibility of use after a current time point for reading data. CONSTITUTION:A conditional expression is analyzed so as to decide a retrieval process (S1), required data are decided so as to execute retrieval (S2) and when there is the I/O buffer storing the required data and these data are indexes, a value enlarging the frequency of remaining the data in the main storage device of this I/O buffer is set (S10). This I/O buffer is relinked to the end of a chain (S11) and when there is no I/O buffer storing the required data, the data are read in an empty I/O buffer (S9). When there is no empty I/O buffer, the data are read in the I/O buffer at the head of the chain (S9) and the operation is continued.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明はバッファ記憶の制御方式
に関し、特にデータベースシステムの検索処理における
索引ファイルの主記憶装置と二次記憶装置との間の入出
力に用いるバッファ記憶の制御方式に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a buffer storage control system, and more particularly to a buffer storage control system used for input / output between a main storage device and a secondary storage device of an index file in a search process of a database system.

【0002】[0002]

【従来の技術】従来のバッファ記憶の制御方式は、主記
憶装置と二次記憶装置との間の入出力に用いるI/Oバ
ッファを管理し、任意のデータを読み込むために使用す
るI/Oバッファを決定する場合、I/Oバッファを使
用した時点が最も古い順に行うLRU制御方式により行
っており、例えば、図2に示すツリー構造を持った索引
を検索する場合、通常は最上位の索引ブロックから順に
下位の索引ブロックを読み込むことになる。このとき、
索引の同一レベルにおける索引ブロックの数は索引のレ
ベルが高くなるに従って少なる(n1>n2>n3)た
め、任意のブロックを読み込む確率は索引のレベルが高
くなるに従って高く(1/n1<1/n2<1/n3)
なるが、この索引を読み込む場合、索引のレベルは考慮
せずにデータ読み込み用のI/Oバッファを決定してい
た。
2. Description of the Related Art A conventional buffer storage control system manages an I / O buffer used for input / output between a main storage device and a secondary storage device, and uses an I / O used for reading arbitrary data. When deciding the buffer, the I / O buffer is used in the oldest order in the LRU control method. For example, when searching an index having a tree structure shown in FIG. The lower index blocks will be read in order from the block. At this time,
Since the number of index blocks at the same level of the index decreases as the index level increases (n1>n2> n3), the probability of reading any block increases as the index level increases (1 / n1 <1 / n2 <1 / n3)
However, when reading this index, the I / O buffer for data reading was determined without considering the index level.

【0003】[0003]

【発明が解決しようとする課題】上述した従来のバッフ
ァ記憶の制御方式は、ツリー構造を持つ索引を検索する
場合に適用すると、索引のレベルを考慮せずにデータ読
み込み用のI/Oバッファを決定しているため、現時点
より以降に使用する可能性の高い索引ブロックの入って
いるI/Oバッファを使用してしまうことが避けられ
ず、不必要な入力処理を要求されることがあるという問
題点がある。
When the conventional buffer storage control method described above is applied to search an index having a tree structure, an I / O buffer for data reading is used without considering the level of the index. Since it has been decided, it is unavoidable to use the I / O buffer that contains the index block that is likely to be used after the present time, and unnecessary input processing may be required. There is a problem.

【0004】本発明の目的は、現時点より以降に使用す
る可能性が高い索引ブロックが入っているI/Oバッフ
ァをデータの読み込みに使用することがなく、データベ
ースシステムの検索処理での主記憶装置と二次記憶装置
間の入出力回数を削減し、検索処理の応答時間を短くす
ることができるバッファ記憶の制御方式を提供すること
にある。
An object of the present invention is not to use an I / O buffer containing an index block, which is likely to be used after the present time, for reading data, and a main storage device in a search process of a database system. Another object of the present invention is to provide a buffer storage control method capable of reducing the number of inputs and outputs between the secondary storage device and the response time of search processing.

【0005】[0005]

【課題を解決するための手段】本発明のバッファ記憶の
制御方式は、データベースシステムの検索処理における
索引ファイルの主記憶装置と二次記憶装置との間の入出
力に用いるバッファ記憶の制御方式において、指定を受
けた条件式を解析して検索手順を決定し、この決定した
検索手順に従って検索を行うために必要とするデータを
決定して検索を行い、検索が終了したか否かを判定し、
検索が終了していなければ前記必要とするデータが入っ
ているI/Oバッファが存在しているか否かを判定し、
前記必要とするデータが入っているI/Oバッファが存
在しかつこのデータが索引である場合はこのI/Oバッ
ファの主記憶装置に残す頻度を索引のレベルに応じて大
きくした値を設定し、この大きくした値を設定したデー
タを読み込んだI/OバッファをこのI/Oバッファの
チェインの最後に繋ぎ替えして前記検索手順に従って検
索を行い、前記必要とするデータが入っているI/Oバ
ッファが存在していなければ次に空きのI/Oバッファ
が存在しているか否かを判定し、空きのI/Oバッファ
が存在していればこの空きのI/Oバッファに前記二次
記憶装置から前記必要とするデータを読み込み前記必要
とするデータが入っているI/Oバッファが存在する場
合の動作に引継ぎ、空きのI/Oバッファが存在してい
なければI/Oバッファのチェインの先頭のI/Oバッ
ファが利用可能か否かを判定し、前記先頭のI/Oバッ
ファが利用可能であれば前記二次記憶装置から前記必要
とするデータを読み込む動作に引継ぎ、前記先頭のI/
Oバッファが利用可能でなければ前記先頭のI/Oバッ
ファを主記憶装置に残す頻度を減らし、前記先頭のI/
OバッファをI/Oバッファのチェインの最後に繋ぎ替
えて再度I/Oバッファのチェインの先頭のI/Oバッ
ファが利用可能か否かを判定する動作に引継ぐ構成であ
る。
A buffer storage control system of the present invention is a buffer storage control system used for input / output between a main storage device and a secondary storage device of an index file in a search process of a database system. , The specified conditional expression is analyzed to determine the search procedure, the data required for performing the search is determined according to the determined search procedure, the search is performed, and it is determined whether the search is completed. ,
If the search is not completed, it is determined whether or not there is an I / O buffer containing the required data,
If there is an I / O buffer containing the required data and this data is an index, set a value that increases the frequency of leaving this I / O buffer in the main storage device according to the level of the index. , The I / O buffer that has read the data in which this increased value has been read is connected to the end of the chain of this I / O buffer, a search is performed according to the search procedure, and the I / O containing the required data is entered. If the O buffer does not exist, then it is determined whether or not there is a free I / O buffer next. If there is a free I / O buffer, the secondary I / O buffer is added to the secondary I / O buffer. The required data is read from the storage device, and the operation is taken over when there is an I / O buffer containing the required data. If there is no empty I / O buffer, the I / O buffer is read. It is determined whether the head I / O buffer of the chain of files is available, and if the head I / O buffer is available, the operation is taken over to read the necessary data from the secondary storage device, I / at the beginning
If the O buffer is not available, the frequency of leaving the head I / O buffer in the main storage device is reduced to reduce the head I / O buffer.
This is a configuration in which the O buffer is connected to the end of the chain of I / O buffers and the operation is continued to determine again whether or not the first I / O buffer in the chain of I / O buffers is available.

【0006】[0006]

【実施例】次に、本発明の実施例について図面を参照し
て説明する。
Embodiments of the present invention will now be described with reference to the drawings.

【0007】図1は本発明の一実施例の流れ図である。
又、図3は二次記憶装置の構成を示すブロック図であ
る。
FIG. 1 is a flow chart of one embodiment of the present invention.
3 is a block diagram showing the configuration of the secondary storage device.

【0008】すなわち、図3の例では、二次記憶装置1
には項目Aの索引2およびデータレコード3が格納され
ており、項目Aの索引2の段数は“3”であり、索引ブ
ロックには各々4個の値とこの値を持つレコードの番
号、又は、下位索引ブロックへのポインタの組を格納し
ている。また、データブロック3には、各々2件のレコ
ードを格納している。
That is, in the example of FIG. 3, the secondary storage device 1
Stores the index 2 and the data record 3 of the item A, the number of stages of the index 2 of the item A is "3", and each index block has four values and the record number having this value, or , Stores a set of pointers to the lower index blocks. Further, the data block 3 stores two records each.

【0009】図4ないし図14は実施例の処理を順次行
った時のI/Oバッファの内容と管理状態の遷移を説明
する説明図である。
4 to 14 are explanatory views for explaining the contents of the I / O buffer and the transition of the management state when the processes of the embodiment are sequentially performed.

【0010】以下、図1ないし1図14を用いて、二次
記憶装置に対し、条件式“項目A=20 OR 項目A
=30”を満足するレコード番号R2およびR3のレコ
ードを求める処理について説明する。動作の流れは、図
1に従うものとする。 (1) 条件式の解析。
1 to 14, the conditional expression "item A = 20 OR item A" is applied to the secondary storage device.
The process of obtaining the records with the record numbers R2 and R3 that satisfy "= 30" will be described. The operation flow is as shown in FIG. 1. (1) Analysis of conditional expression.

【0011】ステップ(以下Sと記す)1では条件式
“項目A=20 OR 項目A=30”を解析する。そ
の結果、項目Aの索引を“20”で検索し、次に項目A
の索引を“30”で検索し、項目Aの索引を“20”で
検索した結果と項目Aの索引を“30”で検索した結果
の論理和を求めることにより、条件式“項目A=20O
R 項目A=30”を満足するレコードが求まることが
分かり、S2に処理を進める。 (2) 項目Aの索引を“20”で検索する。
In step (hereinafter referred to as S) 1, the conditional expression "item A = 20 OR item A = 30" is analyzed. As a result, the index of item A is searched by "20", and then item A is searched.
Of the conditional expression “item A = 20O” by calculating the logical sum of the result of searching the index of item A with “20” and the result of searching the index of item A with “20” and the index of item A with “30”.
It is found that a record satisfying R item A = 30 "is obtained, and the process proceeds to S2. (2) The index of item A is searched by" 20 ".

【0012】S2では項目Aの索引を“20”で検索す
るために、索引ブロック1−1を求めることを決定し、
S3に処理を進める。
In S2, it is decided to obtain the index block 1-1 to search the index of item A by "20".
The process proceeds to S3.

【0013】S3では検索が終了していないため、S4
に処理を進める。 索引ブロック1−1を求める。
Since the search is not completed in S3, S4 is executed.
Proceed to. Find index block 1-1.

【0014】S4では索引ブロック1−1が入っている
I/Oバッファが存在するか否かを判定する。
At S4, it is determined whether or not there is an I / O buffer containing the index block 1-1.

【0015】図4は主記憶装置の初期状態を示すもの
で、すべて空きで索引ブロック1−1が入っているI/
Oバッファが存在しないため、S5に処理を進める。
FIG. 4 shows the initial state of the main memory device, which is an I / O that is empty and contains the index block 1-1.
Since there is no O buffer, the process proceeds to S5.

【0016】S5では主記憶装置内に空きのI/Oバッ
ファが存在するか否かを判定する。図4で示すように空
きのI/Oバッファが存在しているため、S9に処理を
進める。
In S5, it is determined whether or not there is an empty I / O buffer in the main storage device. Since there is an empty I / O buffer as shown in FIG. 4, the process proceeds to S9.

【0017】S9では二次記憶装置から索引ブロック1
−1を空きのI/Oバッファに読み込み、S10に処理
を進める。
In S9, the index block 1 is read from the secondary storage device.
-1 is read into the empty I / O buffer, and the process proceeds to S10.

【0018】S10では索引ブロック1−1が入ってい
るI/Oバッファの主記憶装置に残す頻度を設定する。
ここでは、項目Aの索引のレベルが3段であり、索引ブ
ロック1−1が最上位の索引であるため、“2”に設定
し、S11に処理を進める。
In S10, the frequency of leaving the index block 1-1 in the main memory of the I / O buffer is set.
Here, since the index level of the item A is three levels and the index block 1-1 is the highest index, it is set to "2" and the process proceeds to S11.

【0019】S11では索引ブロック1−1が入ってい
るI/OバッファをI/Oバッファのチェインの最後に
繋ぎ替えてS2に処理を進める。この時点でのI/Oバ
ッファの管理状態を図5に示す。
In S11, the I / O buffer containing the index block 1-1 is connected to the end of the chain of I / O buffers and the process proceeds to S2. The management state of the I / O buffer at this time is shown in FIG.

【0020】S2では、索引ブロック1−1の値“1
0”のポインタで示す索引ブロック2−1を求めること
を決定し、S3に処理を進める。
At S2, the value "1" of the index block 1-1
It is determined to obtain the index block 2-1 indicated by the 0 "pointer, and the process proceeds to S3.

【0021】S3では検索が終了していないため、S4
に処理を進める。 索引ブロック2−1を求める。
Since the search is not completed in S3, S4 is executed.
Proceed to. Find index block 2-1.

【0022】S4では、図5で示すように索引ブロック
2−1が入っているI/Oバッファが存在しないためS
5に処理を進める。
At S4, since there is no I / O buffer containing the index block 2-1 as shown in FIG.
The process proceeds to 5.

【0023】S5では図5で示すように空きのI/Oバ
ッファが存在しているため、S9に処理を進める。
At S5, since there is an empty I / O buffer as shown in FIG. 5, the process proceeds to S9.

【0024】S9では二次記憶装置から索引ブロック2
−1を空きのI/Oバッファに読み込み、S10に処理
を進める。
In S9, the index block 2 is read from the secondary storage device.
-1 is read into the empty I / O buffer, and the process proceeds to S10.

【0025】S10では、索引ブロック2−1が2段目
の索引であるため、主記憶装置に残す頻度を“1”に設
定し、S11に処理を進める。
In S10, since the index block 2-1 is the index of the second stage, the frequency to be left in the main memory is set to "1", and the process proceeds to S11.

【0026】S11では索引ブロック2−1が入ってい
るI/OバッファをI/Oバッファのチェインの最後に
繋ぎ替えてS2に処理を進める。この時点でのI/Oバ
ッファの管理状態を図6に示す。
In S11, the I / O buffer containing the index block 2-1 is reconnected to the end of the chain of I / O buffers and the process proceeds to S2. FIG. 6 shows the management state of the I / O buffer at this point.

【0027】S2では索引ブロック2−1の値“10”
のポインタで示す索引ブロック3−1を求めること決定
し、S3に処理を進める。
At S2, the value "10" of the index block 2-1 is obtained.
It is determined that the index block 3-1 indicated by the pointer is obtained, and the process proceeds to S3.

【0028】S3では検索が終了していないため、S4
に処理を進める。 索引ブロック3−1を求める。
Since the search is not completed in S3, S4 is executed.
Proceed to. Find index block 3-1.

【0029】S4では図6で示すように索引ブロック3
−1が入っているI/Oバッファが存在していないため
S5に処理を進める。
In S4, the index block 3 is generated as shown in FIG.
Since there is no I / O buffer containing -1, the process proceeds to S5.

【0030】S5では図6で示すように空きのI/Oバ
ッファが存在しているため、S9に処理を進める。
At S5, since there is an empty I / O buffer as shown in FIG. 6, the process proceeds to S9.

【0031】S9では二次記憶装置から索引ブロック3
−1を空きのI/Oバッファに読み込み、S10に処理
を進める。
In S9, the index block 3 is read from the secondary storage device.
-1 is read into the empty I / O buffer, and the process proceeds to S10.

【0032】S10では索引ブロック3−1が1段目の
索引であるため、主記憶装置に残す頻度を“0”に設定
し、S11に処理を進める。
Since the index block 3-1 is the index of the first stage in S10, the frequency to be left in the main memory is set to "0", and the process proceeds to S11.

【0033】S11では索引ブロック3−1が入ってい
るI/OバッファをI/Oバッファのチェインの最後に
繋ぎ替えてS2に処理を進める。この時点でのI/Oバ
ッファの管理状態を図7に示す。
In S11, the I / O buffer containing the index block 3-1 is connected to the end of the chain of I / O buffers, and the process proceeds to S2. The management state of the I / O buffer at this time is shown in FIG.

【0034】S2では索引ブロック3−1の値“20”
のレコード番号R2が示すレコードを求めるためにデー
タブロック1を求めることを決定し、S3に処理を進め
る。
At S2, the value "20" of the index block 3-1.
It is determined that the data block 1 is to be obtained in order to obtain the record indicated by the record number R2, and the process proceeds to S3.

【0035】S3では検索が終了していないため、S4
に処理を進める。 データブロック1を求める。
Since the search is not completed in S3, S4 is executed.
Proceed to. Find data block 1.

【0036】S4では図7で示すようにデータブロック
1が入っているI/Oバッファが存在しないため、S5
に処理を進める。
Since there is no I / O buffer containing the data block 1 in S4 as shown in FIG. 7, S5 is executed.
Proceed to.

【0037】S5では図7で示すように空きのI/Oバ
ッファが存在していないため、S6に処理を進める。
In S5, as shown in FIG. 7, since there is no empty I / O buffer, the process proceeds to S6.

【0038】S6ではI/Oバッファのチェインの先頭
のI/Oバッファが利用可能か否かを判定する。図7で
示すように、I/Oバッファのチェインの先頭のI/O
バッファの主記憶装置に残す頻度が“2”であるため、
S7に処理を進める。
In S6, it is determined whether or not the first I / O buffer in the chain of I / O buffers is available. As shown in FIG. 7, the first I / O in the chain of I / O buffers
Since the frequency of leaving in the main memory of the buffer is "2",
The process proceeds to S7.

【0039】S7ではI/Oバッファのチェインの先頭
のI/Oバッファの主記憶装置に残す頻度を“2”から
“1”に減らし、S8に処理を進める。
In S7, the frequency of leaving the main I / O buffer in the head I / O buffer of the chain of I / O buffers is reduced from "2" to "1", and the process proceeds to S8.

【0040】S8ではI/Oバッファのチェインの先頭
のI/OバッファをI/Oバッファのチェインの最後に
繋ぎ替えてS6に処理を進める。この時点でのI/Oバ
ッファの管理状態を図8に示す。
In S8, the head I / O buffer of the chain of I / O buffers is connected to the end of the chain of I / O buffers and the process proceeds to S6. The management state of the I / O buffer at this time is shown in FIG.

【0041】S6では図8に示すようにI/Oバッファ
のチェインの先頭のI/Oバッファの主記憶装置に残す
頻度が“1”であるため、S7に処理を進める。
In S6, as shown in FIG. 8, since the frequency of leaving in the main storage device of the head I / O buffer of the chain of I / O buffers is "1", the process proceeds to S7.

【0042】S7ではI/Oバッファのチェインの先頭
のI/Oバッファの主記憶装置に残す頻度を“1”から
“0”に減らし、S8に処理を進める。
In S7, the frequency of leaving the main I / O buffer in the head I / O buffer of the chain of I / O buffers is reduced from "1" to "0", and the process proceeds to S8.

【0043】S8ではI/Oバッファのチェインの先頭
のI/OバッファをI/Oバッファのチェインの最後に
繋ぎ替えてS6に処理を進める。この時点でのI/Oバ
ッファの管理状態を図9に示す。
In S8, the head I / O buffer of the chain of I / O buffers is connected to the end of the chain of I / O buffers, and the process proceeds to S6. The management state of the I / O buffer at this time is shown in FIG.

【0044】S6では図9に示すように、I/Oバッフ
ァのチェインの先頭のI/Oバッファの主記憶装置に残
す頻度が“0”であるため、S9に処理を進める。
In S6, as shown in FIG. 9, since the frequency of remaining in the main storage device of the head I / O buffer of the chain of I / O buffers is "0", the process proceeds to S9.

【0045】S9では二次記憶装置からデータブロック
1をI/Oバッファのチェインの先頭のI/Oバッファ
に読み込み、S10に処理を進める。
In S9, the data block 1 is read from the secondary storage device into the I / O buffer at the head of the chain of I / O buffers, and the process proceeds to S10.

【0046】S10ではデータブロック1が索引でない
ため、主記憶装置に残す頻度を“0”に設定し、S11
に処理を進める。
Since the data block 1 is not an index in S10, the frequency to be left in the main memory is set to "0", and S11 is set.
Proceed to.

【0047】S11ではデータブロック1が入っている
I/OバッファをI/Oバッファのチェインの最後に繋
ぎ替えてS2に処理を進める。この時点でのI/Oバッ
ファの管理状態を図10に示す。 (2) 項目Aの索引を“30”で検索する。
In S11, the I / O buffer containing the data block 1 is reconnected to the end of the chain of I / O buffers, and the process proceeds to S2. FIG. 10 shows the management state of the I / O buffer at this point. (2) Search the index of item A with "30".

【0048】S2では項目Aの索引を“30”で検索す
るため、索引ブロック1−1を求めることを決定し、S
3に処理を進める。
In S2, the index of item A is searched with "30", so it is decided to find the index block 1-1.
The process proceeds to 3.

【0049】S3では検索が終了していないため、S4
に処理を進める。 索引ブロック1−1を求める。
Since the search is not completed in S3, S4 is executed.
Proceed to. Find index block 1-1.

【0050】S4では図10に示すように、索引ブロッ
ク1−1が入っているI/Oバッファが存在するため、
S10に処理を進める。
At S4, as shown in FIG. 10, since there is an I / O buffer containing the index block 1-1,
The process proceeds to S10.

【0051】S10では項目Aの索引のレベルが3段で
あり、索引ブロック1−1が最上位の索引であるため、
索引ブロック1−1の入っているI/Oバッファの主記
憶装置に残す頻度を“2”に設定し、S11に処理を進
める。
At S10, the level of the index of item A is three, and the index block 1-1 is the highest index.
The frequency of remaining in the main memory of the I / O buffer containing the index block 1-1 is set to "2", and the process proceeds to S11.

【0052】S11では索引ブロック1−1が入ってい
るI/OバッファをI/Oバッファのチェインの最後に
繋ぎ替えて、S2に処理を進める。この時点でのI/O
バッファの管理状態を図11に示す。
In S11, the I / O buffer containing the index block 1-1 is reconnected to the end of the chain of I / O buffers, and the process proceeds to S2. I / O at this point
The management state of the buffer is shown in FIG.

【0053】S2では索引ブロック1−1の値“10”
のポインタで示す索引ブロック2−1を求めることを決
定し、S3に処理を進める。
At S2, the value "10" of the index block 1-1.
It is determined that the index block 2-1 indicated by the pointer is obtained, and the process proceeds to S3.

【0054】S3では検索が終了していないため、S4
に処理を進める。 索引ブロック2−1を求める。
Since the search is not completed in S3, S4 is executed.
Proceed to. Find index block 2-1.

【0055】S4では図11に示すように索引ブロック
2−1が入っているI/Oバッファが存在するため、S
10に処理を進める。
Since there is an I / O buffer containing the index block 2-1 in S4 as shown in FIG.
The process proceeds to 10.

【0056】S10では索引ブロック2−1が2段目の
索引であるため、主記憶装置に残す頻度を“1”に設定
し、S11に処理を進める。
In S10, since the index block 2-1 is the second-stage index, the frequency to be left in the main memory is set to "1", and the process proceeds to S11.

【0057】S11では索引ブロック2−1が入ってい
るI/OバッファをI/Oバッファのチェインの最後に
繋ぎ替えて、S2に処理を進める。この時点でのI/O
バッファの管理状態を図12に示す。
In S11, the I / O buffer containing the index block 2-1 is reconnected to the end of the chain of I / O buffers, and the process proceeds to S2. I / O at this point
The management state of the buffer is shown in FIG.

【0058】S2では索引ブロック2−1の値“10”
のポインタが示す索引ブロック3−1を求めることを決
定し、S3に処理を進める。
At S2, the value "10" of the index block 2-1 is obtained.
It is determined to obtain the index block 3-1 indicated by the pointer of, and the process proceeds to S3.

【0059】S3では検索が終了していないため、S4
に処理を進める。 索引ブロック3−1を求める。
Since the search is not completed in S3, S4 is executed.
Proceed to. Find index block 3-1.

【0060】S4では図12に示すように索引ブロック
3−1が入っているI/Oバッファが存在しないため、
S5に処理を進める。
At S4, since there is no I / O buffer containing the index block 3-1 as shown in FIG. 12,
The process proceeds to S5.

【0061】S5では図12に示すように空きのI/O
バッファが存在しないため、S6に処理を進める。
At S5, as shown in FIG. 12, an empty I / O
Since there is no buffer, the process proceeds to S6.

【0062】S6では図12に示すように、I/Oバッ
ファのチェインの先頭のI/Oバッファの主記憶装置に
残す頻度が“0”であるため、S9に処理を進める。
In S6, as shown in FIG. 12, since the frequency of leaving in the main memory of the head I / O buffer of the chain of I / O buffers is "0", the process proceeds to S9.

【0063】S9では、二次記憶装置から索引ブロック
3−1をI/Oバッファのチェインの先頭のI/Oバッ
ファに読み込み、S10に処理を進める。
In S9, the index block 3-1 is read from the secondary storage device into the I / O buffer at the head of the chain of I / O buffers, and the process proceeds to S10.

【0064】S10では索引ブロック3−1が1段目の
索引であるため、主記憶装置に残す頻度を”0”に設定
し、S11に処理を進める。
Since the index block 3-1 is the index of the first stage in S10, the frequency to be left in the main memory is set to "0", and the process proceeds to S11.

【0065】S11では索引ブロック3−1が入ってい
るI/OバッファをI/Oバッファのチェインの最後に
繋ぎ替えて、S2に処理を進める。この時点でのI/O
バッファの管理状態を図13に示す。
In S11, the I / O buffer containing the index block 3-1 is reconnected to the end of the chain of I / O buffers, and the process proceeds to S2. I / O at this point
The management state of the buffer is shown in FIG.

【0066】S2では索引ブロック3−1の値“30”
のレコード番号R2が示すレコードを求めるためにデー
タブロック2を求めることを決定し、S3に処理を進め
る。
At S2, the value "30" of the index block 3-1.
It is determined to obtain the data block 2 in order to obtain the record indicated by the record number R2, and the process proceeds to S3.

【0067】S3では検索が終了していないため、S4
に処理を進める。 データブロック2を求める。
Since the search is not completed in S3, S4 is executed.
Proceed to. Find data block 2.

【0068】以下(2)のと同様に処理を進めて、デ
ータブロック2を求め、S2に処理を進める。データブ
ロック2の読み込みが終了した時点のI/Oバッファの
管理状態を図14に示す。 (3) 項目Aの索引を“20”で検索した結果と項目Aの
索引を“30”で検索した結果の論理和を求める。
The same process as (2) below is performed to obtain the data block 2, and the process proceeds to S2. FIG. 14 shows the management state of the I / O buffer when the reading of the data block 2 is completed. (3) The logical sum of the result of searching the index of item A with “20” and the result of searching the index of item A with “30” is obtained.

【0069】S2では項目Aの索引を“20”で検索し
た結果と項目Aの索引を“30”で検索した結果の論理
和を求めることにより、条件式“項目A=20 OR
項目A=30”を満足するレコード番号R2およびR3
のレコードが求まり、S3に処理を進める。
At S2, the logical sum of the result of searching the index of item A by "20" and the result of searching the index of item A by "30" is obtained, and the conditional expression "item A = 20 OR" is obtained.
Record numbers R2 and R3 satisfying item A = 30 "
Is obtained, and the process proceeds to S3.

【0070】S3では検索が終了したため、処理を終了
する。
At S3, since the search is completed, the process is completed.

【0071】[0071]

【発明の効果】以上説明したように、本発明は、指定を
受けた条件式を解析して検索手順を決定し、この決定し
た検索手順に従って検索を行うために必要とするデータ
を決定して検索を行い、必要とするデータが入っている
I/Oバッファが存在しかつこのデータが索引である場
合はこのI/Oバッファの主記憶装置に残す頻度を索引
のレベルに応じて大きくした値を設定し、このI/Oバ
ッファをチェインの最後に繋ぎ替えし、必要とするデー
タが入っているI/Oバッファが存在していなければ次
に空きのI/Oバッファに二次記憶装置から必要とする
データを読み込み動作を継続し、空きのI/Oバッファ
が存在していなければI/Oバッファのチェインの先頭
のI/Oバッファが利用可能であれば必要とするデータ
を読み込み動作を継続し、先頭のI/Oバッファが利用
可能でなければ先頭のI/Oバッファを主記憶装置に残
す頻度を減らしチェインの最後に繋ぎ替えて動作を継続
することにより、現時点より以降に使用する可能性が高
い索引ブロックが入っているI/Oバッファを、データ
の読み込みに使用することがなく、データベースシステ
ムの検索処理における主記憶装置と二次記憶装置との入
出力回数が削減され、検索処理における応答時間が短く
なるという効果が有る。
As described above, according to the present invention, the designated conditional expression is analyzed to determine the search procedure, and the data necessary for performing the search is determined according to the determined search procedure. If there is an I / O buffer that contains the required data when the search is performed and this data is an index, the value of the frequency of leaving this I / O buffer in the main storage device increased according to the level of the index. Is set, this I / O buffer is reconnected to the end of the chain, and if there is no I / O buffer containing the required data, the next free I / O buffer is transferred from the secondary storage device. Continue the operation of reading the required data, and if there is no empty I / O buffer, read the required data if the first I / O buffer in the chain of I / O buffers is available. If the first I / O buffer is not available, the frequency of leaving the first I / O buffer in the main storage device is reduced, and the operation is continued by connecting to the end of the chain to continue the operation. The I / O buffer containing the likely index block is not used for reading data, and the number of I / O operations between the main storage device and the secondary storage device in the search processing of the database system is reduced, and the search is performed. This has the effect of shortening the response time in processing.

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

【図1】本発明の一実施例の流れ図である。FIG. 1 is a flow chart of one embodiment of the present invention.

【図2】ツリー構造を持った索引の構造図である。FIG. 2 is a structural diagram of an index having a tree structure.

【図3】二次記憶装置の構成を示すブロック図である。FIG. 3 is a block diagram showing a configuration of a secondary storage device.

【図4】実施例の処理を順次行った時のI/Oバッファ
の内容と管理状態の遷移を説明する説明図である。
FIG. 4 is an explanatory diagram illustrating the contents of the I / O buffer and the transition of the management state when the processes of the embodiment are sequentially performed.

【図5】I/Oバッファの内容と管理状態の遷移を説明
する説明図である。
FIG. 5 is an explanatory diagram illustrating the contents of the I / O buffer and the transition of the management state.

【図6】I/Oバッファの内容と管理状態の遷移を説明
する説明図である。
FIG. 6 is an explanatory diagram for explaining the contents of the I / O buffer and the transition of the management state.

【図7】I/Oバッファの内容と管理状態の遷移を説明
する説明図である。
FIG. 7 is an explanatory diagram illustrating the contents of the I / O buffer and the transition of the management state.

【図8】I/Oバッファの内容と管理状態の遷移を説明
する説明図である。
FIG. 8 is an explanatory diagram illustrating the contents of the I / O buffer and the transition of the management state.

【図9】I/Oバッファの内容と管理状態の遷移を説明
する説明図である。
FIG. 9 is an explanatory diagram illustrating the contents of the I / O buffer and the transition of the management state.

【図10】I/Oバッファの内容と管理状態の遷移を説
明する説明図である。
FIG. 10 is an explanatory diagram illustrating the contents of the I / O buffer and the transition of the management state.

【図11】I/Oバッファの内容と管理状態の遷移を説
明する説明図である。
FIG. 11 is an explanatory diagram illustrating the contents of the I / O buffer and the transition of the management state.

【図12】I/Oバッファの内容と管理状態の遷移を説
明する説明図である。
FIG. 12 is an explanatory diagram illustrating the contents of the I / O buffer and the transition of the management state.

【図13】I/Oバッファの内容と管理状態の遷移を説
明する説明図である。
FIG. 13 is an explanatory diagram illustrating the contents of the I / O buffer and the transition of the management state.

【図14】I/Oバッファの内容と管理状態の遷移を説
明する説明図である。
FIG. 14 is an explanatory diagram for explaining the contents of the I / O buffer and the transition of the management state.

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

1 二次記憶装置 2 項目Aの索引 3 データレコード 1 Secondary Storage 2 Index of Item A 3 Data Record

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】 データベースシステムの検索処理におけ
る索引ファイルの主記憶装置と二次記憶装置との間の入
出力に用いるバッファ記憶の制御方式において、指定を
受けた条件式を解析して検索手順を決定し、この決定し
た検索手順に従って検索を行うために必要とするデータ
を決定して検索を行い、検索が終了したか否かを判定
し、検索が終了していなければ前記必要とするデータが
入っているI/Oバッファが存在しているか否かを判定
し、前記必要とするデータが入っているI/Oバッファ
が存在しかつこのデータが索引である場合はこのI/O
バッファの主記憶装置に残す頻度を索引のレベルに応じ
て大きくした値を設定し、この大きくした値を設定した
データを読み込んだI/OバッファをこのI/Oバッフ
ァのチェインの最後に繋ぎ替えして前記検索手順に従っ
て検索を行い、前記必要とするデータが入っているI/
Oバッファが存在していなければ次に空きのI/Oバッ
ファが存在しているか否かを判定し、空きのI/Oバッ
ファが存在していればこの空きのI/Oバッファに前記
二次記憶装置から前記必要とするデータを読み込み前記
必要とするデータが入っているI/Oバッファが存在す
る場合の動作に引継ぎ、空きのI/Oバッファが存在し
ていなければI/Oバッファのチェインの先頭のI/O
バッファが利用可能か否かを判定し、前記先頭のI/O
バッファが利用可能であれば前記二次記憶装置から前記
必要とするデータを読み込む動作に引継ぎ、前記先頭の
I/Oバッファが利用可能でなければ前記先頭のI/O
バッファを主記憶装置に残す頻度を減らし、前記先頭の
I/OバッファをI/Oバッファのチェインの最後に繋
ぎ替えて再度I/Oバッファのチェインの先頭のI/O
バッファが利用可能か否かを判定する動作に引継ぐこと
を特徴とするバッファ記憶の制御方式。
1. In a buffer storage control method used for input / output between a main storage device and a secondary storage device of an index file in a search process of a database system, a specified conditional expression is analyzed to perform a search procedure. Determine, determine the data required to perform the search according to the determined search procedure, perform the search, determine whether the search is finished, and if the search is not finished, the required data is It is determined whether or not there is an I / O buffer that contains the I / O buffer, and if there is an I / O buffer that contains the required data and this data is an index, this I / O buffer
A value is set that increases the frequency of leaving the buffer in the main memory according to the level of the index, and the I / O buffer that has read the data with this increased value is connected to the end of the chain of this I / O buffer. Then, a search is performed according to the search procedure described above, and an I /
If the O buffer does not exist, then it is determined whether or not there is a free I / O buffer next. If there is a free I / O buffer, the secondary I / O buffer is added to the secondary I / O buffer. The required data is read from the storage device, the operation is taken over when there is an I / O buffer containing the required data, and if there is no empty I / O buffer, the chain of I / O buffers I / O at the beginning of
It is determined whether or not the buffer is available, and the I / O at the head
If a buffer is available, the operation of reading the required data from the secondary storage device is taken over, and if the head I / O buffer is not available, the head I / O is transferred.
The frequency of leaving the buffer in the main memory is reduced, the head I / O buffer is connected to the end of the chain of the I / O buffer, and the head I / O of the chain of the I / O buffer is re-connected.
A control method of buffer storage, which is succeeded to an operation of determining whether or not a buffer is available.
JP3283454A 1991-10-30 1991-10-30 Control system for buffer memory Pending JPH05120348A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP3283454A JPH05120348A (en) 1991-10-30 1991-10-30 Control system for buffer memory

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP3283454A JPH05120348A (en) 1991-10-30 1991-10-30 Control system for buffer memory

Publications (1)

Publication Number Publication Date
JPH05120348A true JPH05120348A (en) 1993-05-18

Family

ID=17665759

Family Applications (1)

Application Number Title Priority Date Filing Date
JP3283454A Pending JPH05120348A (en) 1991-10-30 1991-10-30 Control system for buffer memory

Country Status (1)

Country Link
JP (1) JPH05120348A (en)

Similar Documents

Publication Publication Date Title
US20090063527A1 (en) Processing of database statements with join predicates on range-partitioned tables
US5081608A (en) Apparatus for processing record-structured data by inserting replacement data of arbitrary length into selected data fields
JPH11161658A (en) Method and device for calculating priority of additional retrieval word and storing medium housing priority calculating program of additional retrieval word
JPH05120348A (en) Control system for buffer memory
JPH06251076A (en) Device and method for retrieving data base
CN114518841A (en) Processor in memory and method for outputting instruction using processor in memory
JPH08314957A (en) Database system
JP2000339332A (en) Medium recording retrieval index, method and device for updating retrieval index and medium recording its program
JPH04340163A (en) Keyword retrieval system
JP2639804B2 (en) Database search device
JPH0330066A (en) Information retrieval system
JPH0456344B2 (en)
JP2722684B2 (en) File system search device
JPH04205173A (en) Information retrieval system
JPS61278932A (en) Method of processing data addition
JPH08328924A (en) Index updating system
KR0141906B1 (en) Hardware driving device for searching data
JP3555542B2 (en) Group number setting device and group number setting method
JPS62248031A (en) Data managing method
JPH0130168B2 (en)
JPH02204835A (en) Rule type program executing method
JPS633351A (en) Buffer retrieving control system
JPS63253431A (en) Retrieving system for data base of inverted structure
JPS60122443A (en) Information processing unit
JP2004206631A (en) Retrieval tuning method and information retrieval system