JPH0738165B2 - Database management method - Google Patents

Database management method

Info

Publication number
JPH0738165B2
JPH0738165B2 JP60137052A JP13705285A JPH0738165B2 JP H0738165 B2 JPH0738165 B2 JP H0738165B2 JP 60137052 A JP60137052 A JP 60137052A JP 13705285 A JP13705285 A JP 13705285A JP H0738165 B2 JPH0738165 B2 JP H0738165B2
Authority
JP
Japan
Prior art keywords
database
buffer
relay
page
lru
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 - Lifetime
Application number
JP60137052A
Other languages
Japanese (ja)
Other versions
JPS61296426A (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.)
Hitachi Ltd
Original Assignee
Hitachi 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 Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP60137052A priority Critical patent/JPH0738165B2/en
Publication of JPS61296426A publication Critical patent/JPS61296426A/en
Publication of JPH0738165B2 publication Critical patent/JPH0738165B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

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

Description

【発明の詳細な説明】 〔発明の利用分野〕 本発明は、データベース処理装置、なかんずくデータベ
ース管理機構に関し、特にリレーシヨナルデータベース
に適した、問合せの処理と、問合せ処理手順に基づくバ
ツフアの管理に関する。
Description: BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a database processing device and, in particular, a database management mechanism, and more particularly to query processing and buffer management based on a query processing procedure, which are suitable for relay regional databases.

〔発明の背景〕[Background of the Invention]

データベース管理システム(以下DBMSと略記)、特にリ
レーシヨナルDBMSは、非手続的な言語で表現された外部
からの問合せを処理して、内部処理手順を決定し、実行
する。従来の問合せ処理の主な方法には、固定的で、し
かも、データベース等に関する統計情報を考慮しない、
純論理的な観点に立つルールに基づいて、直接に単一の
内部処理手順を決定するもの(例えば、Smith,J.M.及び
Chang,P.Y.T.“Optimizing the Performance of a Rela
tional Database Interface"C.ACM Vol.18,No.10,Oct.1
975,pp.568〜579)と、各種統計情報を用いて選定され
た複数の候補処理手順から、コスト評価により、最適と
思われるものを決定するもの(例えば、Selinger,P.G.e
t al.“Access Path Selection in a Relational Datab
ase Management System"Proc.ACM−SIGMOD,1979,pp.23
〜34)とがある。しかし、前者は、処理手順作成のため
の負荷は小さいけれども、一律的に設定されたルールの
妥当性に問題があり、後者は、最適な処理手順を与える
可能性は大きいが、各種統計情報の管理と、複数の候補
手順の作成及びそれらのコスト評価のための負荷が大き
い。
A database management system (hereinafter abbreviated as DBMS), particularly a relay DBMS, processes an external query expressed in a nonprocedural language to determine and execute an internal processing procedure. The main method of conventional query processing is fixed, and statistical information about the database is not considered.
Directly determining a single internal processing procedure based on rules from a purely logical point of view (eg Smith, JM and
Chang, PYT “Optimizing the Performance of a Rela
tional Database Interface "C.ACM Vol.18, No.10, Oct.1
975, pp.568 to 579) and a plurality of candidate processing procedures selected using various statistical information, a method that determines the most suitable one by cost evaluation (for example, Selinger, PGe
t al. “Access Path Selection in a Relational Datab
ase Management System "Proc.ACM-SIGMOD, 1979, pp.23
~ 34). However, the former has a problem in the validity of the rules that are uniformly set, although the load for creating the processing procedure is small, and the latter has a high possibility of giving the optimal processing procedure. There is a heavy load on management and the creation of multiple candidate procedures and their cost evaluation.

また、多くのDBMSにおいて、アクセスコストの低減のた
め、外部記憶装置に格納されたデータベースの部分的な
写しを保持するバツフア(データベースバツフア)を、
主記憶装置内に用意することが行なわれている。処理対
象としてデータベースバツフアーに一旦取出されたデー
タを、当面の処理が終つた後も残しておけば、再度その
データが必要になつたときに、高価なアクセスコストを
伴う外部記憶装置へのアクセスを省略できるから、シス
テム性能が向上する。しかし、データベースバツフアの
容量には限りがあるから、その内容の入替え(リプレー
ス)が必要となり、その巧拙は、システムの性能を左右
する。したがつて、リプレースに際してどのようなデー
タを残すべきかを決めるための、選定基準が重要であ
る。
Also, in many DBMSs, in order to reduce access costs, a buffer (database buffer) that holds a partial copy of the database stored in the external storage device is used.
It is prepared in the main memory. If the data once fetched to the database buffer as the processing target is left even after the immediate processing is finished, when the data is needed again, the access to the external storage device with the expensive access cost is required. Since the can be omitted, system performance is improved. However, since the capacity of the database buffer is limited, it is necessary to replace (replace) the contents, and the skill of the system affects the performance of the system. Therefore, selection criteria are important for deciding what kind of data should be retained during replacement.

可能な選定基準の一つは、一般のバツフア記憶装置にお
いて周知の、LRU(Least Recently Used)アルゴリズム
である。このアルゴリズムは、最後のアクセスから現在
までの期間が長いデータほど、再びアクセスされる可能
性が小さいという仮定に、その基礎を置く。しかし、デ
ータベース処理においては、データベースデータに逐次
的にアクセスする型の処理と、ランダムにアクセスする
型の処理とが混在し、その場合には、前記の仮定はしば
しば破られる。したがつて、データベースバツフアにお
いては、単純なLRUアルゴリズムにのみ依存するのは得
策でない。この問題の解決を目指す従来技術に、ヒツト
率に応じてバツフアサイズを管理するものがあるが、未
だ充分なものとはいえない(特開昭59−5483号公報,G.
M.Sacco et al.“A Mechanism for Managing the Buffe
r Pool in a Relational Database System Using the H
ot Set Model"Proceedings of the 8th International
Conference on Very Large Database,1982)。
One of the possible selection criteria is the LRU (Least Recently Used) algorithm, which is well known in general buffer storage. This algorithm is based on the assumption that data with a longer time since last access is less likely to be accessed again. However, in database processing, there is a mixture of processing of sequentially accessing database data and processing of randomly accessing database data, in which case the above assumption is often violated. Therefore, in database buffers it is not advisable to rely solely on simple LRU algorithms. There is a conventional technique aiming at solving this problem, which manages the buffer size according to the hit rate, but it is not sufficient yet (Japanese Patent Laid-Open No. 59-5483, G.
M. Sacco et al. “A Mechanism for Managing the Buffe
r Pool in a Relational Database System Using the H
ot Set Model "Proceedings of the 8th International
Conference on Very Large Database, 1982).

〔発明の目的〕[Object of the Invention]

本発明の目的は、DBMSにおいて、問合せ処理のための内
部処理手順の決定ルールを自動的に改修することによ
り、問合せ処理性能を改善し、更に、個々の内部処理手
順をリプレース制御に反映させることにより、データベ
ースバツフアの効率を改善することにある。
An object of the present invention is to improve the query processing performance by automatically modifying the determination rule of the internal processing procedure for the query processing in the DBMS, and further to reflect the individual internal processing procedures in the replacement control. To improve the efficiency of the database buffer.

〔発明の概要〕[Outline of Invention]

本発明による問合せ処理においては、実行の対象となる
内部処理手順は、単一の内部処理手順を与える第1ルー
ルベースによつて選定され、このルールベースは、デー
タベースシステムの統計情報(システム特性,データベ
ース特性,処理方式特性などについての情報)を、内部
処理手順の選定に利用するものである。これと並行し
て、比較の目的で、別のルールベースにより、いくつか
の内部処理手順が選定される。このルールベースも、デ
ータベースシステムの統計情報を利用するものである
が、ただ、それにより選択される内部処理手順は1個に
限定されない。これら2系統の処理により選択されたす
べての内部処理手順は、例えばコスト評価などの評価を
受けて比較され、そして、その結果に応じて、第1ルー
ルベースが修正される。例えば、最低コストの内部処理
手順を与えるように、ルールの追加又は修正が行なわれ
る。これにより、システムは自己学習的に性能の改善を
継続する。
In the query processing according to the present invention, the internal processing procedure to be executed is selected by the first rule base that gives a single internal processing procedure, and this rule base is used for statistical information (system characteristics, system characteristic, Information about database characteristics, processing method characteristics, etc.) is used to select the internal processing procedure. In parallel with this, some internal processing procedures are selected by another rule base for comparison purposes. This rule base also uses the statistical information of the database system, but the internal processing procedure selected by it is not limited to one. All the internal processing procedures selected by the processing of these two systems are subjected to evaluation such as cost evaluation and compared, and the first rule base is modified according to the result. For example, rules are added or modified to provide the lowest cost internal processing procedure. As a result, the system continues to improve the performance in a self-learning manner.

また、本発明によるバツフア管理においては、問合せ処
理最適化過程において決定された内部処理手順から得ら
れるデータベース参照特性情報(アクセスの型や頻度、
各ページへの予想アクセス回数など)が、バツフア制御
情報として用いられ、リプレースの対象となるバツフア
の選定に際して参照される。例えば、LRUアルゴリズム
の下で、予定アクセス回数に達したページが優先的にリ
プレースされる。これにより、ヒツト率が向上し、バツ
フアの効率が改善される。
Further, in buffer management according to the present invention, database reference characteristic information (access type and frequency, obtained from the internal processing procedure determined in the query processing optimization process,
The expected number of accesses to each page) is used as buffer control information and is referred to when selecting a buffer to be replaced. For example, under the LRU algorithm, pages that have reached the scheduled access count are replaced with priority. This improves the hit rate and the efficiency of the buffer.

〔発明の実施例〕Example of Invention

第1図は、本願の第1発明が適用されたDBMSの一例の概
要を示す。DBMS2は、システム全体の管理・制御に加え
て入出力の管理を行なうシステム制御部3と、問合せを
解析して適切な内部処理手順コードを生成するデータベ
ース論理処理部4と、生成された処理手順コードに従つ
てデータベース7へのアクセスその他を実行するデータ
ベース物理処理部5を含む。問合せの入力とそれに対す
る回答(処理結果)の出力は、入出力部1を介して行な
われる。データベース論理処理部4は、問合せの解析を
行なう問合せ解析部41と、解析結果に所定のルールを適
用して最適処理手順を決定する最適化部42と、決定され
た最適処理手順を実現するための処理コードを作成する
とともに、関連する所要の処理を行なうコード生成・論
理処理実行部43とからなる。
FIG. 1 shows an outline of an example of a DBMS to which the first invention of the present application is applied. The DBMS 2 includes a system control unit 3 that manages input / output in addition to management and control of the entire system, a database logic processing unit 4 that analyzes an inquiry and generates an appropriate internal processing procedure code, and a generated processing procedure. It includes a database physical processing unit 5 for executing the access to the database 7 and the like according to the code. The input of the inquiry and the output of the response (process result) to the inquiry are performed via the input / output unit 1. The database logic processing unit 4 implements the query analysis unit 41 that analyzes the query, the optimization unit 42 that applies a predetermined rule to the analysis result to determine the optimum processing procedure, and the determined optimum processing procedure. And a code generation / logical process execution unit 43 for performing the related required process.

最適化部42で適用されるルールは、データベースシステ
ムに関する各種統計情報(後述するシステム特性,デー
タベース特性,処理方式特性など)を用いて、実行すべ
き単一の処理手順を指定する。例えば、このルールは、
述語選択率,処理対象データサイズ,アクセスパス、及
びアクセスパスデータサイズの値の種々の組合せと、各
組合せと一対一に対応する一群の処理手順情報とからな
るテーブルの形をなし、問合せの解析結果として得られ
る前記諸項目の特定の値の組合せから、対応する処理手
順が決定される。このようなルールの集合をルールベー
スと呼び、その管理は、ルールベース管理部421によつ
て行なわれる。
The rule applied by the optimization unit 42 specifies a single processing procedure to be executed by using various statistical information regarding the database system (system characteristics, database characteristics, processing method characteristics, etc., which will be described later). For example, this rule
Analysis of queries by forming a table consisting of various combinations of predicate selection rate, processing target data size, access path, and access path data size values, and a group of processing procedure information corresponding to each combination one-to-one. From the resulting combination of specific values of the various items, the corresponding processing procedure is determined. A set of such rules is called a rule base, and its management is performed by the rule base management unit 421.

最化部42は、コスト評価最適化部6と接続される。コス
ト評価最適化部6は、最適化部42と並行して、問合せの
主要部について、コスト評価による最適化を行ない、そ
の結果と、最適化部42で作成された処理手順のコストを
比較し、必要に応じて、最適化部42のルールベースを改
修する。第2図に示されるように、コスト評価最適化部
6は、問合せの等価変換や解析を行なう問合せ解析部6
1、解析結果からいくつかの処理手順候補を選定する処
理手順候補生成部62、及び処理手順候補のコスト評価を
外部記憶アクセス回数、CPU使用時間等に関して行なう
コスト評価部63、並びにこれらに必要な情報を供給する
処理方式管理部66、システム特性管理部67、データベー
ス特性管理部68、及びルールベース管理部69を含む。処
理方式管理部66は、利用可能な処理機能(論理処理機
能,ハツシング機能等)に関する情報を管理し、処理手
順候補生成部62に供給する。システム特性管理部67は、
計算機システムの特性(バツフアサイズ、CPUや主記憶
の速度等)に関する情報を管理し、コスト評価部63に供
給する。データベース特性管理部68は、データベース特
性(データベース中の各種データサイズ,データベース
の物理構造,インデクスやリンクなどのアクセスパスの
種類や有無等)に関する情報を管理し、コスト評価部63
に供給する。ルールベース管理部69は、問合せ解析部61
での等価変換と処理手順候補生成部62における処理手順
候補の選定のためのルールベースを管理する。処理手順
候補の選定のためのルールベースは、基本的には前述し
た最適化部42のためのルールベースと同じてあつて、た
だ、選定される処理手順が複数存在しうる点が異なる
(同様なルールベースの例は、特願昭59−173387号(特
開昭61−52′号にも開示されている)。
The optimization unit 42 is connected to the cost evaluation optimization unit 6. The cost evaluation optimizing unit 6 optimizes the main part of the query by cost evaluation in parallel with the optimizing unit 42, and compares the result with the cost of the processing procedure created by the optimizing unit 42. , The rule base of the optimizing unit 42 is modified if necessary. As shown in FIG. 2, the cost evaluation optimization unit 6 includes a query analysis unit 6 that performs equivalent conversion and analysis of queries.
1, a processing procedure candidate generation unit 62 that selects some processing procedure candidates from the analysis result, a cost evaluation unit 63 that performs cost evaluation of the processing procedure candidates with respect to the number of external storage accesses, CPU usage time, and the like, and the necessary It includes a processing method management unit 66 that supplies information, a system characteristic management unit 67, a database characteristic management unit 68, and a rule base management unit 69. The processing method management unit 66 manages information regarding available processing functions (logical processing function, hatching function, etc.) and supplies the information to the processing procedure candidate generation unit 62. The system characteristic management unit 67
Information on the characteristics of the computer system (buffer size, speed of CPU and main memory, etc.) is managed and supplied to the cost evaluation unit 63. The database characteristic management unit 68 manages information about database characteristics (various data sizes in the database, physical structure of the database, type and presence of access paths such as indexes and links), and the cost evaluation unit 63.
Supply to. The rule base management unit 69 is the query analysis unit 61.
Manages a rule base for selecting the processing procedure candidate in the processing procedure candidate generating unit 62 in the equivalent conversion in step (1). The rule base for selecting the processing procedure candidates is basically the same as the rule base for the optimizing unit 42 described above, except that there may be a plurality of processing procedures to be selected (similarly. An example of such a rule base is Japanese Patent Application No. 59-173387 (also disclosed in Japanese Patent Laid-Open No. 61-52 ').

コスト評価部63は、また、最適化部42により決定された
処理手順を、前処理部65を介して受取つて、そのコスト
評価を行なう。前処理部65は、最適化部42からの処理手
順情報に対して、コスト評価部63での処理に適合するよ
うに、コードその他の形式に関する変換を行なう。最適
手順選択部64は、コスト評価部63での評価結果から最小
コストの処理手順を決定する。レポート出力部70は、処
理手順候補生成部62、コスト評価部63、及び最適手順選
択部64の処理を、必要に応じて出力するためのものであ
り、ライン103は、各種管理部66〜69の初期設定のため
のものである。
The cost evaluation unit 63 also receives the processing procedure determined by the optimization unit 42 via the preprocessing unit 65 and evaluates the cost. The pre-processing unit 65 converts the processing procedure information from the optimizing unit 42 regarding codes and other formats so as to be suitable for the processing in the cost evaluation unit 63. The optimum procedure selection unit 64 determines the minimum cost processing procedure from the evaluation result of the cost evaluation unit 63. The report output unit 70 is for outputting the processes of the processing procedure candidate generation unit 62, the cost evaluation unit 63, and the optimum procedure selection unit 64 as needed, and the line 103 is the various management units 66 to 69. It is for initial setting of.

第3図は、前記の各部が本発明に従つて行なう処理のフ
ローチャートである。ユーザからの問合せが、入出力部
1からライン100を通つてDBMSに与えられる(第3図20
0)と、システム制御部3は、その問合せの処理の管理
に必要な情報(問合せ識別コード等)を作成し、以後の
処理の管理を行なう(201)。問合せ解析部41は、シス
テム制御部3から受取つた問合せに対して、構文解析と
意味解析を行ない(202)、その結果を受けた最適化部4
2は、ルールベース管理部421を参照することによつて、
統計情報に基づく最適処理手順を決定する(203)。
FIG. 3 is a flowchart of the processing performed by each of the above-mentioned units according to the present invention. An inquiry from the user is given to the DBMS from the input / output unit 1 through the line 100 (see FIG. 3).
0), the system control unit 3 creates information (inquiry identification code, etc.) necessary for managing the processing of the inquiry, and manages the processing thereafter (201). The query analysis unit 41 performs syntax analysis and semantic analysis on the query received from the system control unit 3 (202), and the optimization unit 4 receiving the result.
2 refers to the rule base management unit 421,
The optimum processing procedure based on the statistical information is determined (203).

他方、同じ問合せは、コスト評価最適化部6にも送ら
れ、問合せ解析部61は、この問合せの主要部(コスト評
価による最適化に必要な部分)に対して、構文解析と意
味解析を施し、かつ、ルールベース管理部69からの等価
変換ルールに基づき、条件式の適当な管理・変形を行な
う(204)。次いで、処理手順候補生成部62は、処理方
式管理部66から適用可能な処理方式の情報を得るととも
に、ルールベース管理部69からの処理手順候補選定ルー
ルを適用して、いくつかの処理手順候補を選定する(20
5)。コスト評価部63は、こうして生成されたいくつか
の処理手順候補のそれぞれについて、システム特性管理
部67からのシステム特性情報と、データベース特性管理
部68からのデータベース特性情報とを用いて、コスト
(外部記憶のアクセス回数、CPU使用時間等)を算出し
(206の)、最適手順選択部64は、これら処理手順候
補のコストを比較して、コストが最小の処理手順を決定
する(207)。
On the other hand, the same query is also sent to the cost evaluation optimization unit 6, and the query analysis unit 61 performs syntax analysis and semantic analysis on the main part of this query (the part required for optimization by cost evaluation). Further, based on the equivalence conversion rule from the rule-based management unit 69, the conditional expression is appropriately managed and transformed (204). Next, the processing procedure candidate generation unit 62 obtains information on applicable processing methods from the processing method management unit 66, applies the processing procedure candidate selection rules from the rule base management unit 69, and applies some processing procedure candidates. Select (20
Five). The cost evaluation unit 63 uses the system characteristic information from the system characteristic management unit 67 and the database characteristic information from the database characteristic management unit 68 to calculate the cost (external The number of storage accesses, the CPU usage time, etc.) are calculated (at 206), and the optimum procedure selection unit 64 compares the costs of these processing procedure candidates to determine the processing procedure with the lowest cost (207).

こうして決定された最小コストを〔A〕とする。The minimum cost thus determined is [A].

その頃、最適化部42で決定(203)された処理手順は、
ライン101を通つて前処理部65に至り、そこで形式変換
を受けてから、コスト評価部63に渡される。コスト評価
部63は、この処理手順についても、前述したのと同様に
してコスト評価を行なう(206の)。これにより算出
されたコストを〔B〕とする。最適手順選択部64は、
〔A〕と〔B〕を比較する(208,209)。
At that time, the processing procedure determined (203) by the optimization unit 42 is
The line 101 reaches the preprocessing unit 65 where it undergoes format conversion and is then passed to the cost evaluation unit 63. The cost evaluation unit 63 also performs cost evaluation for this processing procedure in the same manner as described above (at 206). The cost calculated by this is set to [B]. The optimum procedure selection unit 64 is
[A] and [B] are compared (208, 209).

〔A〕<〔B〕の場合、最適化部42がルールベース管理
部421を参照して決定した処理手順は、最適とはいい難
い。そこで、コスト〔A〕の処理手順を生じるルール
が、ルールベース管理部69から、ライン102を通り、ル
ールベース管理部421に転送されて、このルールの追加
のためのルールベースの修正が行なわれ、また、必要に
応じて、ライン104を経て、ルールベース管理部69が管
理するルールベースの修正も行なわれる(210)。更
に、必要があれば、最適化部42内に保持されている各種
統計情報の加除修正が行なわれる(211)。
In the case of [A] <[B], it is difficult to say that the processing procedure determined by the optimization unit 42 by referring to the rule-based management unit 421 is optimal. Then, the rule that causes the processing procedure of the cost [A] is transferred from the rule base management unit 69 through the line 102 to the rule base management unit 421, and the rule base is corrected to add this rule. Further, if necessary, the rule base managed by the rule base management unit 69 is also corrected via the line 104 (210). Further, if necessary, various statistical information held in the optimizing unit 42 is added / subtracted and corrected (211).

これに対して、〔A〕≧〔B〕の場合、最適化部42によ
り生成された処理手順は最適なものと考えてよいから、
前記の処理(210)は省略し、処理(211)のみが行なわ
れる。
On the other hand, when [A] ≧ [B], the processing procedure generated by the optimizing unit 42 may be considered to be optimal,
The process (210) is omitted, and only the process (211) is performed.

問合せ処理の実行は、本実施例においては、いずれの場
合でも、最適化部42により生成された処理手順に従つ
て、通常の手順(212〜214)により遂行される。この方
法によれば、〔A〕が〔B〕より小さい場合に、最適で
ない処理手順による問合せ処理が実行されるが、ルール
ベースの修正後に最適化を再度行なうのは、多くの場
合、不経済であるから、実用上はこれで支障がない。ル
ールベース修正の効果は、次回以降の問合せ処理におい
て発揮される。しかし、ルールベースの修正後に最適化
を再度行なう方法も、設計条件によつては採用すること
ができる。
In any of the cases, the execution of the inquiry process is performed by the normal procedure (212 to 214) according to the processing procedure generated by the optimizing unit 42. According to this method, when [A] is smaller than [B], the query processing is executed by a non-optimal processing procedure. However, it is often uneconomical to perform optimization again after the rule base is modified. Therefore, this is not a problem for practical use. The effect of the rule base modification is exerted in the subsequent query processing. However, the method of re-optimizing after modifying the rule base can also be adopted depending on the design conditions.

コスト評価最適化処理を付加したことにより、負荷が増
大することは否めない。しかし、処理経歴を積むにつれ
てルールベースの改善が進み、修正の頻度は低下する。
したがつて、適当な時点で、ルールベース修正処理ある
いはコスト評価最適化処理全体を、間欠的に抑止した
り、あるいは永久的に無効にし、更には除去することが
できる。
It cannot be denied that the load increases due to the addition of the cost evaluation optimization process. However, as the processing history increases, the rule base improves, and the frequency of modification decreases.
Therefore, at an appropriate point in time, the entire rule-based modification process or cost evaluation optimization process can be intermittently suppressed or permanently disabled, and even removed.

コスト評価最適化部6は、負荷が過大にならなければ、
最適化部42の内部に埋込んでもよい。
If the load does not become excessive, the cost evaluation optimization unit 6
It may be embedded inside the optimization unit 42.

第4図は、本願の第2発明が適用されるDBMSの一例を示
す。図中、第1図におけると同じ符号は同等の要素を示
す。ただし、最適化部42は、第1図のコスト評価最適化
部6を内蔵するものとする。データベース物理処理部5
は、バツフア制御部51を含む。データベースバツフア8
は、複数のバツフアからなり、実際には主記憶の一部で
ある。データベース7は、リレーシヨナルデータベース
であり、それは、論理上、いくつかのリレーシヨンから
なり、各リレーシヨンは複数のローの集合である。デー
タベース7は、常時は外部記憶装置に格納されており、
アクセス要求があると、該当する部分を含む一定範囲の
データブロック(ページと呼ばれる)が、データベース
バツフア8に連送されて、空きバツフアがあれば、そこ
に格納され、空きバツフアがなければ、後述するアルゴ
リズムに従つて選ばれたバツフアの内容を置換(リプレ
ース)する。アクセス要求のあつたデータを含むページ
がデータベースバツフア8内に存在すれば、それが用い
られ、外部記憶装置へのアクセスは不要となる。
FIG. 4 shows an example of a DBMS to which the second invention of the present application is applied. In the figure, the same reference numerals as those in FIG. 1 indicate the same elements. However, the optimization unit 42 is supposed to incorporate the cost evaluation optimization unit 6 of FIG. Database physical processing unit 5
Includes a buffer control unit 51. Database buffer 8
Consists of multiple buffers and is actually part of the main memory. The database 7 is a relay database, which theoretically consists of several relays, each relay being a collection of rows. The database 7 is always stored in the external storage device,
When an access request is made, a certain range of data blocks (called a page) including the corresponding part are continuously sent to the database buffer 8 and if there is a free buffer, it is stored there. If there is no free buffer, Replaces the contents of the buffer selected according to the algorithm described below. If a page including the data requested for access exists in the database buffer 8, that page is used and access to the external storage device is unnecessary.

最適化部42は、前述のようにして、統計情報を用いて、
問合せの処理のための内部処理手順を決定する。この内
部処理手順は、指定されたリレーシヨンの評価順序、結
合条件評価方法、問合せ条件評価方法などを含み、これ
らに基いて、各リレーシヨンについての参照特性、すな
わち、アクセスの型(ランダムか順序か)、順序、頻
度、時期など、及びこれらから導かれる、各リレーシヨ
ンについてバツフアに保存しておくのが望ましいページ
数(保証ページ数)と予想されるローアクセス回数、更
に、それぞれのページについて予想されるページアクセ
ス回数などを、推定することができる。これらの参照特
性情報は、本発明により、リプレースの制御に利用され
る。
The optimization unit 42 uses the statistical information as described above,
Determine the internal processing procedure for processing the query. This internal processing procedure includes a specified relay evaluation sequence, a join condition evaluation method, a query condition evaluation method, etc., and based on these, a reference characteristic for each relay, that is, an access type (random or order). ,), Order, frequency, timing, etc., and the number of pages (guaranteed pages) that should be stored in the buffer for each relay and the expected number of low accesses, which are derived from these, The expected number of page accesses and the like can be estimated. These pieces of reference characteristic information are used for replacement control according to the present invention.

第5図は、バツフア制御部51が管理するバツフア制御情
報を模式的に示す。バツフアエントリ(以下BEと略記)
300,310,320は、使用されるバツフアのそれぞれに対応
して用意される管理情報群である。バツフア制御ブロツ
ク(以下BCBと略記)330は、使用されるバツフアの全体
についての管理情報群である。リレーシヨン制御ブロツ
ク(以下RCBと略記)340は、処理対象である諸リレーシ
ヨン中のいくつかのものについて、一対一対に対応して
用意される管理情報群である。
FIG. 5 schematically shows buffer control information managed by the buffer control unit 51. Buffer entry (abbreviated as BE below)
The management information groups 300, 310 and 320 are prepared corresponding to the buffers used. A buffer control block (hereinafter abbreviated as BCB) 330 is a management information group regarding the entire buffer to be used. A relay control block (hereinafter abbreviated as RCB) 340 is a management information group prepared in a one-to-one correspondence with respect to some of the relays to be processed.

バツフアのリプレースは、基本的にはLRUアルゴリズム
によつて制御される。このLRU制御のために、BE300〜32
0は、BCB330を含むLRUチエインに組込まれる。すなわ
ち、BCB330のLRU先頭ポインタ331は、最も新しいアクセ
スのあつたバツフアに対応するBEをポイントする。これ
はBE300であるとする。BE300のLRU前方ポインタ301は、
次に新しいアクセスのあつたバツフアに対応するBEをポ
イントし、以下同様にして、図示の例では、BE300、31
0、320が、この順でLRU前方チエインを形成している。
これとは逆に、BCB330のLRU末尾ポインタ332は、最も古
いアクセスのあつたバツフアに対応するBEをポイント
し、これは、図示の例ではBE320である。BE320のLRU後
方ポインタ322は、次に古いアクセスのあつたバツフア
に対応するBEをポイントし、かくして、BE320,310,300
が、この順でLRU後方チエインを形成している。
The replacement of the buffer is basically controlled by the LRU algorithm. BE300-32 for this LRU control
0 is incorporated into the LRU chain including BCB330. That is, the LRU head pointer 331 of the BCB 330 points to the BE corresponding to the newest access buffer. This is BE300. BE300 LRU forward pointer 301
Next, point to the BE that corresponds to the new access buffer, and so on.
0 and 320 form the LRU front chain in this order.
Conversely, the LRU tail pointer 332 of BCB 330 points to the BE corresponding to the oldest accessed buffer, which is BE 320 in the illustrated example. BE320's LRU backward pointer 322 points to the BE corresponding to the next oldest access buffer, thus BE320,310,300
However, they form the LRU rear chain in this order.

前記のLRUチエインに重ねて、RCB340が割当てられた各
リレーシヨンについては、そのリレーシヨンのページを
保持するバツフアに対応するBEが、それぞれのリレーシ
ヨンLRUチエインに組込まれる。すなわち、RCB340のリ
レーシヨンLRU先頭ポインタ341は、そのリレーシヨンの
ページを保持するバツフアの中で、最も新しいアクセス
があつたものに対応するBEをポイントし、これをBE310
とすれば、そのリレーシヨンLRU前方ポインタ313は、次
に新しいアクセスのあつたバツフアに対応するBEをポイ
ントし、これは、図示の例ではBE320である。RCB340の
リレーシヨンLRU末尾ポインタ342と、BE320,310のリレ
ーシヨンLRU後方ポイタ324,314は、BCB330のLRU末尾ポ
インタ332に始まるLRU後方チエインと同様にして、リレ
ーシヨンLRU後方チエインを形成する。図示の例では、B
E300のリレーシヨンLRU前方ポインタ303と、リレーシヨ
ンLRU後方ポインタ304は使用されていない。RCB340は、
比較的短期間に順次アクセスが行なわれるリレーシヨン
に割当てられる。例えば、リレーシヨンAとBを対象と
するjoin(結合)演算において、リレーシヨンAの各ロ
ーごとにリレーシヨンBの全ローが順次アクセスされる
とすれば、リレーシヨンBにRCB340が割当てられる。
For each relay to which the RCB 340 is assigned, overlapping the above LRU chain, the BE corresponding to the buffer holding the page of that relay is incorporated into each relay LRU chain. That is, the relay LRU head pointer 341 of the RCB 340 points to the BE corresponding to the one having the newest access in the buffer holding the page of the relay, and sets this to BE310.
The relay LRU forward pointer 313 then points to the BE corresponding to the next new access buffer, which is BE 320 in the illustrated example. The relay LRU tail pointer 342 of the RCB 340 and the relay LRU rear pointers 324, 314 of the BE 320, 310 form a relay LRU back chain similar to the LRU back chain starting at the LRU end pointer 332 of the BCB 330. In the example shown, B
The relay LRU forward pointer 303 and the relay LRU backward pointer 304 of the E300 are not used. RCB340 is
It is assigned to relays that are accessed sequentially in a relatively short period of time. For example, in a join operation for relays A and B, if all rows of relay B are sequentially accessed for each row of relay A, RCB 340 is assigned to relay B.

BE300,310,320のバツフアポインタ305,315,325は、対応
する各バツフアをポイントする。ページアクセスカウン
タ306,316,326は、対応するバツフアに保持されている
ページについて予想されるページアクセス回数(ページ
全体としてのアクセスの回数)を示す。この値は、“0"
又は正の整数をとることができ、処理対象となるページ
のそれぞれについて、初期設定処理により適当な制御ブ
ロツク中に設定されて、そのページと同時に入替えら
れ、“0"になるまでは、そのページがバツフアから掃出
されるたびに“1"が減じられる。この値が正のページ
は、後刻再びアクセスされるはずなので、なるべくバツ
フアに残しておくことが望ましい。BCB330の空バツフア
ポインタ333は、空いているバツフアの一つをポイント
する。エントリバツフア数334は、LRUチエインに組込ま
れたバツフア(すなわち、使用中の全バツフア)の数を
示す。
The buffer pointers 305, 315, 325 of the BE 300, 310, 320 point to the corresponding buffers. The page access counters 306, 316, 326 indicate the expected page access times (the access times for the entire page) for the pages held in the corresponding buffers. This value is "0"
Alternatively, it can be a positive integer. For each page to be processed, it is set in an appropriate control block by the initialization process and is replaced at the same time as that page until it becomes "0". "1" is decremented each time is swept from the buffer. It is desirable to keep pages with positive values in the buffer as much as possible because they will be accessed again later. The empty buffer pointer 333 of the BCB 330 points to one of the empty buffers. The entry buffer number 334 indicates the number of buffers (that is, all buffers in use) incorporated in the LRU chain.

RCB340のエントリバツフア数343は、そのRCBが管理する
リレーシヨンLRUチエインに組込まれたバツフアの数を
示す。保証ページ数344は、バツフアに保存しておくの
が望ましい対応リレーシヨンの数を保持する。リレーシ
ヨンLRUチエインに含まれるページの数を少なくとも保
証ページ数に等しく保つことにより、いわゆるスラツシ
ング現象(データ要求のたびに外部記憶装置へのアクセ
スを生じる現象)を防止できる。ローアクセスカウンタ
345は、対応リレーシヨンのローの予想されるアクセス
回数を示し、そのリレーシヨンのいずれかのページのロ
ーにアクセスがあるたびに“1"が減じられる。この値が
“0"になれば、そのRCBが管理するリレーシヨンLRUチエ
インは、維持する必要がなく、したがつて、解放され、
この解放により、一部のリレーシヨンによるバツフア群
の占拠が防止される。
The RCB 340 entry buffer number 343 indicates the number of buffers incorporated in the relay LRU chain managed by the RCB. The guaranteed page count 344 holds the number of supported relays that it is desirable to store in the buffer. By keeping the number of pages included in the relay LRU chain at least equal to the guaranteed number of pages, it is possible to prevent a so-called slurring phenomenon (a phenomenon in which an external storage device is accessed each time a data request is made). Low access counter
345 indicates the expected number of accesses of the row of the corresponding relay, and "1" is decremented each time the row of any page of the relay is accessed. If this value reaches “0”, the relay LRU chain managed by that RCB does not need to be maintained and is therefore released.
This release prevents the occupation of the Bahua group by some relays.

これらの他に、図示されていないが、各バツフアに保持
されているデータがデータベースのどのページであるか
を示すデイレクトリが、通常のバツフアメモリにおける
のと同様に、バツフア制御部51中に用意される。
In addition to these, a directory (not shown) indicating which page of the database the data held in each buffer is is provided in the buffer control unit 51 as in the normal buffer memory. .

第6図a〜eは、データ読出(FETCH−DATA)動作に際
して、バツフア制御部51により行なわれるバツフアの制
御の手順の一例を示す。第6図aは、FETCH−DATA制御4
00の全体を示す。まず、要求されたページがバツフアに
存在するか否かが、デイレクトリを参照して調べられる
(401)。所要ページがバツフアに存在すれば、それへ
のアクセスが行なわれることになる。したがつて、その
バツフアがリレーシヨンLRUチエインのどれかに含まれ
るか否かが調べられて(402)、含まれていれば、対応
するBEはそのリレーシヨンLRUチエインの先頭に置か
れ、チエインが更新される(403)。しかし、所要ペー
ジを保持するバツフアが発見されなければ、バツフア獲
得(GET−BUFFER)処理410により、バツフアが獲得され
て、そこに、所要ページが外部記憶装置から転送され
る。この処理については、後で詳述する。
6A to 6E show an example of a buffer control procedure performed by the buffer control unit 51 in the data read (FETCH-DATA) operation. Fig. 6a shows FETCH-DATA control 4
Shows the entire 00. First, the directory is checked (401) to see if the requested page exists in the buffer. If the required page exists in the buffer, it will be accessed. Therefore, it is checked whether the buffer is included in any of the relay LRU chains (402), and if it is included, the corresponding BE is placed at the head of the relay LRU chain and the chain is connected. Is updated (403). However, if the buffer holding the required page is not found, the buffer acquisition (GET-BUFFER) processing 410 acquires the buffer and transfers the required page to the buffer from the external storage device. This processing will be described later in detail.

このようにして今回のアクセスの対象とされたバツフア
は、再度、リレーシヨンLRUチエインのどれかに含まれ
るか否かが調べられて(404)、含まれていれば、対応
するRCBのローアクセスカウンタは“1"を減じられ(40
5)、次いで、その結果のローアクセスカウンタが“0"
以下であるか否かが調べられる(406)。これが“0"以
下であれば、そのRCBの管理するリレーシヨンLRUチエイ
ンに含まれる各BEのページアクセスカウンタが“0"に設
定され、そして、そのリレーシヨンLRUポインタをすべ
てリセツトすることにより、そのリレーシヨンLRUチエ
インは解放される(407)。最後に、所要ページを保持
するバツフアに対応するBEがLRUチエインの先頭に置か
れ、チエインが更新される(408)。しかし、処理404に
おいて、問題のバツフアがどのリレーシヨンLRUチエイ
ンにも含まれないことが判明すれば、直ちに処理408に
移る。
In this way, it is checked again whether the buffer targeted for this access is included in any of the relay LRU chains (404), and if it is included, the corresponding RCB low access is made. The counter is decremented by "1" (40
5), then the resulting low access counter is "0"
It is checked (406) whether or not: If this is less than or equal to "0", the page access counter of each BE included in the relay LRU chain managed by that RCB is set to "0", and all of the relay LRU pointers are reset to reset the page access counter. The relay LRU chain is released (407). Finally, the BE corresponding to the buffer holding the required page is placed at the beginning of the LRU chain, and the chain is updated (408). However, if the process 404 finds that the buffer in question is not included in any of the relay LRU chains, the process immediately moves to the process 408.

GET−BUFFER処理410の詳細は、第6図bに示される。こ
の処理において、まず、空きバツフアの有無が調べられ
(411)、空きバツフアがあれば、その一つが新来ペー
ジに割当てられる(415)。しかし、空きバツフアがな
ければ、リプレースの対象となるバツフアが、本発明に
従つて、次のようにして選択される。まず、各RCBのエ
ントリバツフア数343と保証ページ数344が比較される
(412)。すべてのRCBのエントリバツフア数が保証ペー
ジ数に等しいかそれより小さい場合、LRUチエインにお
いて、ページアクセスカウンタが“0"であるBEがあれ
ば、それらの内でチエインの末尾に最も近いものが選択
され、ページアクセスカウンタが“0"のBEがなければ、
チエインの末尾のものが選択される(413)。他方、あ
るRCBのエントリバツフア数が保証ページよりも大きい
場合には、そのRCBが管理するリレーシヨンLRUチエイン
において、ページアクセスカウンタが“0"のBEがあれ
ば、それらの内でチエインの末尾に最も近いものが選択
され、ページアクセスカウンタが“0"のBEがなければ、
チエインの末尾のものが選択される(414)。処理413及
び414の後には、それぞれページ出力(PAGE−OUT)処理
420が続き、これらと処理415の後にページ入力(PAGE−
IN)処理430が行なわれて、GET−BUFFER処理410が終
る。
Details of the GET-BUFFER process 410 are shown in Figure 6b. In this process, first, it is checked whether there is a free buffer (411), and if there is a free buffer, one of them is assigned to the new page (415). However, if there is no free buffer, the buffer to be replaced is selected according to the present invention as follows. First, the number of entry buffers 343 and the number of guaranteed pages 344 of each RCB are compared (412). If the number of entry buffers in all RCBs is less than or equal to the guaranteed number of pages, in the LRU chain, if there is a BE with a page access counter of “0”, then the BE that is closest to the end of the chain If there is no BE selected and the page access counter is "0",
The last one in the chain is selected (413). On the other hand, when the number of entry buffers of a certain RCB is larger than the guaranteed page, if there is a BE with a page access counter of “0” in the relay LRU chain managed by that RCB, the end of the chain is among them. Is selected, and if there is no BE with a page access counter of "0",
The last one in the chain is selected (414). After processing 413 and 414, page output (PAGE-OUT) processing, respectively
420 continues, and after these and processing 415, page input (PAGE−
IN) processing 430 is performed, and GET-BUFFER processing 410 ends.

PAGE−OUT処理420の詳細は、第6図cに示される。ま
ず、リプレースのために選択されたバツフアがリレーシ
ヨンLRUチエインのどれかに含まれるか否かが調べられ
(421)、含まれていなければ、直ちにそのバツフアに
保持されていたページが外部記憶装置に出力される(42
4)。しかし、問題のバツフアがリレーシヨンLRUチエイ
ンのどれかに含まれていれば、そのバツフアに対応する
BEのページアクセスカウンタが0よりも大きいか否かが
調べられ(422)、0よりも大きくなければそのまま、
また、0よりも大きければ“1"が減じられた(423)後
に、ページ出力処理424が行なわれる。この時、ページ
アクセスカウンタの値は、対応する制御ブロツクに移さ
れる。
Details of the PAGE-OUT process 420 are shown in Figure 6c. First, it is checked whether the buffer selected for replacement is included in any of the relay LRU chains (421), and if not included, the page held in the buffer is immediately stored in the external storage device. Is output to (42
Four). However, if the problematic buffer is included in any of the relay LRU chains, it will be dealt with.
It is checked whether the page access counter of BE is greater than 0 (422), and if it is not greater than 0, it is as it is.
If it is greater than 0, "1" is subtracted (423), and then the page output process 424 is performed. At this time, the value of the page access counter is transferred to the corresponding control block.

PAGE−IN処理430は、第6図dに示される。まず、所要
ページが外部記憶装置から選択されたバツフアに転送さ
れ、その間、そのページのページアクセスカウンタ値が
対応制御ブロツクから移される(431)。次いで、この
新来ページが属するリレーシヨンはRCBのどれかの管理
を受けるべきものか否かが調べられ(432)、管理を受
けるべきものでなければ、そのままPAGE−IN処理を終
り、管理を受けるべきものであれば、そのページを受け
たバツフアに対応するBEは、該当するリレーシヨンLRU
チエインの先頭に置かれ、チエインが更新される(43
3)。
The PAGE-IN process 430 is shown in Figure 6d. First, the required page is transferred from the external storage device to the selected buffer, during which the page access counter value of the page is transferred from the corresponding control block (431). Next, it is checked whether the relay to which this new page belongs should be managed by any of the RCBs (432), and if it is not, it ends the PAGE-IN processing and manages it. If it is something that should be received, the BE corresponding to the buffer that received the page is the corresponding relay LRU.
Placed at the beginning of the chain, the chain is updated (43
3).

第6図eは、バツフア初期化(INIT)処理440を示す。B
CB・BE初期化処理441においては、BCB、BE及び他の制御
ブロツクの割当てとそれらの内容の初期化が行なわれ
る。RCB処理化処理442においては、RCBの割当てとそれ
らの内容の初期化が行なわれ、最適化部42により決定さ
れた内部処理手順から得られるデータベース参照特性に
基づいて、保証ページ数344とローアクセスカウンタ345
が設定され、また、各処理対象ページに対応して、それ
ぞれのページアクセスカウンタ値が、適当な制御ブロツ
ク中に設定される。本実施例では、リレーシヨンLRUチ
エインを形成しないリレーシヨンのページアクセスカウ
ンタの初期設定値は、“0"である。
FIG. 6e shows a buffer initialization (INIT) process 440. B
In the CB / BE initialization processing 441, BCB, BE, and other control blocks are allocated and their contents are initialized. In the RCB processing processing 442, allocation of RCBs and initialization of their contents are performed, and based on the database reference characteristics obtained from the internal processing procedure determined by the optimization unit 42, the guaranteed page number 344 and low access Counter 345
Is set, and the page access counter value for each page to be processed is set in an appropriate control block. In this embodiment, the initial setting value of the page access counter of the relays that do not form the relay LRU chain is "0".

次に、具体的な問合せの例を用いて、総合的な説明を行
なう。第7図に示される2組のリレーシヨン“リゾー
ト”及び“レジヤー”がデータベース中に用意されてお
り、前者はページR11とR12に収容され、後者はページR2
1とR22に収容されているとする。このデータベースか
ら、 「ゴルフができて、交通費が3千円以上5千円以下であ
り、かつ、海の幸を名物とする観光地の、名前とその所
在県名」 を入手することが望まれる。この要求は、次の問合せ文
により表現される。
Next, a comprehensive description will be given by using a specific inquiry example. Two sets of relays "Resort" and "Register" shown in Fig. 7 are prepared in the database. The former is accommodated on pages R11 and R12 and the latter is page R2.
It is supposed to be housed in 1 and R22. From this database, it is desirable to obtain "the name of the tourist spot where you can play golf, the transportation cost is 3,000 yen or more and 5,000 yen or less, and the seafood is a specialty and its prefecture name". Be done. This request is expressed by the following query statement.

Select リゾート.名前,リゾート.県名 from リゾート,レジヤー where レジヤー.名前=‘ゴルフ’ and (リゾート.運賃>=3 and リゾート.運賃<=5) and リゾート.名物=‘海の幸’ and リゾート.名前=レジヤー.リゾート名 この問合せに対して、DBMS2の最適化部42により決定さ
れた処理手順は、概略次のようなものであるとする。
Select Resort. Name, resort. Prefecture name from resort, cashier where cashier. Name = 'Golf' and (Resort.Fare> = 3 and Resort.Fare <= 5) and Resort. Specialty = 'seafood' and resort. Name = cashier. Resort name In response to this inquiry, the processing procedure determined by the optimizing unit 42 of the DBMS 2 is roughly as follows.

1) リレーシヨン“リゾート”から、カラム“運賃”
の値が“3"以上“5"以下で、かつ、カラム“名物”の内
容が‘海の幸’であるローを一つ索出する。
1) From the relay "resort" to the column "fare"
Find one row with a value of "3" or more and "5" or less and the content of the column "specialty" is "seafood".

2) リレーシヨン“レジヤー”を走査して、前記1)
で索出されたリレーシヨン“リゾート”のローのカラム
“名前”の内容と同一内容をカラム“リゾート名”に持
つリレーシヨン“レジヤー”のローの索出する。
2) Scan the relay "Register" and select 1) above.
The row of the relay “Register” that has the same content as the column “Name” of the row of the relay “Resort” retrieved in step 4 is retrieved.

3) 前記2)で索出されたリレーシヨン“レジヤー”
のローのカラム“名前”が‘ゴルフ’であれば、前記
1)で索出されたリレーシヨン“リゾート”のローを保
存し、そうでなければ捨てる。
3) The relay “Register” found in 2) above.
If the row's column "name"is'golf', save the relay "resort" row found in 1) above, otherwise discard it.

4) 前記1)〜3)を、リレーシヨン“リゾートのロ
ーが尽るまで繰返す。
4) The above 1) to 3) are repeated until the relay “resort low” runs out.

5) 前記3)で保存されたローのカラム“名前”と
“県名”を抽出する。
5) Extract the column “name” and “prefecture name” of the row stored in 3) above.

このような処理手順に基づいて、ページアクセスの対象
はR11、R12、R21、及びR22であり、使用されるバツフア
面数は“3"で、リレーシヨン“レジヤー”にリレーシヨ
ンLRUチエインの形成のためにRCB340が割当てられ、そ
の保証ページ数は“2"で、ローアクセスカウンタ値は
“6"であり、そして、ページアクセスカウンタ値は、リ
レーシヨン“レジヤー”については“4"で、同“リゾー
ト”については“0"であることが、それぞれ決定された
とする。
Based on such a processing procedure, the page access targets are R11, R12, R21, and R22, the number of buffer surfaces used is "3", and the formation of the relay LRU chain in the relay "regulator" is performed. RCB340 is allocated for this purpose, the guaranteed page number is “2”, the row access counter value is “6”, and the page access counter value is “4” for the relay “Register” and the same. It is assumed that it has been decided that the "resort" is "0".

この問合せの処理のために、ページアクセスがR11,R12,
R21,R12の順で行なわれる場合について、バツフア制御
部51により実行されるバツフア制御の順序を、第5図及
び第6図を参照しつつ説明する。
Due to the processing of this query, page access is R11, R12,
The order of the buffer control executed by the buffer control unit 51 in the case of performing R21 and R12 in this order will be described with reference to FIGS. 5 and 6.

ステツプ0: バツフア初期化処理440により、BCB330、BE300,310,320
などの制御ブロツクの割当てと初期化が行なわれ(44
1)、次いで、RCB340がリレーシヨン“レジヤーに割当
てられて、その保証ページ数344とローアクセスカウン
タ345がそれぞれ“2"と“6"に設定され、かつ、リレー
シヨン“レジヤー”の各ページR21,R22に対応する制御
ブロツクに、ページアクセスカウンタ値“4"が設定され
る(442)。リレーシヨン“リゾート”の各ページR11,R
12に対応する制御ブロツクには、いずれも“0"が設定さ
れる。
Step 0: BCB330, BE300,310,320 by buffer initialization processing 440
Allocate and initialize control blocks such as (44
1) Then, the RCB 340 is assigned to the relay “registerer”, the guaranteed page number 344 and the low access counter 345 are set to “2” and “6”, respectively, and each page of the relay “registerer” R21. Page access counter value "4" is set in the control block corresponding to R22, R22 (442). Each page of relay "Resort" R11, R
The control blocks corresponding to 12 are all set to "0".

あステツプ1: まず、R11へのアクセスが要求されると、FETCH−DATA処
理400(第6図a)が起動される。まず、R11を保持する
バツフアの有無が調べられ(401)、存在しないので、G
ET−BUFFER処理410(第6図b)が起動される。そこ
で、空きバツフアが存在するか否かが調べられ(41
1)、それは存在することが判明し、空きバツフアが1
面獲得される(415)。これはBE300に対応するバツフア
であるとする。
Step 1: First, when access to R11 is requested, the FETCH-DATA processing 400 (Fig. 6a) is started. First, the presence or absence of a buffer holding R11 was checked (401), and since it does not exist, G
The ET-BUFFER process 410 (Fig. 6b) is activated. Therefore, it is checked whether or not there is a free buffer (41
1), it turns out to exist and there is 1 free buffer
The face is won (415). This is a buffer corresponding to BE300.

そこで、PAGE−IN処理430(第6図d)が起動され、要
求されたページR11が外部記憶装置から前記の獲得され
た(BE300に対応する)バツフアに転送されるととも
に、対応するページカウンタ値“0"がページカウンタ30
6に設定される(431)。次に、それがリレーシヨンLRU
チエインを形成すべきページか否か、すなわち、リレー
シヨン“レジヤー”のページか否かが調べられ(43
2)、そうではないので、PAGE−IN処理430は終了し、そ
れによりGET−BUFFER処理410が終了する。第6図aに戻
り、BE300がRCB340の管理するリレーシヨンLRUチエイン
に含まれているか否かが調べられ(404)、含まれてい
ないので、直ちに、BE300をLRUチエインの先頭に置く処
理408が行なわれる。
Then, the PAGE-IN process 430 (FIG. 6d) is activated, and the requested page R11 is transferred from the external storage device to the acquired buffer (corresponding to BE300) and the corresponding page counter value is also transferred. “0” is the page counter 30
Set to 6 (431). Then it's relay LRU
It is checked whether or not the page is to form a chain, that is, whether or not the page is a relay “registry” (43
2), otherwise, the PAGE-IN process 430 ends, which ends the GET-BUFFER process 410. Returning to FIG. 6a, it is checked whether or not the BE300 is included in the relay LRU chain controlled by the RCB340 (404), and since it is not included, the process 408 of immediately placing the BE300 at the head of the LRU chain is performed. Done.

この時点において、BCB330のLRU先頭ポインタ331とLRU
末尾ポインタ332は共にBE300をポイントし、エントリバ
ツフア数334は“1"であり、BE300のページアクセスカウ
ンタ306は“0"である。RCB340の内容には変更なく、リ
レーシヨンLRUチエインは形成されていない。
At this point, the LRU start pointer 331 and LRU of BCB330
The tail pointers 332 both point to the BE 300, the entry buffer number 334 is “1”, and the page access counter 306 of the BE 300 is “0”. There is no change in the contents of RCB340, and the relay LRU chain has not been formed.

ステツプ2: 次に、R21へのアクセスが要求されると、FETCH−DATA処
理400が起動される。R21を保持するバツフアは存在しな
いので(401)、GET−BUFFER処理410が起動される。空
きバツフアが存在するので(411)、空きバツフアが1
面獲得される(415)。これはBE320に対応するバツフア
であるとする。
Step 2: Next, when access to R21 is requested, the FETCH-DATA processing 400 is started. Since there is no buffer holding R21 (401), the GET-BUFFER process 410 is activated. Since there is a free buffer (411), the free buffer is 1
The face is won (415). It is assumed that this is a buffer corresponding to BE320.

そこで、PAGE−IN処理430が呼ばれ、R21はBE320に対応
するバツフアに格納されるとともに、対応するページア
クセスカウンタ値“4"がページアクセスカウンタ326に
設定される(431)。R21は、リレーシヨン“レジヤー”
に属し、リレーシヨンLRUを形成すべきページである(4
32)。したがつて、BE320はRCB340の管理するリレーシ
ヨンLRUチエインの先頭に置かれる(433)。第6図aに
戻り、BE320はリレーシヨンLRUチエインに含まれている
ので(404)、ローアクセスカウンタ345は“1"を減じら
れ(405)、その結果、ローアクセスカウンタ345の値は
“5"となり、“0"より大である(406)。したがつて、
直ちにLRUチエインが更新され、BE320はその先頭に置か
れる(408)。
Therefore, the PAGE-IN process 430 is called, R21 is stored in the buffer corresponding to BE320, and the corresponding page access counter value "4" is set in the page access counter 326 (431). R21 is a relay "Register"
Is a page that belongs to and should form a relay LRU (4
32). Therefore, BE320 is placed at the head of relay LRU chain controlled by RCB340 (433). Returning to FIG. 6A, since the BE 320 is included in the relay LRU chain (404), the low access counter 345 is decremented by “1” (405), and as a result, the value of the low access counter 345 becomes “5”. ", Which is greater than" 0 "(406). Therefore,
Immediately the LRU chain is updated and BE320 is placed in front of it (408).

この時点において、BCB330のLRU先頭ポインタ331に始ま
るLRU前方チエイン〔→BE320→BE300〕と、LRU末尾ポイ
ンタ332に始まるLRU後方チエイン〔→BE300→BE320〕と
が形成されている。エントリバツフア数334は“2"であ
り、ページアクセスカウンタ306は“0"で、同326は“4"
である。また、RCB340のリレーシヨンLRU先頭ポインタ3
41と同末尾ポインタ342は共にBE320をポイントし、エン
トリバツフア数343は“1"で、ローアクセスカウンタ345
は“5"である。
At this point, the LRU front chain [→ BE320 → BE300] starting at the LRU head pointer 331 and the LRU rear chain [→ BE300 → BE320] starting at the LRU end pointer 332 of the BCB330 are formed. The number of entry buffers 334 is “2”, the page access counter 306 is “0”, and the same 326 is “4”.
Is. Also, RCB340 relay LRU head pointer 3
41 and the same end pointer 342 both point to BE320, the entry buffer number 343 is "1", and the low access counter 345
Is "5".

ステツプ3: 次に、R22へのアクセスが要求されると、ステツプ3と
同じ順序を経て、処理415においてBE310に対応するバツ
フアが獲得され、処理431においてそのバツフアにR22が
格納され、処理433においてBE310がリレーシヨンLRUチ
エインの先頭に置かれ、処理405でローアクセスカウン
タ345から“1"が減じられ、そして、処理408においてBE
310がLRUチエインの先頭に置かれる。
Step 3: Next, when access to R22 is requested, the buffer corresponding to BE310 is obtained in process 415 in the same order as in step 3, R22 is stored in the buffer in process 431, and the buffer is stored in process 433. BE310 is placed at the head of the relay LRU chain, operation 405 decrements the low access counter 345 by “1”, and operation 408 BE.
310 is placed at the beginning of the LRU chain.

この時点において、BCB330のLRU先頭ポインタ331に始ま
るLRU前方チエイン〔→BE310→BE320→BE300〕と、LRU
末尾ポイタ332に始まるLRU後方チエイン〔→BE300→BE3
20→BE310〕とが形成されている。エントリバツフア数3
34は“3"であり、ページアクセスカウンタ306は“0"、
同316及び326は共に“4"である。他方、RCB340において
は、リレーシヨンLRU先頭ポインタ341に始まるリレーシ
ヨンLRU前方チエイン〔→BE310→BE320〕と、リレーシ
ヨンLRU末尾ポインタ342に始まるリレーシヨンLRU後方
チエイン〔→BE320→BE310〕とが形成されている。エン
トリバツフア数343は“2"で、ローアクセスカウンタ345
は“4"である。
At this point, the LRU forward chain starting from the LRU head pointer 331 of the BCB330 [→ BE310 → BE320 → BE300] and the LRU
LRU rear chain starting at the end Poita 332 [→ BE300 → BE3
20 → BE310] is formed. Number of entry buffers 3
34 is “3”, page access counter 306 is “0”,
Both 316 and 326 are "4". On the other hand, in RCB340, the relay chain LRU front chain starting from the relay LRU head pointer 341 [→ BE310 → BE320] and the relay chain LRU rear chain starting from the relay LRU end pointer 342 [→ BE320 → BE310] are formed. ing. The entry buffer number 343 is "2" and the low access counter 345
Is "4".

ステツプ4: 次に、R12へのアクセスが要求されると、前記諸ステツ
プと同様にしてGET−BUFFER処理410が起動され、空きバ
ツフアの有無が調べられる(411)。今回は空きバツフ
アが存在しない。そこで、RCB340のエントリバツフア数
343と保証バツフア数344が比較される(412)。両者は
等しく“2"である。したがつて、処理413により、BCB33
0が管理するLRUチエインにおいて、ページアクセスカウ
ンタが“0"であるBEの探索が、チエインの末尾から始め
られ、該当するBE300が発見される。
Step 4: Next, when the access to R12 is requested, the GET-BUFFER processing 410 is started in the same manner as the above-mentioned various steps, and it is checked whether or not there is an empty buffer (411). This time there is no free buffer. Therefore, the number of entry buffers of RCB340
343 is compared with the guaranteed buffer number 344 (412). Both are equal to "2". Therefore, by the process 413, BCB33
In the LRU chain managed by 0, the search for BE whose page access counter is “0” is started from the end of the chain, and the corresponding BE 300 is found.

そこで、PAGE−IN処理420が呼ばれ、このBE300はリレー
シヨンLRUチエインに含まれていないので(421)、直ち
に対応するバツフアの内容が出力されて(424)、PAGE
−IN処理(430)に進みR12がBE300に対応するバツフア
に入力される(431)。このページはリレーシヨン“リ
ゾート”のページであり、リレーシヨンLRUチエインに
組込まれるべきものではないので(432)、直ちにPAGE
−IN処理は終わり、したがつてGET−BUFFER処理も終わ
る。そして、このBE300はリレーシヨンLRUチエインに含
まれていないので(404)、RCB340はそのままにして、B
E300はLRUチエインの先頭におけれる。
Therefore, the PAGE-IN processing 420 is called, and since this BE300 is not included in the relay LRU chain (421), the contents of the corresponding buffer are immediately output (424), and PAGE
-Proceed to IN processing (430), and R12 is input to the buffer corresponding to BE300 (431). This page is a page of "Resort", and should not be included in Relay LRU Chain (432), so immediately PAGE
-IN processing ends, and so does GET-BUFFER processing. And because this BE300 is not included in the relay LRU chain (404), leave the RCB340 as it is and B
The E300 can be placed at the beginning of the LRU chain.

この時点において、BCB330のLRU先頭ポインタ331に始ま
るLRU前方チエイン〔→BE300→BE310→BE320〕と、LRU
末尾ポインタ332に始まるLRU後方チエイン〔→BE320→B
E310→BE300〕とが形成されている。エントリバツフア
数334は“3"であり、ページアクセスカウンタ306は
“0"、同316と326は共に“4"である。他方、RCB340にお
いては、リレーシヨンLRU先頭ポインタ341に始まるリレ
ーシヨンLRU前方チエイン〔→BE310→BE320〕とリレー
シヨンLRU末尾ポインタ342に始まるリレーシヨンLRU後
方チエイン〔BE320→BE310〕とが形成されている。エン
トリバツフア数343は“2"で、ローアクセスカウンタ345
は“2"である。第5図は、この時点における前記諸チエ
インを示す。
At this point, the LRU front chain [→ BE300 → BE310 → BE320] starting from the LRU head pointer 331 of the BCB330 and the LRU
LRU backward chain starting from the end pointer 332 [→ BE320 → B
E310 → BE300] are formed. The number of entry buffers 334 is “3”, the page access counter 306 is “0”, and both 316 and 326 are “4”. On the other hand, in the RCB340, a relay chain LRU front chain starting from the relay LRU head pointer 341 [→ BE310 → BE320] and a relay chain LRU rear chain starting from the relay LRU end pointer 342 [BE320 → BE310] are formed. . The entry buffer number 343 is "2" and the low access counter 345
Is "2". FIG. 5 shows the various chains at this point.

以上に述べた例における条件を変えて、もしも保証ペー
ジ数が“1"であつたとすれば、ステツプ4のGET−BUFFE
R処理410における判断412に際して、エントリバツフア
数343は“2"で、保証ページ数“1"よりも大きい。その
結果、処理413の代りに処理414に進み、リレーシヨンLR
Uチエイン〔→BE310→BE320〕の中で、ページアクセス
カウンタが“0"のBEが探索される。しかし、ページアク
セスカウンタ316,326は共に“4"なので、末尾にあるBE3
20が選択される。したがつて、PAGE−OUT処理420におい
て、BE320のページアクセスカウンタ326が“1"を減じら
れて、“3"になり(421〜423)、このBE320に対応する
バツフアがリプレース(424,431)の対象となる。
If the number of guaranteed pages is "1" by changing the conditions in the above-described example, GET-BUFFE in step 4 is used.
At the time of determination 412 in the R process 410, the entry buffer number 343 is “2”, which is larger than the guaranteed page number “1”. As a result, instead of the processing 413, the processing proceeds to the processing 414 and the relay LR
A BE having a page access counter of “0” is searched in the U chain [→ BE310 → BE320]. However, since the page access counters 316 and 326 are both "4", the BE3 at the end is
20 is selected. Therefore, in the PAGE-OUT processing 420, the page access counter 326 of BE320 is decremented by "1" and becomes "3" (421 to 423), and the buffer corresponding to this BE320 is the target of replacement (424,431). Becomes

また、もしもローアクセスカウンタ345の初期設定値が
“2"であつたとすれば、ステツプ3における処理405の
結果、ローアクセスカウンタ345は“0"になり、したが
つて、処理406,407により、リレーシヨンLRUチエインが
解放され、ページアクセスカウンタ316,326は共に“0"
に設定される。この場合、ステツプ4の遂行に際して、
リレーシヨンLRUチエインは存在しないから、RCBのエン
トリバツフア数343の値の如何にかかわらず、処理412,4
13により、LRUチエインからリプレース対象バツフアが
選択される。
Further, if the initial setting value of the low access counter 345 is "2", the low access counter 345 becomes "0" as a result of the processing 405 in step 3, and therefore, the relay processing is executed by the processing 406 and 407. LRU chain is released and page access counters 316 and 326 are both "0"
Is set to. In this case, when performing Step 4,
Since there is no relay LRU chain, processing 412,4 regardless of the value of the entry buffer number 343 of RCB.
By 13, the replacement target buffer is selected from the LRU chain.

本発明のバツフア管理方法は、統計情報を用いたルール
とコスト評価との併用に限らず、適当なデータベース参
照特性情報を与える内部処理手順が得られるものであれ
ば、他の方法(例えば、コスト評価のみ、ヒユーリステ
イツクス、コスト評価とヒユーリステイツクスの併用な
ど)による最適化処理を行なうDBMSにも適用できる。
The buffer management method of the present invention is not limited to the combination of the rule using the statistical information and the cost evaluation, but any other method (for example, the cost) can be used as long as an internal processing procedure that gives appropriate database reference characteristic information can be obtained. It can also be applied to a DBMS that performs optimization processing by evaluation only, high-status, cost evaluation and high-status combination, etc.).

いずれの発明も、大型計算機のソフトウエアシステムを
介して実現することも、また、各部のために専用プロセ
ツサが用意された複合プロセツサシステムを介して実現
することも、可能である。
Any of the inventions can be realized via a software system of a large-scale computer, or can be realized via a composite processor system in which a dedicated processor is prepared for each unit.

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

本発明の問合せ処理方法によれば、問合せ処理手順決定
のためのルールベースが、新しい問合せを処理するたび
にダイナミツクに改善を重ねることにより、システムの
利用環境に適合するように補充・整備され、したがつ
て、固定的なルールによるものと比較して、大幅な性能
向上が期待できる。
According to the query processing method of the present invention, the rule base for determining the query processing procedure is supplemented and maintained so as to be suitable for the system usage environment by repeatedly improving the dynamics every time a new query is processed, Therefore, a significant performance improvement can be expected compared to the fixed rule.

また、本発明のバツフア管理方法によれば、バツフアの
リプレース制御が個々の問合せの処理手順に適合した手
順で行なわれ、その結果、バツフアの効率が改善され、
ひいては、問合せの処理を、従来よりも高速・低コスト
で行なうことができる。
Further, according to the buffer management method of the present invention, the replacement control of the buffer is performed in a procedure adapted to the processing procedure of each inquiry, and as a result, the efficiency of the buffer is improved,
As a result, the inquiry processing can be performed at higher speed and lower cost than ever before.

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

第1図は第1発明の一実施例が適用されたデータベース
管理システムのブロツクダイヤグラム、第2図は第1図
中のコスト評価最適化部のブロツクダイヤグラム、第3
図は第1図と第2図に示されたデータベース管理システ
ムにより行なわれる問合せ処理のフローチヤート、第4
図は第2発明の一実施例が適用されたデータベース管理
システムのブロツクダイヤグラム、第5図は第4図中の
バツフア制御部が管理するバツフア制御情報の模式図、
第6図は第4図中のバツフア制御部により行なわれるバ
ツフア制御のフローチヤート、第7図は実施例の説明に
用いられるリレーシヨンの模式図である。 2……データベース管理システム、4……論理処理部、
41……問合せ解析部、42……問合せ処理最適化部、42a
……第1ルールベース管理部、43……コード生成・論理
処理実行部、5……物理処理部、51……バツフア制御
部、6……コスト評価最適化部、69……第2ルールベー
ス管理部、7……データベース、8……データベースバ
ツフア。
1 is a block diagram of a database management system to which an embodiment of the first invention is applied, FIG. 2 is a block diagram of a cost evaluation optimizing unit in FIG. 1, and FIG.
FIG. 4 is a flow chart of query processing performed by the database management system shown in FIGS.
FIG. 5 is a block diagram of a database management system to which an embodiment of the second invention is applied, and FIG. 5 is a schematic diagram of buffer control information managed by the buffer control unit in FIG.
FIG. 6 is a flow chart of the buffer control performed by the buffer control section in FIG. 4, and FIG. 7 is a schematic diagram of the relay used for explaining the embodiment. 2 ... Database management system, 4 ... Logical processing unit,
41 …… Inquiry analysis section, 42 …… Inquiry processing optimization section, 42a
...... First rule base management unit, 43 ...... Code generation / logical process execution unit, 5 ...... Physical processing unit, 51 ...... Buffer control unit, 6 ...... Cost evaluation optimization unit, 69 ...... Second rule base Management department, 7 ... Database, 8 ... Database buffer.

Claims (6)

【特許請求の範囲】[Claims] 【請求項1】データベースに対するユーザからの問合せ
を解析して回答に必要な情報を前記データベースから得
るための内部処理手順を決定しそれを実行するデータベ
ース処理装置において行なわれる、データベースシステ
ムの統計情報と問合せの解析結果とから単一の内部処理
手順を与える第1ルールベースにより単一の実行される
べき内部処理手順を選定する第1の選定過程と、データ
ベースシステムの統計情報と問合せの解析結果とから個
数に制約なしに内部処理手順を与える第2ルールベース
により少なくとも一つの擬似内部処理手順を選定する第
2選定過程と、前記第1及び第2選定過程で選定された
内部処理手順を評価比較する過程と、前記評価比較の結
果に応じて前記第1ルールベースを前記第2ルールベー
スの内容に基づいて修正する過程とを含む、データベー
ス管理方法。
1. Statistical information of a database system, which is performed in a database processing device that analyzes an inquiry from a user to a database, determines an internal processing procedure for obtaining information necessary for answering from the database, and executes the internal processing procedure. A first selection process of selecting a single internal processing procedure to be executed by a first rule base that gives a single internal processing procedure from the analysis result of the query, statistical information of the database system, and the analysis result of the query. The second selection process of selecting at least one pseudo internal processing procedure by the second rule base that gives an internal processing procedure without restriction on the number and the internal processing procedures selected in the first and second selection processes are evaluated and compared. Based on the contents of the second rule base according to the result of the evaluation comparison. And a step of modifying, database management method.
【請求項2】特許請求の範囲第1項において、その統計
情報はデータベースシステムの処理能力を示すシステム
特性とデータベースの構成を示すデータベース特性と利
用可能な処理機能を示す処理方式特性とに関する情報を
含み、その内部処理手順の評価比較は各内部処理手順の
実行にかかるコストについて行なわれる、データベース
管理方法。
2. The statistical information according to claim 1, which is information on a system characteristic indicating a processing capacity of a database system, a database characteristic indicating a database configuration, and a processing method characteristic indicating an available processing function. A database management method that includes evaluation comparison of the internal processing procedures with respect to the cost of executing each internal processing procedure.
【請求項3】データベースに対するユーザからの問合せ
を解析して所要情報を前記データベースから得るための
内部処理手順を決定し、それを外部記憶装置に蓄積され
たデータベースデータの一部を写しを一時的に保持する
バツフア群を用いて実行するデータベース処理装置にお
いて行なわれる、データベースシステムの統計情報と問
合せの解析結果とから最適内部処理手順を決定する過程
と、前記の決定された内部処理手順から得られるデータ
ベースアクセスの態様を示すデータベース参照特性情報
をバツフア制御情報として設定する過程と、前記の設定
されたバツフア制御情報を用いて前記バツフア群のリプ
レースを制御するリプレース制御過程とを含む、データ
ベース管理方法。
3. A database inquiry is analyzed to determine an internal processing procedure for obtaining required information from the database, and a partial copy of the database data stored in an external storage device is temporarily copied. The process of determining the optimum internal processing procedure from the statistical information of the database system and the analysis result of the query, which is performed in the database processing apparatus executed by using the buffer group stored in, and obtained from the determined internal processing procedure. A database management method comprising: a step of setting database reference characteristic information indicating a mode of database access as buffer control information; and a replacement control step of controlling replacement of the buffer group using the set buffer control information.
【請求項4】特許請求の範囲第3項において、そのデー
タベースは複数のリレーシヨンを含むリレーシヨナルデ
ータベースであつて、各リレーシヨンは複数のローから
なり、前記外部記憶装置と前記バツフア群の間のデータ
授受が所定サイズのデータブロツクであるページを単位
として行なわれ、そのリプレース制御過程は、処理対象
リレーシヨンのうちで相対的に短期間に順次アクセスさ
れるリレーシヨンのページを保持するバツフアをそれぞ
れのリレーシヨンに対応して形成されるリレーシヨンLR
Uチエインに組込む過程と、何らかのページを保持する
バツフアのすべてを単一のLRUチエインに組込む過程
と、前記リレーシヨンLRUチエインのどれかに含まれる
ページの数が前記バツフア制御情報に含まれる予め定め
られた値よりも大きいときにそのリレーシヨンLRUチエ
インに含まれるバツフアからリプレースの対象を選択
し、さもなければ前記単一のLRUチエインに含まれるバ
ツフアからリプレースの対象を選択する過程を含む、デ
ータベース管理方法。
4. The database according to claim 3, wherein the database is a relay regional database including a plurality of relays, each relay comprising a plurality of rows, and between the external storage device and the buffer group. The data transfer is performed in units of pages that are data blocks of a predetermined size, and the replacement control process uses a buffer that holds the pages of relays that are sequentially accessed in a relatively short period among the target relays. Relay LR formed corresponding to each relay
The process of incorporating into the U chain, the process of incorporating all buffers holding some pages into a single LRU chain, and the number of pages included in any of the relay LRU chains is included in the buffer control information in advance. Database that includes selecting a replacement target from buffers included in the relay LRU chain when the value is greater than the specified value, or selecting a replacement target from buffers included in the single LRU chain otherwise. Management method.
【請求項5】特許請求の範囲第4項において、そのバツ
フア制御情報は各ページについて予想されるページアク
セス回数を含み、そのリプレース制御過程は各ページが
リプレースされるたびに対応する前記ページアクセス回
数を1だけ減ずる過程を含み、リプレースの対象を選択
する過程において、前記ページアクセス回数が0のペー
ジが優先的に選択される、データベース管理方法。
5. The buffer control information according to claim 4, wherein the buffer control information includes an expected page access count for each page, and the replacement control process corresponds to the page access count corresponding to each page replacement. In the process of selecting a replacement target, a page having a page access count of 0 is preferentially selected in the process of selecting a replacement target.
【請求項6】特許請求の範囲第5項において、そのバツ
フア制御情報は前記リレーシヨンLRUチエインのそれぞ
れに含まれるページについて予想されるローアクセス回
数を含み、そのリプレース制御過程は各リレーシヨンLR
Uチエインに含まれるページにアクセスがあるたびに対
応する前記ローアクセス回数を1だけ減じてそれが0に
なつた時にそのリレーシヨンLRUチエインを解放する過
程を含む、データベース管理方法。
6. The buffer control information according to claim 5, including the expected number of row accesses for a page included in each of the relay LRU chains, and the replacement control process of each relay LR.
A database management method comprising the step of decrementing the corresponding row access count by 1 each time a page included in the U chain is accessed, and releasing the relay LRU chain when the row access count becomes 0.
JP60137052A 1985-06-25 1985-06-25 Database management method Expired - Lifetime JPH0738165B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP60137052A JPH0738165B2 (en) 1985-06-25 1985-06-25 Database management method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP60137052A JPH0738165B2 (en) 1985-06-25 1985-06-25 Database management method

Publications (2)

Publication Number Publication Date
JPS61296426A JPS61296426A (en) 1986-12-27
JPH0738165B2 true JPH0738165B2 (en) 1995-04-26

Family

ID=15189751

Family Applications (1)

Application Number Title Priority Date Filing Date
JP60137052A Expired - Lifetime JPH0738165B2 (en) 1985-06-25 1985-06-25 Database management method

Country Status (1)

Country Link
JP (1) JPH0738165B2 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS63220323A (en) * 1987-03-10 1988-09-13 Fujitsu Ltd Output processing system for end user language inner processing logic
JPH0823866B2 (en) * 1988-09-20 1996-03-06 富士通株式会社 Query processing method in database
JPH04153832A (en) * 1990-10-18 1992-05-27 Fujitsu Ltd Automatic construction processing system for design assisting tool
JP3754253B2 (en) * 1999-11-19 2006-03-08 株式会社東芝 Structured document search method, structured document search apparatus, and structured document search system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
情報処理学会研究報告データベースシステム46−4(1985−3)

Also Published As

Publication number Publication date
JPS61296426A (en) 1986-12-27

Similar Documents

Publication Publication Date Title
US5317727A (en) Method apparatus for determining prefetch operating for a data base
US7680784B2 (en) Query processing system of a database using multi-operation processing utilizing a synthetic relational operation in consideration of improvement in a processing capability of a join operation
US9063982B2 (en) Dynamically associating different query execution strategies with selective portions of a database table
US8510316B2 (en) Database processing system and method
CA2232938C (en) Method and apparatus for performing a join query in a database system
US8099410B2 (en) Optimizing execution of database queries containing user-defined functions
US8165988B2 (en) Fast batch loading and incremental loading of data into a database
US7139783B2 (en) Materialized view system and method
US20060074874A1 (en) Method and apparatus for re-evaluating execution strategy for a database query
US20090319486A1 (en) Methods and systems for real-time continuous updates
US7580920B2 (en) System and method for graceful degradation of a database query
JP4071816B1 (en) Database query processing system using multi-operation processing using synthetic relational operations
US6230243B1 (en) Method, system and program products for managing changed data of castout classes
CN109446225A (en) Data cache method, device, computer equipment and storage medium
US7502778B2 (en) Apparatus, system, and method for efficient adaptive parallel data clustering for loading data into a table
CN114281819A (en) Data query method, device, equipment and storage medium
US7373340B2 (en) Computer implemented method and according computer program product for storing data sets in and retrieving data sets from a data storage system
US8255388B1 (en) Providing a progress indicator in a database system
JP4109305B1 (en) Database query processing system using multi-operation processing
JPH0738165B2 (en) Database management method
JPH086829A (en) Simultaneous full data retrieving method for data base
Ozkarahan et al. On-the-fly and background data filtering system for database architectures
JPS6315331A (en) Data base processing method
CN117667998A (en) Query optimization method and device based on data lake and storage medium
CN110502535A (en) Data access method, device, equipment and storage medium

Legal Events

Date Code Title Description
EXPY Cancellation because of completion of term