JPH0452495B2 - - Google Patents

Info

Publication number
JPH0452495B2
JPH0452495B2 JP58186729A JP18672983A JPH0452495B2 JP H0452495 B2 JPH0452495 B2 JP H0452495B2 JP 58186729 A JP58186729 A JP 58186729A JP 18672983 A JP18672983 A JP 18672983A JP H0452495 B2 JPH0452495 B2 JP H0452495B2
Authority
JP
Japan
Prior art keywords
transaction
cluster
processing
database
command
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
JP58186729A
Other languages
Japanese (ja)
Other versions
JPS6079441A (en
Inventor
Kazuhiro Sato
Itaru Kaneko
Shinichi Fukushima
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 JP58186729A priority Critical patent/JPS6079441A/en
Publication of JPS6079441A publication Critical patent/JPS6079441A/en
Publication of JPH0452495B2 publication Critical patent/JPH0452495B2/ja
Granted legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Description

【発明の詳細な説明】 〔発明の利用分野〕 本発明はデータベースに対する問合せの処理方
法に関し、特にデータベースに対する複数の問合
せを効率よく処理するのに好適なデータベースに
対する問合せの処理方式に関する。
DETAILED DESCRIPTION OF THE INVENTION [Field of Application of the Invention] The present invention relates to a method for processing queries to a database, and more particularly to a method for processing queries to a database suitable for efficiently processing a plurality of queries to a database.

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

以下、特にリレーシヨナル・データベース・シ
ステム(以下、RDBSと略称する)における問合
せ処理の従来方式について説明し、その問題点に
ついて述べる。
In the following, we will particularly explain the conventional method of query processing in relational database systems (hereinafter abbreviated as RDBS) and discuss its problems.

RDBSにおいては、高度にデータ独立な非手続
きデータベース問合せ言語によるデータ処理要求
(問合せ)に基づいて、システム自身でその処理
要求の最適な(ある性能指標:例えば入出力回
数、CPU時間に基づいて最小コストを与えると
いう意味)データアクセス命令の処理手順を生成
する必要がある。これを問合せの最適化処理とい
い、この最適化処理方式の是非がシステムの性能
を左右することになる。
In RDBS, based on a data processing request (query) in a highly data-independent, non-procedural database query language, the system itself determines the optimal (minimum based on some performance metric, e.g. I/O count, CPU time) for that processing request. It is necessary to generate processing procedures for data access instructions (meaning giving costs). This is called query optimization processing, and the pros and cons of this optimization processing method will affect the performance of the system.

問合せの最適化処理においては、問合せの特
性、データの特性、データベースの特性、システ
ムの特性、さらにはシステムに蓄積されている各
種のデータ処理機構等を考慮して、 問合せの評価順序の決定 問合せ内条件式の評価順序の決定 装備されている各種データ処理機構の適切な
選択(条件式の評価方式の選択) データアクセスのために用意されているアク
セスパス(インデクス・リンク等)の適切な選
択を行うことであるが、従来は、上記、、
が主に検討されており、についてはほとん
ど検討されていない。
In query optimization processing, the evaluation order of queries is determined by considering the characteristics of the query, the characteristics of the data, the characteristics of the database, the characteristics of the system, and the various data processing mechanisms stored in the system. Determining the evaluation order of internal conditional expressions Appropriate selection of the various equipped data processing mechanisms (selection of evaluation method for conditional expressions) Appropriate selection of access paths (indexes, links, etc.) prepared for data access However, conventionally, the above
has been mainly studied, and has hardly been studied.

すなわち、複数の問合せを処理対象とする
RDBSにおいては、問合せはシステムへの入力順
に1つずつシリアル処理され、問合せ間の関連を
考慮せずに実行される。このことは、データベー
スから主記憶装置にあるバツフアにロードされて
いるデータベース・データ、および問合せ処理で
得られる中間結果等が有効に利用されていないこ
とを意味し、個々の問合せごとに新たにデータベ
ース・データのローデイング要求を発行してい
る。関連する問合せ処理要求が連続する場合に
は、データベース・データロードのバツフアリン
グの効果は発揮されるが、連続性がない場合に
は、その度にデータベース・データのローデイン
グが必要となり、処理効率向上は望めない。
In other words, multiple queries are to be processed.
In RDBS, queries are serially processed one by one in the order they are entered into the system, and are executed without considering the relationships between queries. This means that the database data that has been loaded from the database into the buffer in main storage, as well as the intermediate results obtained from query processing, are not being used effectively.・Issuing a data loading request. If related query processing requests are continuous, the effect of database data load buffering will be effective, but if they are not continuous, database data will need to be loaded each time, and processing efficiency will not be improved. I can't hope.

データベースに対する問合せの処理方式につい
ては、これまで数多く提案されており、特に下記
文献で論じられている。
Many methods for processing queries to databases have been proposed so far, and are particularly discussed in the following documents.

●Procedings of ACM−SLGMOD
International Conference on Management
o Data ●Procedings of the International Conference
on Very Large Data Bases ●acm,Transaction on Database Systems ●情報処理学会全国大会講演集 〔発明の目的〕 本発明の目的は、上記の如き従来技術の問題点
を解消し、データベースに対する関連する問合せ
をクラスタリングし、それに基づいてデータベー
ス処理をスケジユーリングすることにより、デー
タベースバツフアの効率的利用、および管理を実
現する問合せ処理方式を提供することにある。
●Procedures of ACM-SLGMOD
International Conference on Management
o Data ●Procedings of the International Conference
on Very Large Data Bases ●acm, Transaction on Database Systems ●Information Processing Society of Japan National Conference Lecture Collection [Object of the Invention] The purpose of the present invention is to solve the problems of the prior art as described above, and to cluster related queries against a database. The object of the present invention is to provide a query processing method that achieves efficient use and management of database buffers by scheduling database processing based on this.

〔発明の概要〕 上記目的を達成するため、本発明によるデータ
ベースに対する問合せの処理方式は、データベー
ス、特に複数の各種端末からのデータベース処理
要求(問合せ、またはトランザクシヨンと呼ぶ)
群の問合せに応ずるリレーシヨナル・データベー
スを処理対象とするデータベース処理システムに
おいて、前記トランザクシヨンを同種データをア
クセスするトランザクシヨンごとにクラスタリン
グするトランザクシヨン・クラスタリング処理手
段と、該トランザクシヨン・クラスタリング処理
手段により生成されるトランザクシヨン・クラス
タのスケジユーリングを行うトランザクシヨン・
クラスタ実行スケジユール策定手段と、該トラン
ザクシヨン・クラスタ実行スケジユール策定手段
により策定されるスケジユールに基づきトランザ
クシヨン・クラスタ内を解析するトランザクシヨ
ン・クラスタ内解析処理手段と、該トランザクシ
ヨン・クラスタ内解析処理手段を通してクラスタ
内トランザクシヨンをトランザクシヨン・クラス
タ実行スケジユールに合せて前記トランザクシヨ
ンのソースコマンドを変換し、クラスタ内トラン
ザクシヨンの実行スケジユールを決める手段とを
有するトランザクシヨン・クラスタ作成/管理部
を設け、、前記トランザクシヨンの上位のソース
コマンドレベルでクラスタリング、およびスケジ
ユーリングすることにより、データベースバツフ
アの効率的利用を図り、データベースに対する問
合せの処理効率の向上を実現したことに特徴があ
る。
[Summary of the Invention] In order to achieve the above object, the present invention provides a method for processing queries to a database.
In a database processing system that processes a relational database that responds to group queries, transaction clustering processing means clusters the transactions for each transaction that accesses the same kind of data; A transaction cluster that schedules transaction clusters to be
A cluster execution schedule formulating means, a transaction cluster intra-cluster analysis processing means for analyzing a transaction cluster based on the schedule determined by the transaction cluster execution schedule formulating means, and a transaction cluster intra-cluster analysis processing means. a transaction cluster creation/management unit having means for converting the source command of the transaction to match the intra-cluster transaction with the transaction cluster execution schedule through the means and determining the execution schedule of the intra-cluster transaction; A feature of this method is that by performing clustering and scheduling at the source command level above the transaction, the database buffer is used efficiently and the processing efficiency of queries to the database is improved.

〔発明の実施例〕[Embodiments of the invention]

以下、本発明の一実施例を図面に基づいて説明
する。
Hereinafter, one embodiment of the present invention will be described based on the drawings.

第1図は本発明の一実施例によるデータベース
に対する問合せの処理方式の概念的な全体構成を
説明するための図である。
FIG. 1 is a diagram for explaining the conceptual overall structure of a database query processing method according to an embodiment of the present invention.

データベース処理システム2は、端末群1から
入力されるデータベース処理要求に基づいて当該
システムの全体制御を実現するシステム制御部4
と、キユーイングされた複数のデータベース処理
要求に対し関連する処理要求をクラスタリングす
るトランザクシヨン・クラスタ作成/管理部5
と、当該トランザクシヨン・クラスタ作成/管理
部5により生成されたトランザクシヨン・クラス
タを解析して、トランザクシヨン(上記データベ
ース処理要求を意味する)を構成しているコマン
ドをクラスタリングするコマンド・クラスタ作
成/管理部6と、当該コマンド・クラスタ作成/
管理部6により生成された個々のコマンド・クラ
スタを解析して、クラスタを構成しているコマン
ドに対して従来の如き問合せ最適化処理を行うコ
マンドの最適化処理部7と、当該最適化処理部7
の処理結果に基づいてコード生成、および実行制
御を行うコード生成/実行部8から構成されてい
る。
The database processing system 2 includes a system control unit 4 that realizes overall control of the system based on database processing requests input from the terminal group 1.
and a transaction cluster creation/management unit 5 that clusters related processing requests for multiple queued database processing requests.
A command cluster creation/cluster creation/clustering unit analyzes the transaction cluster generated by the transaction cluster creation/management unit 5 and clusters the commands that make up the transaction (meaning the database processing request described above). Management unit 6 and the command cluster creation/
a command optimization processing section 7 that analyzes each command cluster generated by the management section 6 and performs conventional query optimization processing on the commands forming the cluster; and the optimization processing section. 7
The code generation/execution section 8 generates code and controls execution based on the processing results.

データベース3は複数のリレーシヨンR1,R2
……から構成されている。リレーシヨンR1,R2
……はデータが2次元のテーブル形式で記述され
ており、その各行をロー、またはタプルと呼ぶ。
タプルは幾つかの属性(これをカラムという)か
ら成る。従来との対比で言えば、リレーシヨン
R1,R2,……はフアイルに、タプルはレコード
に、カラムはフイールドにそれぞれ対応する。リ
レーシヨンR1,R2,……を複数個そなえたもの
をリレーシヨナルデータベースという。
Database 3 has multiple relations R 1 , R 2 ,
It is composed of... Relation R 1 , R 2 ,
. . . data is described in a two-dimensional table format, and each row is called a row or tuple.
A tuple consists of several attributes (called columns). In comparison to the past, relation
R 1 , R 2 , . . . correspond to files, tuples to records, and columns to fields. A database containing multiple relations R 1 , R 2 , . . . is called a relational database.

第2図は、第1図におけるトランザクシヨン・
クラスタ作成/管理部5をさらに詳細に説明する
ための図である。
Figure 2 shows the transaction in Figure 1.
FIG. 3 is a diagram for explaining the cluster creation/management unit 5 in more detail.

トランザクシヨン・クラスタ作成/管理部5内
では、次の処理が行われる。トランザクシヨン解
析処理手段9は、システム制御部4から転送され
てくるトランザクシヨンを解析し、トランザクシ
ヨン管理テーブル9a、データベースを構成する
リレーシヨンR1,R2,……とトランザクシヨン
との関連を保持するトランザクシヨン・リレーシ
ヨン間関連記述テーブル9b、および、トランザ
クシヨンと単一リレーシヨンのカラムとの関連を
保持するトランザクシヨン・単一リレーシヨンカ
ラム間関連記述テーブル9cを生成する。トラン
ザクシヨン・クラスタリング処理手段10は、ト
ランザクシヨン解析処理手段9により得られた上
記各テーブル9a,9b,9cの情報を用いてト
ランザクシヨンのクラスタリングを行い、クラス
タ識別子(これについては後述する)と当該クラ
スタを構成するトランザクシヨンの識別子のリス
トで表されるトランザクシヨンクラスタ管理テー
ブル10aを作成する。トランザクシヨン・クラ
スタ実行スケジユール策定手段11は当該トラン
ザクシヨン・クラスタリング処理手段10により
得られたトランザクシヨン・クラスタの実行のス
ケジユーリングを行いトランザクシヨン・クラス
タ実行スケジユールテーブル(クラスタ識別子の
オーダドリスト)11aを作成する。トランザク
シヨン・クラスタ内解析処理手段12は、上記各
手段により得られたトランザクシヨン・クラスタ
を解析し、クラスタ内のトランザクシヨンの実行
制御を行う。13は、クラスタ内トランザクシヨ
ンをトランザクシヨン・クラスタ実行スケジユー
ルに合わせてトランザクシヨン・クラスタ内のト
ランザクシヨンのソース処理要求を変換し、トラ
ンザクシヨン・クラスタ内のトランザクシヨンの
実行スケジユールを策定する手段である。この手
段13は、前記ソース処理要求の変換結果とトラ
ンザクシヨン・クラスタ内のトランザクシヨンの
実行スケジユールを表すテーブル13aを作成す
る。
The following processing is performed within the transaction cluster creation/management unit 5. The transaction analysis processing means 9 analyzes the transaction transferred from the system control unit 4, and determines the relationship between the transaction and the relationships R 1 , R 2 , . . . that constitute the transaction management table 9a and the database. A transaction/relation relation description table 9b to be held and a transaction/single relation column relation description table 9c to hold the relation between transactions and columns of a single relation are generated. The transaction clustering processing means 10 performs clustering of transactions using the information in the tables 9a, 9b, and 9c obtained by the transaction analysis processing means 9, and clusters the transactions using the cluster identifier (this will be described later) and the relevant information. A transaction cluster management table 10a is created that is represented by a list of identifiers of transactions that constitute a cluster. The transaction cluster execution schedule formulating means 11 schedules the execution of the transaction cluster obtained by the transaction clustering processing means 10, and creates a transaction cluster execution schedule table (ordered list of cluster identifiers) 11a. Create. The intra-transaction cluster analysis processing means 12 analyzes the transaction clusters obtained by the above-mentioned means and controls the execution of transactions within the cluster. 13 is a means for converting the source processing request of the transaction within the transaction cluster to match the intra-cluster transaction with the transaction cluster execution schedule, and formulating the execution schedule of the transaction within the transaction cluster. . This means 13 creates a table 13a representing the conversion result of the source processing request and the execution schedule of transactions within the transaction cluster.

トランザクシヨン解析処理手段9より生成され
るトランザクシヨン管理テーブル9a、トランザ
クシヨン・リレーシヨン間関連記述テーブル9
b、トランザクシヨン・単一リレーシヨンカラム
間関連記述テーブル9cの構成を各々第3図、第
4図、第5図に示す。
Transaction management table 9a and transaction-relation relationship description table 9 generated by transaction analysis processing means 9
b. The structure of the transaction/single relation column relationship description table 9c is shown in FIGS. 3, 4, and 5, respectively.

第3図に示したトランザクシヨン管理テーブル
9a内のTr#は、当該システムで各トランザク
シヨンに付されるトランザクシヨン識別番号であ
る。この番号に対応してトランザクシヨンのデー
タベース処理内容がソースイメージ、すなわち問
合せ言語ソースコマンドで保持される。
Tr# in the transaction management table 9a shown in FIG. 3 is a transaction identification number assigned to each transaction in the system. Corresponding to this number, the database processing contents of the transaction are held in a source image, that is, a query language source command.

第4図に示すように、トランザクシヨン・リレ
ーシヨン間関連記述テーブル9bには、各トラン
ザクシヨンTr#1,Tr#2,Tr#3……ごと
に、そのトランザクシヨンのアクセス・タイプ
(検索系:R、更新系:U等)、リレーシヨンR1
R2,R3……との関連情報(関連するリレーシヨ
ンを“1”にセツトし、関連しなければ“0”に
セツトする)情報、および当該関連マトリクス情
報に基づいて、縦、および横のセツト“1”の総
数をそれぞれ示すカウント情報COUNT1,
COUNT2が保持されている。図中、U3の3は、
トランザクシヨンTr#3が更新処理要求であり、
リレーシヨンR3がその具体的な更新対象である
ことを示している。
As shown in FIG. 4, the transaction-relation relationship description table 9b contains the transaction access type (search system) for each transaction Tr#1, Tr#2, Tr#3... :R, update system: U, etc.), relation R 1 ,
Based on the related information with R 2 , R 3 . Count information COUNT1, which indicates the total number of set “1”, respectively.
COUNT2 is retained. In the diagram, 3 of U 3 is
Transaction Tr #3 is an update processing request,
This indicates that relation R 3 is the specific target of the update.

トランザクシヨン・単一リレーシヨンカラム間
関連記述テーブル9cには、第5図に示すよう
に、特定のリレーシヨンに対する各トランザクシ
ヨンごとのアクセスタイプ(R:検索系、U:更
新系)、当該リレーシヨンを構成するカラムC1
C2,C3,……との関連(1:関連有、0:関連
無)情報、および当該関連マトリクス情報に基づ
いてカウント情報COUNT1,COUNT2が保持さ
れている。図中、U2の2は、トランザクシヨン
Tr#3が更新処理要求であり、カラムC2がその
具体的な更新対象であることを示している。
As shown in FIG. 5, the transaction/single relation column relationship description table 9c includes the access type (R: search type, U: update type) for each transaction to a specific relation, and the relevant relay. Column C 1 composing the column,
Count information COUNT1 and COUNT2 are held based on the relationship (1: related, 0: not related) information with C 2 , C 3 , . . . and the related matrix information. In the diagram, 2 of U 2 is the transaction
Tr#3 is an update processing request, and column C2 indicates the specific update target.

ところで、第1図、第2図に示すコマンド・ク
ラスタ作成/管理部6も上述したトランザクシヨ
ン・クラスタ作成/管理部5と同様な内部構成で
実現される。したがつて、具体的な説明、および
図は省略するが、コマンド・クラスタ作成/管理
部6は、コマンド解析処理手段、および該手段よ
り作成されるコマンド管理テーブル、コマンド・
リレーシヨン間関連記述テーブル、コマンド・単
一リレーシヨン間関連記述テーブルと、コマン
ド・クラスタリング処理手段、および該手段より
作成されるコマンド・クラスタ管理テーブルと、
コマンド・クラスタ実行スケジユール策定手段、
および該手段より作成されるクラスタ実行スケジ
ユールと、コマンド・クラスタ内の解析処理手段
と、クラスタ内コマンドのソース変換とクラスタ
内コマンドの実行スケジユール策定手段、および
該手段より作成されるコマンドのソース変換結果
とコマンド実行スケジユール、等の各種手段や情
報管理により構成されている。
Incidentally, the command cluster creation/management section 6 shown in FIGS. 1 and 2 is also realized with the same internal configuration as the transaction cluster creation/management section 5 described above. Therefore, although detailed explanations and diagrams are omitted, the command cluster creation/management unit 6 includes a command analysis processing means, a command management table created by the means, and a command cluster creation/management unit 6.
an inter-relation relation description table, a command/single relation relation description table, a command/clustering processing means, and a command/cluster management table created by the means;
means for formulating a command/cluster execution schedule;
and a cluster execution schedule created by the means, an analysis processing means in the command cluster, a means for converting the source of the intra-cluster command, a means for formulating an execution schedule for the intra-cluster command, and a source conversion result of the command created by the means. It consists of various means and information management such as command execution schedule and command execution schedule.

次に、上記各処理部の動作について、第6図を
用いて詳細に説明する。
Next, the operation of each of the processing sections described above will be explained in detail using FIG. 6.

端末群1から入力されるトランザクシヨンTr
(データベース処理要求)は、システム制御部4
においてトランザクシヨンの処理待ち行列(図示
省略)にキユーイングされる(601)。トランザク
シヨン・クラスタ作成/管理部5では、前記処理
待ち行列よりトランザクシヨンTrを1つずつ取
得し(602)、取得したトランザクシヨンの個数
Ntrをカウントしながら(603)、トランザクシヨ
ン解析処理手段9を用いて、取得したトランザク
シヨンTrの解析処理を行う(604)。この時、前
記したように、トランザクシヨン管理テーブル9
a、トランザクシヨン・リレーシヨン間関連記述
テーブル9b、およびトランザクシヨン・単一リ
レーシヨンカラム間関連記述テーブル9c、等の
関連情報が作成される。
Transaction Tr input from terminal group 1
(database processing request) is the system control unit 4
The transaction is queued in a transaction processing queue (not shown) (601). The transaction cluster creation/management unit 5 acquires transaction Tr one by one from the processing queue (602), and calculates the number of acquired transactions.
While counting Ntr (603), the acquired transaction Tr is analyzed using the transaction analysis processing means 9 (604). At this time, as mentioned above, the transaction management table 9
Related information such as a, a transaction/relation relation description table 9b, and a transaction/single relation column relation description table 9c are created.

次に、これらの情報を用いてトランザクシヨ
ン・クラスタリング処理手段10はトランザクシ
ヨンのクラスタリング処理を行う(605)。クラス
タリングに当つては、トランザクシヨンのアクセ
スタイプとデータベース処理システムへの入力順
とを考慮する。第7図を用いてトランザクシヨン
のクラスタリングの動作を説明する。今、クラス
タ識別子をCLi(i=1,2,3,……)とする。
この時、トランザクシヨンTr#1が入力解析時
はCL1=(Tr#1)。次にトランザクシヨンTr
#2が入力解析後は、トランザクシヨンTr#1
とトランザクシヨンTr#2とに共通するリレー
シヨンR1,R2,……がないので、新たにクラス
タCL2が作成され、CL2=(Tr#2)となる。次
に、トランザクシヨンTr#3が入力されると、
トランザクシヨンTr#3はトランザクシヨンTr
#1と共通するリレーシヨン(R1,R5)を必要
とするのでクラスタCL1にトランザクシヨンTr
#3が組入れられる。すなわち、CL1=(Tr#1,
Tr#3)。同様にして、トランザクシヨンTr
#5入力後には、CL1=(Tr#1,Tr#3,Tr
#5)、CL2=(Tr#2,Tr#4)の2つのクラ
スタが生成される。
Next, using this information, the transaction clustering processing means 10 performs transaction clustering processing (605). In clustering, the access type of transactions and the order of input into the database processing system are considered. The operation of transaction clustering will be explained using FIG. Now, assume that the cluster identifier is CLi (i=1, 2, 3, . . . ).
At this time, when transaction Tr#1 is input analysis, CL 1 = (Tr#1). Then transaction Tr
After #2 input analysis, transaction Tr #1
Since there are no relations R 1 , R 2 , . . . common to transaction Tr #2, a new cluster CL 2 is created, and CL 2 =(Tr #2). Next, when transaction Tr#3 is input,
Transaction Tr #3 is transaction Tr
Transaction Tr is placed in cluster CL 1 because it requires relations (R 1 , R 5 ) common to #1.
#3 is incorporated. That is, CL 1 =(Tr#1,
Tr#3). Similarly, transaction Tr
After inputting #5, CL 1 = (Tr#1, Tr#3, Tr
#5), two clusters of CL 2 =(Tr#2, Tr#4) are generated.

次にトランザクシヨンTr#6の入力時には、
トランザクシヨンTr#6のアクセスタイプがこ
れまでの検索アクセスRと異なり、更新アクセス
Uであるので、これを1つのクラスタとして管理
し、CL3=(Tr#6)となる。さらにトランザク
シヨンTr#7の入力時には、トランザクシヨン
Tr#6との無関連を確認し、クラスタCL1,CL2
との合致性を検証する。図より、CL2=(Tr#2,
Tr#4,Tr#7)となる。同様にしてトランザ
クシヨンTr#8〜Tr#10を検証すると、トラン
ザクシヨンTr#8,10、はリレーシヨンR1に関
連している。しかし、トランザクシヨンTr#6
のアクセスタイプU1によりリレーシヨンR1の内
容は更新されているので、更新されたリレーシヨ
ンR1を含む新たなクラスタの設定が必要なこと
がわかる。すなわち、トランザクシヨンTr#8、
トランザクシヨンTr#10がクラスタCL4を構成
し、CL4=(Tr#8,Tr#10)となる。トランザ
クシヨンTr#9はクラスタCL2に含まれることが
わかる{CL2=(Tr#2,Tr#4,Tr#7,Tr
#9)}。
Next, when inputting transaction Tr#6,
Since the access type of transaction Tr#6 is different from the previous search access R and is update access U, this is managed as one cluster, and CL 3 =(Tr#6). Furthermore, when inputting transaction Tr#7, the transaction
After confirming the unrelatedness with Tr#6, clusters CL 1 and CL 2
Verify compatibility with From the figure, CL 2 = (Tr#2,
Tr#4, Tr#7). When transactions Tr#8 to Tr#10 are similarly verified, transactions Tr#8 and Tr#10 are related to relation R1 . However, transaction Tr#6
Since the contents of relation R 1 have been updated by the access type U 1 of , it can be seen that it is necessary to set up a new cluster that includes the updated relation R 1 . That is, transaction Tr#8,
Transaction Tr#10 constitutes cluster CL4 , and CL4 =(Tr#8, Tr#10). It can be seen that transaction Tr#9 is included in cluster CL 2 {CL 2 = (Tr#2, Tr#4, Tr#7, Tr
#9)}.

以上の処理がトランザクシヨン・クラスタリン
グ処理手段10により行われるが、該処理手段1
0の処理対象となるトランザクシヨンの処理時間
Te(Toは初期設定値で、Teはトランザクシヨン
の処理待ち行列へのキユーイング602からトラ
ンザクシヨンのクラスタリング処理605までの
経過時間を表わす)、および個数Ntr(Noは初期
設定値)をチエツクする(606,607)。
To,Noの適切な設定によりシステムの効率的な
サービスが実現可能となる。各クラスタCLiの処
理スケジユールは、クラスタCLiを構成するトラ
ンザクシヨンの入力順を優先して決定する方法が
考えられる。第7図の例では、CL1,CL2,CL3
CL4の順にクラスタが処理される(608)。次
にクラスタの処理順に、クラスタが1つずつ取得
され(609)、クラスタ内のトランザクシヨン
のソースコマンド変換とトランザクシヨンの処理
スケジユーリングがシステム環境設定値、
COUNT1,2の情報を用いて行われる(61
0)。このように、COUNT1,2を各クラスタ
CLi内でのトランザクシヨンの処理順の決定に利
用し、データベースからのデータのフエツチ回数
を少くする形式でクラスタ内トランザクシヨンの
処理スケジユーリングが決定される(610)。
例えば、第7図のクラスタCL1のトランザクシヨ
ンの処理順は、トランザクシヨンTr#3,Tr
#1,Tr#5の順に処理が行われる。以上がト
ランザクシヨン・クラスタ作成/管理部5の処理
内容である。
The above processing is performed by the transaction clustering processing means 10.
Processing time of transaction targeted for processing 0
Check Te (To is the initial setting value, Te represents the elapsed time from queuing the transaction to the processing queue 602 to clustering processing 605 of the transaction) and the number Ntr (No is the initial setting value) ( 606, 607).
Appropriate settings of To and No enable efficient system services. A possible method for determining the processing schedule for each cluster CLi is to give priority to the input order of the transactions that make up the cluster CLi. In the example in Figure 7, CL 1 , CL 2 , CL 3 ,
Clusters are processed in order of CL 4 (608). Next, clusters are acquired one by one in the order of cluster processing (609), and the source command conversion of transactions within the cluster and the processing scheduling of transactions are set according to the system environment settings.
This is done using the information of COUNT1 and 2 (61
0). In this way, set COUNT1 and 2 to each cluster
It is used to determine the processing order of transactions within the CLi, and processing scheduling for intra-cluster transactions is determined in a manner that reduces the number of fetches of data from the database (610).
For example, the processing order of transactions in cluster CL 1 in FIG. 7 is transaction Tr#3, Tr
Processing is performed in the order of #1 and Tr #5. The above is the processing content of the transaction cluster creation/management section 5.

次に、上記トランザクシヨン・クラスタ作成/
管理部5で設定された情報に基づいて、作成され
たクラスタ内のトランザクシヨンごとの内部解析
が行われ(611,612)、トランザクシヨン
を構成しているコマンド群のクラスタリング、お
よびコマンド・クラスタの処理順の設定が行われ
る(612,613)。さらに、各コマンド・ク
ラスタ内のコマンドの内部解析を行い、クラスタ
内コマンドの処理順の設定と、それに伴うソース
コマンドの変換を行う(614,615)。以上
の処理では、第5図に示したトランザクシヨン・
単一リレーシヨンカラム間関連記述テーブル9c
の情報を用いる。その処理内容は、上述したトラ
ンザクシヨン・クラスタ作成/管理部5と同様と
なるので省略する。
Next, create the above transaction cluster/
Based on the information set in the management unit 5, an internal analysis is performed for each transaction in the created cluster (611, 612), and clustering of the command group making up the transaction and clustering of the command cluster are performed. The processing order is set (612, 613). Furthermore, internal analysis of the commands within each command cluster is performed, the processing order of commands within the cluster is set, and source commands are converted accordingly (614, 615). In the above processing, the transaction shown in Figure 5
Single relation column relationship description table 9c
Use the information of The processing content is the same as that of the transaction cluster creation/management unit 5 described above, so a description thereof will be omitted.

第8図にトランザクシヨン・クラスタ作成/管
理部5、またはコマンド・クラスタ作成/管理部
6の処理内容の具体例を示す。
FIG. 8 shows a specific example of the processing contents of the transaction cluster creation/management section 5 or the command cluster creation/management section 6.

801〜806は、問合せ処理用言語
SEQUEL(Structured English Query
Language)により記述されたトランザクシヨン
(またはコマンド)のソースコマンドである。そ
の意味は、トランザクシヨンTr#1801を例
にとると、resort(保養地)という名称のリレー
シヨン中のカラム(nameおよびfare)からfare
(料金)が5以下のものを選ぶということである。
また、トランザクシヨン識別子Tr#1〜Tr6の
番号は、その番号順に各トランザクシヨンが入力
されたことを示す。入力された各トランザクシヨ
ンはアクセス対象のリレーシヨン(またはカラ
ム)の異同を基準にクラスタリング処理され、さ
らにクラスタ処理順が決定される。本例では、ク
ラスタCL1807にはトランザクシヨンTr#1,
Tr#3,Tr#5が入り、クラスタCL2808に
はトランザクシヨンTr#2,Tr#4が入り、ク
ラスタCL3809にはトランザクシヨンTr#3が
入る。そして、クラスタ処理順はクラスタCL1
クラスタCL3の如く決定される。クラスタCL1
07内処理におけるソースコマンド変換は第8図
bに示すように、区間データ(Temp Tr#18
01,Tr#1′801′。このデータはクラスタリ
ングの際、第1図に示したデータベース3からデ
ータベース処理システム2内のデータベースバツ
フア14にロードされている。したがつて、これ
をアクセスするためにはソースコマンドの変換が
必要となる。)の利用を可能ならしめ、少量のデ
ータを対象とする処理要求となるよう行われる。
すなわち、トランザクシヨンTr#3803をト
ランザクシヨンTr#3′803′の如く変換するこ
とにより、中間データであるtemp Tr#1′80
1′の利用を可能ならしめている。
801 to 806 are query processing languages
SEQUEL (Structured English Query)
This is the source command of a transaction (or command) written in the same language. Taking transaction Tr #1801 as an example, the meaning is that from the column (name and fare) in the relation named resort, fare is
This means choosing one with a (fee) of 5 or less.
Further, the numbers of transaction identifiers Tr#1 to Tr6 indicate that each transaction is input in the numerical order. Each input transaction is clustered based on the relation (or column) to be accessed, and the order of cluster processing is determined. In this example, cluster CL 1 807 includes transactions Tr#1,
Tr#3 and Tr#5 enter, transactions Tr#2 and Tr#4 enter cluster CL 2 808, and transaction Tr#3 enters cluster CL 3 809. Then, the cluster processing order is cluster CL 1
The cluster is determined as CL 3 . Cluster CL 1 8
As shown in Figure 8b, the source command conversion in the processing within 07 converts interval data (Temp Tr#18
01, Tr#1'801'. This data is loaded from the database 3 shown in FIG. 1 into the database buffer 14 in the database processing system 2 during clustering. Therefore, in order to access this, it is necessary to convert the source command. ), and processing requests target small amounts of data.
That is, by converting transaction Tr#3803 into transaction Tr#3'803', the intermediate data temp Tr#1'80
1' can be used.

上述のようなコマンド・クラスタ作成/管理部
6の処理が完了した後、当該処理部により得られ
るコマンド・クラスタの各コマンドに対し、二次
記憶(データベース3)からのデータベースデー
タの入出力回数、あるいはデータ処理に要する
CPU時間等に基づいたコマンド処理コスト評価
によつて、コマンド処理の最適アクセスパスを生
成する従来の最適化処理をコマンドの最適化処理
部7にて行う(616,617)。次に、コマン
ド・クラスタ内処理の完了、コマンド・クラスタ
処理の完了、トランザクシヨン・クラスタ内処理
の完了、トランザクシヨン・クラスタの完了をそ
れぞれ順次確認し、もし未完了であればその処理
を実行し(618,619,620,621)、
最後にコード生成/実行部8にてコードを生成し
(622)、データベース処理を実行する(62
3)。実行に当つては、上述したように、上位レ
ベルでのデータベース処理のスケジユーリングに
より、二次記憶内のデータベース・データのフエ
ツチ回数を少くする。すなわち、データベースバ
ツフア14内のデータを有効に利用するととも
に、ソースコマンドの変換により、二次記憶内の
データベース・データを直接アクセスせずにデー
タベースバツフア14内の中間データを利用する
ことにより、少量のデータを対象とする処理要求
として実現し、性能向上を図つている。
After the processing of the command cluster creation/management unit 6 as described above is completed, for each command of the command cluster obtained by the processing unit, the number of input/output times of database data from the secondary storage (database 3), Or required for data processing.
Conventional optimization processing for generating an optimal access path for command processing is performed in the command optimization processing unit 7 by evaluating the command processing cost based on CPU time, etc. (616, 617). Next, it sequentially checks for completion of command cluster processing, completion of command cluster processing, completion of transaction cluster processing, and completion of transaction cluster, and executes the processing if it is not completed. (618, 619, 620, 621),
Finally, the code generation/execution unit 8 generates a code (622) and executes database processing (62).
3). In execution, as described above, by scheduling database processing at a higher level, the number of fetches of database data in secondary storage is reduced. That is, in addition to effectively using the data in the database buffer 14, by converting source commands and using intermediate data in the database buffer 14 without directly accessing the database data in secondary storage, a small amount of data can be saved. This is realized as a processing request targeting the data of , and aims to improve performance.

〔発明の効果〕〔Effect of the invention〕

以上説明したように、本発明によれば、データ
ベースに対する関連する問合せをクラスタリング
し、それに基づいてデータベース処理をスケジユ
ーリングすることにより、データベースバツフア
の効率的利用、および管理が図れ、データベース
に対する問合せの処理効率の向上が実現される。
As described above, according to the present invention, by clustering related queries to a database and scheduling database processing based on the clustering, it is possible to efficiently utilize and manage the database buffer, An improvement in processing efficiency is realized.

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

第1図は本発明の一実施例を示す概念的な全体
構成図、第2図は本発明の一実施例によるトラン
ザクシヨン・クラスタ作成/管理部を説明するた
めの図、第3図、第4図、第5図、および第7図
はトランザクシヨン・クラスタ作成/管理部にて
作成/利用される情報テーブルを説明するための
図、第6図は本発明の一実施例による処理フロー
を示す図、第8図はトランザクシヨン・クラスタ
作成/管理部の処理の具体例を示す図である。 5:トランザクシヨン・クラスタ作成/管理
部、9:トランザクシヨン解析処理手段、10:
トランザクシヨン・クラスタリング処理手段、1
1:トランザクシヨン・クラスタ実行スケジユー
ル策定処理手段、12:トランザクシヨン・クラ
スタ内解析処理手段、13:クラスタ内トランザ
クシヨンのソースコマンド変換、クラスタ内トラ
ンザクシヨンの実行スケジユール策定手段。
FIG. 1 is a conceptual overall configuration diagram showing an embodiment of the present invention, FIG. 2 is a diagram for explaining a transaction cluster creation/management unit according to an embodiment of the present invention, and FIGS. 4, 5, and 7 are diagrams for explaining information tables created/used by the transaction cluster creation/management section, and FIG. 6 shows a processing flow according to an embodiment of the present invention. FIG. 8 is a diagram showing a specific example of processing by the transaction cluster creation/management section. 5: Transaction cluster creation/management unit, 9: Transaction analysis processing means, 10:
Transaction clustering processing means, 1
1: Transaction/cluster execution schedule formulation processing means, 12: Transaction/cluster intra-cluster analysis processing means, 13: Intra-cluster transaction source command conversion, intra-cluster transaction execution schedule formulation processing means.

Claims (1)

【特許請求の範囲】[Claims] 1 リレーシヨナル・データベースに対する端末
からのデータベース処理要求(以下、問合せ、ま
たはトランザクシヨンと呼ぶ)を処理するデータ
ベース処理システムにおいて、複数のトランザク
シヨンを同種データをアクセスするトランザクシ
ヨンごとにクラスタリングするトランザクシヨ
ン・クラスタリング処理手段10と、該トランザ
クシヨン・クラスタリング処理手段により生成さ
れるトランザクシヨン・クラスタのスケジユーリ
ングを行うトランザクシヨン・クラスタ実行スケ
ジユール策定手段11と、該トランザクシヨン・
クラスタ実行スケジユール策定手段により策定さ
れるスケジユールに従つて、各トランザクシヨ
ン・クラスタ内のトランザクシヨン毎にコマンド
群のクラスタリングとコマンド・クラスタのスケ
ジユーリングを行うトランザクシヨン・クラスタ
内解析処理手段12と、該トランザクシヨン・ク
ラスタ内解析処理手段が生成したコマンド・クラ
スタを上記トランザクシヨン・クラスタ実行スケ
ジユールに従つて解析し、ソースコマンドの変換
とクラスタ内トランザクシヨンの実行スケジユー
リングを行うための手段13とからなるトランザ
クシヨンクラスタ作成/管理部を有することを特
徴とするデータベースに対する問合せ処理装置。
1 In a database processing system that processes database processing requests (hereinafter referred to as queries or transactions) from terminals to a relational database, transaction clustering clusters multiple transactions into transactions that access the same type of data. a processing means 10; a transaction cluster execution schedule formulation means 11 for scheduling transaction clusters generated by the transaction clustering processing means;
a transaction intra-cluster analysis processing means 12 that performs clustering of command groups and scheduling of command clusters for each transaction in each transaction cluster according to a schedule determined by a cluster execution schedule formulating means; means 13 for analyzing the command cluster generated by the transaction intra-cluster analysis processing means according to the transaction cluster execution schedule, converting the source command and scheduling the execution of the intra-cluster transaction; 1. A database query processing device comprising a transaction cluster creation/management unit comprising:
JP58186729A 1983-10-07 1983-10-07 Processing system for enquiry to data base Granted JPS6079441A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP58186729A JPS6079441A (en) 1983-10-07 1983-10-07 Processing system for enquiry to data base

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP58186729A JPS6079441A (en) 1983-10-07 1983-10-07 Processing system for enquiry to data base

Publications (2)

Publication Number Publication Date
JPS6079441A JPS6079441A (en) 1985-05-07
JPH0452495B2 true JPH0452495B2 (en) 1992-08-24

Family

ID=16193612

Family Applications (1)

Application Number Title Priority Date Filing Date
JP58186729A Granted JPS6079441A (en) 1983-10-07 1983-10-07 Processing system for enquiry to data base

Country Status (1)

Country Link
JP (1) JPS6079441A (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH01102656A (en) * 1987-10-15 1989-04-20 Fujitsu Ltd Estimation processing system for system performance

Also Published As

Publication number Publication date
JPS6079441A (en) 1985-05-07

Similar Documents

Publication Publication Date Title
US7139783B2 (en) Materialized view system and method
US7275056B2 (en) System and method for transforming queries using window aggregation
Schneider et al. Tradeoffs in processing complex join queries via hashing in multiprocessor database machines
US4769772A (en) Automated query optimization method using both global and parallel local optimizations for materialization access planning for distributed databases
US7720806B2 (en) Systems and methods for data manipulation using multiple storage formats
US7877370B2 (en) Systems and methods for data storage and retrieval using algebraic relations composed from query language statements
CN110059103A (en) A kind of cross-platform unified big data SQL query method
US7457797B2 (en) Method and apparatus for associating logical conditions with the re-use of a database query execution strategy
US7613734B2 (en) Systems and methods for providing data sets using a store of albegraic relations
US7769754B2 (en) Systems and methods for data storage and retrieval using algebraic optimization
CN110019251A (en) A kind of data processing system, method and apparatus
US20020116376A1 (en) Routine executing method in database system
US20050165802A1 (en) Support for executing a group of database statements
US6748377B1 (en) Facilitating query pushdown in a multi-tiered database environment
US8214408B2 (en) Method, database system and computer program for joining temporal database tables
WO2007134278A2 (en) Systems and methods for data storage and retrieval
CN117093599A (en) Unified SQL query method for heterogeneous data sources
US6353819B1 (en) Method and system for using dynamically generated code to perform record management layer functions in a relational database manager
Sinthong et al. AFrame: Extending DataFrames for large-scale modern data analysis (Extended Version)
JPH0452495B2 (en)
Rollins Design and analysis of a complete relational interface for a Multi-Backend Database System.
US11960494B1 (en) Fetching query results through cloud object stores
JP3538322B2 (en) Database management system and query processing method
US7877372B1 (en) Method and system for querying tables stored on multiple processing modules
US20240143595A1 (en) Generating execution tracking rows during query execution via a database system