JP2008234495A - Query processing system of database using multi-operation processing using synthetic relational operation - Google Patents

Query processing system of database using multi-operation processing using synthetic relational operation Download PDF

Info

Publication number
JP2008234495A
JP2008234495A JP2007075670A JP2007075670A JP2008234495A JP 2008234495 A JP2008234495 A JP 2008234495A JP 2007075670 A JP2007075670 A JP 2007075670A JP 2007075670 A JP2007075670 A JP 2007075670A JP 2008234495 A JP2008234495 A JP 2008234495A
Authority
JP
Japan
Prior art keywords
task
processing
tasks
relation
temp
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.)
Granted
Application number
JP2007075670A
Other languages
Japanese (ja)
Other versions
JP4071816B1 (en
Inventor
Toru Furuya
透 降矢
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.)
Individual
Original Assignee
Individual
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 Individual filed Critical Individual
Priority to JP2007075670A priority Critical patent/JP4071816B1/en
Application granted granted Critical
Publication of JP4071816B1 publication Critical patent/JP4071816B1/en
Publication of JP2008234495A publication Critical patent/JP2008234495A/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

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

Abstract

<P>PROBLEM TO BE SOLVED: To propose a method for improving the processing speed of a query. <P>SOLUTION: When the inquiry of a query is input (S110), it is converted into a processing tree configured by a relational operation (S120), and a directly processable task is found out (S130). When the task is found out, whether or not a group accessing a common relation exists in a group column is checked (S140), and when the group accessing the common relation exists in the group column, the task is added to the group (S150). When any group does not exist, the new group is prepared (S160). The tasks having a common partial formula in the group are gathered in a sub-group (S170), and when the tasks are gathered in the sub-group, a composite relational operation task is prepared based on the tasks in the sub-group (S180). The processing of the composite relational operation task in the group is performed at once (S190). When the processing of the composite relational operation ends, the virtual relation is prepared for the tasks in the sub-group, and the relation acquired as the processing result of the composite relational operation task is partially shared (S200). <P>COPYRIGHT: (C)2009,JPO&INPIT

Description

本発明は、データベースのクエリー処理システムに関し、特に、合成関係演算を利用したマルチオペレーション・プロセッシングを用いたクエリーの処理に関するものである。   The present invention relates to a database query processing system, and more particularly to query processing using multi-operation processing using a composition relational operation.

データベース・マネージメント・システム(DBMS)に、一度に数多くのクエリーが問い合わせられると、データベース・マネージメント・システムは、トランザクションの同時処理制御機能を使用して、それぞれの問い合わせ処理を行っている。検索のみのトランザクションはクエリーと呼ばれ、データベース・マネージメント・システムは、問い合わせのあったクエリーを別々に処理しているが、この方法には次のような問題点がある。   When a large number of queries are inquired to the database management system (DBMS) at a time, the database management system performs each inquiry processing by using a transaction concurrent processing control function. A search-only transaction is called a query, and the database management system processes the queried query separately, but this method has the following problems.

問題点(1):従来のデータベース・マネージメント・システムによるクエリー処理方法は、多くのクエリーが共通のリレーションに対して処理を行うと、ディスクから同じデータが何度もメインメモリに読み込まれてアクセスされ、アクセスするたびにブロック内のデータが繰り返しメインメモリに読み込まれて処理が行われる。このため、効率的ではなくクエリーの処理速度が低下するといった問題がある。   Problem (1): In the query processing method by the conventional database management system, when many queries process a common relation, the same data is read from the disk into the main memory and accessed many times. Each time access is made, the data in the block is repeatedly read into the main memory for processing. For this reason, there is a problem that the processing speed of the query is not efficient and the query processing speed is lowered.

問題点(2):従来のデータベース・マネージメント・システムによるクエリー処理方法は、クエリー内のタスク処理を行うたびに、クエリーの中間結果であるタスクの処理結果のリレーションをディスク上に作成している。それぞれのタスクの処理結果では、レコードや属性の選択範囲が重なっているため、ディスク上にレコードや属性の選択範囲の重なっている処理結果のリレーションを数多く作成することになる。このため、ディスクをアクセスする回数が多くなり、クエリーの処理速度が低下するといった問題がある。   Problem (2): In the query processing method according to the conventional database management system, a task processing result relation which is an intermediate result of a query is created on a disk every time task processing in a query is performed. In the processing results of each task, the selection ranges of records and attributes overlap, so many relations of processing results that overlap the selection ranges of records and attributes are created on the disk. For this reason, there are problems that the number of times the disk is accessed increases and the query processing speed decreases.

問題点(3):従来のデータベース・マネージメント・システムによるクエリー処理方法は、クエリーに含まれる結合演算の処理を行うとき、ハッシュ結合などの結合方法を用いている。このため、結合演算の処理を行うたびに、結合演算に使用する検索先のリレーション内のレコードをディスクからアクセスして、メインメモリ内にハッシュテーブル(ハッシュテーブルを検索先のリレーション内のレコードのインデックスとして使用する)を作成することになるので、ディスクをアクセスする回数が多くなり、クエリーの処理速度が低下するといった問題がある。   Problem (3): The conventional query processing method using the database management system uses a join method such as a hash join when processing a join operation included in a query. For this reason, each time a join operation is performed, a record in the search relation used for the join operation is accessed from the disk, and a hash table (hash table is indexed to the record in the search relation in the main memory). This causes a problem that the number of times the disk is accessed increases and the query processing speed decreases.

また、それぞれの結合演算に使用される検索先のリレーションは異なるので、個々の結合演算に対して別々にハッシュテーブルを作成する必要があり、一度に数多くのハッシュテーブルをメインメモリに作成すると、メインメモリに十分なスペースを確保することができなくなり、クエリーの処理速度が低下するといった問題が起こる。   In addition, since the relation of the search destination used for each join operation is different, it is necessary to create a separate hash table for each join operation. If many hash tables are created in the main memory at once, the main memory There is a problem that sufficient space cannot be secured in the memory and the query processing speed is reduced.

(演算と演算結果のキャッシングの問題点)
ディスクをアクセスする回数を減少させてクエリーの処理速度を向上させるために、問い合わせの多いクエリーとクエリーの処理結果、クエリーに含まれる演算(選択演算,射影演算,結合演算などの関係代数)と演算の処理結果(クエリーの中間結果)を一時的にディスクに保存(キャッシング)しておく方法がよく用いられている。ユーザからクエリーの問い合わせがあると、データベース・マネージメント・システムは、問い合わせのあったクエリーと同じクエリーの処理結果がディスクに保存されているかどうかを調べて、保存されているならば、そのクエリーの処理を行わずに、保存されているクエリーの処理結果をそのままユーザに返すことになる。また、クエリーは異なるけれども、クエリーに含まれる演算と同じ演算の処理結果がディスクに保存されているならば、データベース・マネージメント・システムは、その演算の処理を行わずに、すでに存在する演算の処理結果を利用してクエリーの処理を行うことになる。
(Problems of calculation and result caching)
In order to improve the query processing speed by reducing the number of times to access the disk, queries with many queries, query processing results, operations included in queries (relational algebra such as selection operations, projection operations, and join operations) and operations A method of temporarily storing (caching) the processing result (intermediate result of the query) on a disk is often used. When there is a query query from a user, the database management system checks whether the same query processing result as the query that was queried is stored on disk and, if so, the query processing. Without processing, the processing result of the stored query is returned to the user as it is. In addition, even if the query is different, if the processing result of the same operation as the operation included in the query is stored on the disk, the database management system does not process the operation and does not process the existing operation. The query is processed using the result.

この方法は、保存するクエリーの処理結果、演算の処理結果を増やすことで、同じクエリーや演算の処理を繰り返して行うことなしに、クエリーの処理速度を向上させることを目的としている。しかし、この方法は、問い合わせのあったクエリーやクエリーに含まれる演算がディスクに保存しているものと同じでなければならないため、クエリーや演算が異なる場合は、保存されている処理結果を利用することはできない。また、この方法は、データベースに新たなレコードが加えられるなどしてデータベースが更新されると、保存されている処理結果は古くなるので、データベース・マネージメント・システムは、古くなった処理結果を破棄しなければならない。そのためデータベースの更新がたびたび行われると、その都度、古くなった処理結果を破棄しなければならないので、この方法は効率的ではなくなる。マイクロソフト社のSQLサーバーなどのデータベース・マネージメント・システムは、クエリーの処理速度を維持するために、古くなったクエリーの処理結果をすぐには破棄せずに、しばらく古い処理結果をユーザに返すようにしている。   The purpose of this method is to increase the query processing speed by increasing the processing result of the query to be saved and the processing result of the calculation, without repeating the same query or the processing of the calculation. However, this method requires that the query that was queried and the operation included in the query be the same as those stored on the disk, so if the query or operation is different, use the saved processing results. It is not possible. In this method, when a new record is added to the database and the database is updated, the stored processing results become obsolete, so the database management system discards the obsolete processing results. There must be. Therefore, if the database is updated frequently, this method becomes inefficient because an old processing result must be discarded. In order to maintain query processing speed, database management systems such as Microsoft's SQL server do not immediately discard old query processing results, but return old processing results to the user for a while. ing.

(メインメモリへのキャッシングの問題点)
ディスクをアクセスする回数を減少させてクエリーの処理速度を向上させるその他の方法は、クエリーを処理するためによくアクセスされるディスク上のブロックの複製をメインメモリに一時的に保存(キャッシング)しておく方法が用いられる。この方法は、ユーザからクエリーの問い合せがあると、データベース・マネージメント・システムは、クエリーを処理するためにディスクからアクセスするブロックの複製がメインメモリに保存されているかどうかを調べて、保存されているならば、メインメモリ内の複製を利用する。
この方法は、メインメモリ内で保存するブロックの容量を増やしておくことで、ディスクをアクセスする回数を減少させてクエリーの処理速度を向上させることを目的としている。
(Problem of caching to main memory)
Another way to improve query processing speed by reducing the number of disk accesses is to temporarily store (cache) a copy of the frequently accessed blocks on the disk to process the query. Method is used. In this method, when a user queries a query, the database management system checks to see if a copy of the block accessed from disk is stored in main memory to process the query. Then, use a copy in the main memory.
The purpose of this method is to increase the capacity of blocks stored in the main memory, thereby reducing the number of times the disk is accessed and improving the query processing speed.

しかし、この方法は、ディスク上のブロックとメインメモリ上の複製が同じでなければならないため、ブロック内のデータを変更するときには、ディスク上のブロックとメインメモリ上の複製の両方を更新しておかなければならない。また、クエリーを処理するために数ギガバイト(GB)もあるようなデータベースのリレーションを線形探索(スキャン)するような場合は、メインメモリに保存されているブロック以外のほとんどのブロックをディスクからアクセスすることになるので有効ではなくなる。
また、オペレーティング・システム自体もこのようなメモリー管理を行っているため、データベース・マネージメント・システムがメインメモリに保存するブロックの容量を増やすと、メインメモリに保存されたはずのブロックがオペレーティング・システムによって仮想メモリー(ディスク)に移動されることなどが起こり、逆にクエリーの処理速度が低下するといった問題が発生する。
However, this method requires that the block on disk and the replica in main memory be the same, so when changing data in a block, both the block on disk and the replica in main memory must be updated. There must be. In addition, when performing a linear search (scan) of a database relation that has several gigabytes (GB) to process a query, most blocks other than the blocks stored in the main memory are accessed from the disk. It will not be effective.
In addition, since the operating system itself performs such memory management, if the capacity of the block that the database management system stores in the main memory is increased, the block that should have been stored in the main memory may be changed by the operating system. There is a problem that the query processing speed is reduced due to movement to virtual memory (disk).

(クエリー処理のパイプライン化の問題点)
クエリーの中間結果であるタスクの処理結果のリレーションをディスク上に作成しないで、ディスクをアクセスする回数を減少させてクエリーの処理速度を向上させる方法としては、クエリー処理をパイプライン化した方法が用いられる。
クエリー処理をパイプライン化した方法とは、複数のマイクロプロセッサを備えているコンピュータ・システムにおいて、クエリーに含まれるいくつものタスク処理を複数のマイクロプロセッサを用いてパイプラン化し、個々のタスク処理を並列に処理していく方法である。この方法は、クエリーに含まれる個々のタスクの処理結果はストリーム化され、個々のタスク処理が完全に終了するのを待たずして、部分的に終了したタスクの処理結果に対する次のタスク処理を行っていくものである。しかし、パイプライン化できるタスク処理は、選択演算や射影演算などのタスクに限られ、結合演算などのタスクは、結合演算の前に行われるタスク処理が完全に終了してからではないと処理を始めることができないので、パイプライン化することはできない。また、クエリー処理をパイプライン化した方法は、複数のマイクロプロセッサを搭載してあるコンピュータ・システムが必要であるので、マイクロプロセッサを1つしか備えていないコンピュータ・システムでは有効ではない。
(Problems of query processing pipelining)
As a method of improving the query processing speed by reducing the number of times the disk is accessed without creating a relation of the task processing results that are the intermediate results of the query on the disk, a method of pipelining query processing is used. It is done.
Query processing is pipelined in a computer system that has multiple microprocessors. Multiple task processes included in a query are pipelined using multiple microprocessors, and each task process is parallelized. It is a method of processing. In this method, the processing result of each task included in the query is streamed, and the next task processing for the processing result of the partially completed task is performed without waiting for the individual task processing to be completed completely. Is going to go. However, task processing that can be pipelined is limited to tasks such as selection operations and projection operations. Tasks such as join operations are processed only after the task processing performed before the join operation is completed. It can't be started, so it can't be pipelined. Also, the method of pipelining query processing requires a computer system equipped with a plurality of microprocessors, and is not effective in a computer system having only one microprocessor.

発明者が参考にした参考文献を以下に記載する。
問い合わせの多いクエリーとクエリーの処理結果、クエリーに含まれる演算(選択演算、射影演算、結合演算などの関係代数)と演算の処理結果(クエリーの中間結果) を一時的にディスクに保存(キャッシング)しておくことを記載したものとして、以下に記載する非特許文献1〜6がある。
クエリーを処理するためにアクセスされるディスク上のブロックの複製をメインメモリーに一時的に保存(キャッシング)しておくことを記載したものとして、非特許文献7〜11がある。
また、クエリー処理のパイプライン化を記載したものとしては、非特許文献12がある。
Finkelstein, S. Common Expression Analysis in Database Applications. In Proceedings of the International Conference of the Management of Data(SIGMOD'82, Orland, Florida, June 2-4), 1982 Yigal Arens and Craig A. Knoblock. Intelligent Cashing: Selecting, Representing and Reusing Data in an Information Server. ACM Press, Proceedings of the third international conference on Information and knowledge management, November 1994 Hyunchul Kang, Seungchul Han, Younghyum Kim. Schemes of Storing XML Query Cache. Proceedings of the sixteenth Australasian database conference, Volume 39 ADC 2005 Bhushan Mandhani, Dan Suciu, Query Caching and View Selection for XML Databases, Proceedings of the 31st international conference on Very large data bases,VLDB 2005 Michael J. Carey, Michael J. Franklin, Miron Livny, and Eugene J. Shekita. Data caching tradeoffs in client-server DBMS architectures. In Proceedings of the ACM SIGMOD, pages 357-366, 1991 TIMOS K. SELLIS. Multiple-Query Optimization. ACM Transactions on Database Systems, Vol. 13, No. 1, Pages 23-52, March 1988. Giovanni Mario Sacco and Mario Schkolnick. Buffer Management in Relational Database Systems. ACM Transactions on Database Systems, Volume 11, no. 4, pp. 473-498, December 1986 Chou, H. And DeWitt, D. An Evaluation of Buffer Management Strategies for Relational Database Systems. Proceedings of VLDB, 1985 O'Neil EJ, O'Neil PE, Weikum G. The LRU-K Page Replacement Algorithm For Database Disk Buffering. In ACM SIGMOD Conf., 1993, Washington, D.C., pp 297-306 Zhifeng Chen, Yan Zhang, Yuanyuan Zhou. Empirical Evaluation of Multi-level Buffer Cache Collaboration for Storage systems. ACM SIGMETRICS international conference on Measurement and modeling of computer systems SIGMETRICS 2005, Volume 33 Issue 1 Michael Stonebraker. Operating System Support for Database Management. Communications of The ACM, 24(7):412-18, July 1981 David J. DeWitt and Jim Gray. Parallel Database Systems: The Future of High Performance Database Processing. Communications of The ACM, Vol. 36, No. 6, June 1992
References referred to by the inventors are described below.
Queries with many queries and query processing results, relational algebra included in queries (selection, projection, join operations, etc.) and processing results (intermediate results of queries) are temporarily saved to disk (caching) Non-Patent Documents 1 to 6 described below are listed as what is described.
Non-patent documents 7 to 11 describe that a copy of a block on a disk to be accessed for processing a query is temporarily stored (cached) in a main memory.
Non-patent document 12 describes the query processing pipeline.
Finkelstein, S. Common Expression Analysis in Database Applications.In Proceedings of the International Conference of the Management of Data (SIGMOD'82, Orland, Florida, June 2-4), 1982 Yigal Arens and Craig A. Knoblock. Intelligent Cashing: Selecting, Representing and Reusing Data in an Information Server.ACM Press, Proceedings of the third international conference on Information and knowledge management, November 1994 Hyunchul Kang, Seungchul Han, Younghyum Kim.Schemes of Storing XML Query Cache.Proceedings of the sixteenth Australasian database conference, Volume 39 ADC 2005 Bhushan Mandhani, Dan Suciu, Query Caching and View Selection for XML Databases, Proceedings of the 31st international conference on Very large data bases, VLDB 2005 Michael J. Carey, Michael J. Franklin, Miron Livny, and Eugene J. Shekita.Data caching tradeoffs in client-server DBMS architectures.In Proceedings of the ACM SIGMOD, pages 357-366, 1991 TIMOS K. SELLIS. Multiple-Query Optimization. ACM Transactions on Database Systems, Vol. 13, No. 1, Pages 23-52, March 1988. Giovanni Mario Sacco and Mario Schkolnick.Buffer Management in Relational Database Systems.ACM Transactions on Database Systems, Volume 11, no. 4, pp. 473-498, December 1986 Chou, H. And DeWitt, D. An Evaluation of Buffer Management Strategies for Relational Database Systems.Proceedings of VLDB, 1985 O'Neil EJ, O'Neil PE, Weikum G. The LRU-K Page Replacement Algorithm For Database Disk Buffering. In ACM SIGMOD Conf., 1993, Washington, DC, pp 297-306 Zhifeng Chen, Yan Zhang, Yuanyuan Zhou.Empirical Evaluation of Multi-level Buffer Cache Collaboration for Storage systems.ACM SIGMETRICS international conference on Measurement and modeling of computer systems SIGMETRICS 2005, Volume 33 Issue 1 Michael Stonebraker.Operating System Support for Database Management.Communications of The ACM, 24 (7): 412-18, July 1981 David J. DeWitt and Jim Gray.Parallel Database Systems: The Future of High Performance Database Processing. Communications of The ACM, Vol. 36, No. 6, June 1992

以上に述べたような解決方法は、数多くのデータベース・マネージメント・システムに採用されているが、問題点もあるために必ずしも効率的な方法ではない。
本発明では、これらの解決方法とは別に、独自に考案するクエリーの処理方法を用いて、ディスクをアクセスする回数を減少させ、クエリーの処理速度を向上させる方法を提案する。
The solutions described above have been adopted in many database management systems, but are not always efficient due to problems.
In addition to these solutions, the present invention proposes a method for improving the query processing speed by reducing the number of times the disk is accessed by using a query processing method devised independently.

上記発明の目的を達成するために、本発明は、合成関係演算を利用したマルチオペレーション・プロセッシングを用いたデータベースのクエリー処理システムであって、前記クエリーを関係代数による処理ツリーに変換する処理ツリー変換手段と、前記処理ツリーから、トポロジカルソートにより、関係代数を他の関係代数の結果に依存しないで実施できる順番に、タスクとして取り出すタスク取り出し手段と、前記取り出したタスクを、前記データベースのリレーションごとにグループ分けするクループ分け手段と、グループ分けされた前記タスクに対して、共通部分式を持つタスクをさらにサブグループに集め、合成関係演算タスクを作成する合成関係演算作成手段と、前記グループ分けされたタスクごとに、作成された前記合成関係演算タスクとサブグループに集まらないタスクとに対してマルチオペレーション・プロセッシングを行うマルチオペレーション・プロセッシング手段と、グループ内の前記合成関係演算タスクの処理結果として得られたリレーションに対して、前記合成関係演算に含まれる個々のタスクが、そのリレーションのレコード及び/又は属性を部分的に共有するように、格納位置による仮想リレーションを作成する仮想リレーション作成手段とを備えることを特徴とする。   In order to achieve the above object, the present invention provides a database query processing system using multi-operation processing using a composition relational operation, wherein the query is converted into a processing tree based on a relational algebra. Means for extracting relational algebra from the processing tree as a task by topological sorting in an order in which the relational algebra can be implemented without depending on the result of other relational algebra, and the extracted task for each relation of the database. A grouping means for grouping, a task having common sub-expressions for the grouped tasks, and a synthetic relational calculation creating means for creating a synthetic relational calculation task by collecting the tasks having a common sub-expression into the subgroup, and the grouped For each task, the created composite performance is created. Multi-operation processing means for performing multi-operation processing on tasks and tasks that do not gather in a subgroup, and the relation obtained as a result of the processing of the composite relation calculation task in the group Each of the included tasks includes virtual relation creating means for creating a virtual relation based on the storage position so that the records and / or attributes of the relation are partially shared.

前記合成関係演算作成手段は、サブグループに集めた複数の選択演算タスクで使用する属性名と属性数が等しいときに、それらの属性の中の1つの属性に関する選択条件だけが異なった条件かまたは同じ条件であり、それ以外の属性に関する選択条件はまったく同じであるならば、それらの選択条件をブール演算のORを使用して接続し、接続した選択条件から選択範囲の重複した部分を取り除くために、簡潔化して最適化した選択条件を作成し、その選択条件を用いて複数の選択演算タスクの合成関係演算を作成するとよい。
前記合成関係演算作成手段は、サブグループに集めた複数の射影演算タスクが、共通のリレーションに対して射影演算の処理を行うならば、これらの射影演算タスクの属性の和集合を求めて得られた属性を用いて、複数の射影演算タスクの合成関係演算を作成するとよい。
前記仮想リレーション作成手段は、仮想リレーションのレコードに対してタスクが検索処理を行う場合、仮想リレーションが部分的に共有するリレーションの検索に使用する属性に対して、インデックスを作成するとよい。前記グループ分け手段は、前記合成関係演算タスクの処理結果として得られたリレーションごとにも、タスクをグループ分けするとよい。
上述した合成関係演算を利用したマルチオペレーション・プロセッシングを用いたデータベースのクエリー処理システムの各機能を、コンピュータ・システムに実現させるためのプログラムやプログラムを記録した記録媒体も本発明である。
When the attribute name and the number of attributes used in the plurality of selection calculation tasks collected in the subgroup are equal, the composition relation calculation creation means is a condition in which only a selection condition relating to one attribute among the attributes is different or If the selection conditions for the other attributes are exactly the same, connect the selection conditions using a Boolean OR, and remove the duplicated part of the selection from the connected selection conditions In addition, it is preferable to create a selection condition that is simplified and optimized, and to create a composite relation calculation of a plurality of selection calculation tasks using the selection condition.
If the plurality of projection calculation tasks collected in the subgroup perform projection calculation processing on a common relation, the composite relation calculation creation means can obtain the union of the attributes of these projection calculation tasks. It is preferable to create a composition relation calculation of a plurality of projection calculation tasks using the attribute.
The virtual relation creating means may create an index for an attribute used for searching for a relation partially shared by the virtual relation when the task performs a search process on the record of the virtual relation. The grouping means may group the tasks for each relation obtained as a result of the synthesis-related calculation task.
The present invention also relates to a program for causing a computer system to realize each function of the database query processing system using multi-operation processing using the above-described composite relational operation, and a recording medium on which the program is recorded.

独自のタスクに関する共通部分式を定義し、合成関係演算を利用したマルチオペレーション・プロセッシングを用いたクエリー処理を行うことによって、マルチオペレーション・プロセッシングのみを用いたクエリー処理よりも効率よくクエリー処理を行うことができるようになった。
その方法は、グループ内の共通部分式を持つタスクをさらにサブグループに集めて、サブグループに集めたいくつかのタスクを1つの合成関係演算タスクに置き換えて処理を行うことになる。また、サブグループ内の個々のタスクは、仮想リレーションを用いて、合成関係演算タスクの処理結果として得られたリレーションを部分的に共有することになり、従来のクエリー処理のように、選択範囲及び/又は属性の重なっている数多くの処理結果のリレーションをディスク上に別々に作成することがなくなり、ディスクをアクセスする回数を減少させ、クエリーの処理速度が向上させることができた。
Perform query processing more efficiently than query processing using only multi-operation processing by defining common sub-expressions related to unique tasks and performing query processing using multi-operation processing using synthetic relational operations Can now.
In this method, tasks having common sub-expressions in the group are further collected into subgroups, and several tasks collected in the subgroup are replaced with one composite relational calculation task for processing. In addition, each task in the subgroup uses the virtual relation to partially share the relation obtained as a result of the processing of the synthetic relation calculation task. It is no longer necessary to separately create relations of many processing results having overlapping attributes on the disk, reducing the number of times the disk is accessed and improving the query processing speed.

また、仮想リレーションのレコードに対してタスクが検索処理を行う場合、仮想リレーションが部分的に共有する合成関係演算タスクの処理結果として得られたリレーションの検索に使用する属性に対して、インデックスを作成することによって、そのインデックスを他のタスクも共有して検索処理を行うことができるようになり、ディスクをアクセスする回数を減少させて、クエリーの処理速度を向上させることができた。   In addition, when a task performs a search process on a record of a virtual relation, an index is created for the attribute used to search for the relation obtained as a result of the processing of a synthetic relation calculation task partially shared by the virtual relation By doing so, it is possible to share the index with other tasks and perform the search process, and it is possible to reduce the number of times of accessing the disk and to improve the query processing speed.

また、合成関係演算タスクの処理結果として得られたリレーションのアクセス領域ごとにも、タスクをグループ分けすることによって、そのリレーションの共通ブロック上でタスク処理を一度に行うことができるようになり、ディスクをアクセスする回数を減少させ、極めて効率的にタスク処理を行うことができるようになった。
実際の処理結果からもわかるように、これまで広く使用されているMySQL.Ver3や以前のマルチオペレーション・プロセッシングのみを用いたクエリー・プロセッサよりも一段と数多くのクエリーの処理を高速に行うことができるようになった。
In addition, by grouping tasks for each relation access area obtained as a result of the processing of the composition-related operation task, task processing can be performed at once on the common block of the relation. The number of accesses can be reduced and task processing can be performed very efficiently.
As can be seen from the actual processing results, it is possible to process many more queries at a higher speed than MySQL.Ver3, which has been widely used so far, and a query processor that used only multi-operation processing. Became.

従来の技術の問題点(1)の解決方法として、ディスクなどの2次記憶装置へのアクセスを減らしてクエリーの処理速度を向上させるために、本発明者も「マルチオペレーション・プロセッシングによるデータベースのクエリー処理の向上」について提案した(特願2006−356406号参照)。マルチオペレーション・プロセッシングは、いくつかのタスクが共通のリレーションに対して処理を行うときに、それらのタスクをグループに集め、グループ内の各タスクに対してアクセスプランを作成し、アクセスプランをもとにして、それぞれのタスクによるディスク内のリレーションのブロックへのアクセスから得られる共通ブロック(Common Block)を見つけ、その共通ブロックを使用して、グループに集められたタスクの処理を一度に行うものである。   As a solution to the problem (1) of the prior art, the present inventor has also proposed "a database query by multi-operation processing" in order to improve the query processing speed by reducing access to a secondary storage device such as a disk. "Improvement of processing" was proposed (see Japanese Patent Application No. 2006-356406). In multi-operation processing, when several tasks operate on a common relation, they are grouped together and an access plan is created for each task in the group. The common block (Common Block) obtained by accessing the relation block in the disk by each task is found, and the tasks collected in the group are processed at once using the common block. is there.

この方法は、それぞれのタスクごとにディスク内のブロックにアクセスすることを回避して、共通ブロックでいくつかのタスクを一度に処理することによって、クエリー(全体のタスク)の処理速度を向上させることをめざしている。このマルチオペレーション・プロセッシングの処理を行うに当たって、本発明者は、前述の出願において、ダイナミックマルチオペレーション・プロセッシング(Dynamic Multi-Operation Processing)とスタティックマルチオペレーション・プロセッシング(Static Multi-Operation Processing)との2つの処理方法を提案した。   This method avoids accessing the blocks in the disk for each task and improves the processing speed of the query (the whole task) by processing several tasks at once in the common block Aiming for In carrying out this multi-operation processing, the present inventor, in the above-mentioned application, invented two types of dynamic multi-operation processing (Dynamic Multi-Operation Processing) and static multi-operation processing (Static Multi-Operation Processing). A processing method was proposed.

ダイナミックマルチオペレーション・プロセッシングは、グループ内の各タスクに対してアクセスプランを作成し、アクセスプランから各タスクの処理コストを計算し、求められた処理コストを参照して、処理コストの小さいタスクから順番にタスク処理を行うものである。この処理では、当面のタスク(処理コストの小さいタスク)の処理を行うためにアクセスしたブロックにおいて、グループ内の他のタスクも処理を行う必要がある場合は、アクセスしたブロックは共通ブロックとなり、共通ブロックでこれらのタスク処理を一度に行う。当面のタスク処理が終了し、グループ内で次に処理コストの小さいタスクの処理を行うときは、すでにアクセスしたブロックでの当面のタスクを含むグループ内の個々のタスク処理は終了しているので、まだアクセスしていない残りのブロックの中から、次に処理コストの小さいタスク処理を行うために必要とされるブロックをアクセスする。アクセスしたブロックにおいて、グループ内の他のタスク(残りのタスク)も処理を行う必要がある場合は、アクセスしたブロックは共通ブロックとなり、共通ブロックでこれらのタスク処理を一度に行う。このようにしてグループ内の残りのタスクに対しても繰返してタスク処理を行っていくものである。   Dynamic multi-operation processing creates an access plan for each task in the group, calculates the processing cost of each task from the access plan, refers to the calculated processing cost, and starts from the task with the lowest processing cost. Task processing is performed. In this process, if it is necessary to process other tasks in the group in the block accessed to perform the current task (task with low processing cost), the accessed block becomes a common block. These tasks are processed at once in a block. When the current task processing is finished and the next task with the lowest processing cost is processed in the group, the individual task processing in the group including the current task in the already accessed block has been completed. From the remaining blocks that have not yet been accessed, a block that is required for performing task processing with the next lowest processing cost is accessed. In the accessed block, when other tasks in the group (remaining tasks) need to be processed, the accessed block becomes a common block, and these task processes are performed at a time in the common block. In this way, task processing is repeated for the remaining tasks in the group.

また、スタティックマルチオペレーションは、グループ内の各タスクからアクセスプランを作成し、アクセスプランから各タスクの処理コストを求め、求めた処理コストを参照して、処理コストの1番小さいタスクから処理コストの1番大きいタスクへと順番にグループ内の各タスクを並べることにする。ここまでは、ダイナミックマルチオペレーション・プロセッシングと同じ手順である。次にデータベースのインデックスを使用して、グループ内の各タスクが、共通のリレーション内のブロックからタスク処理を行うためにアクセスする必要のあるブロックを調べて、各タスクに対応するブロック集合に集める。次に、前に求めた処理コストの小さいタスクから処理コストの大きいタスクまでの順番にしたがって、各タスクに対応するブロック集合の和集合を求めていくことによって、アクセスするブロックの順位を決定する。その順位にしたがって共通のリレーション内のブロックをディスクからアクセスし、このブロックを共通ブロックとして、このブロック上で処理を行う必要のあるグループ内のタスク処理を一度に処理していく方法である。この方法は、アクセスすべきブロック(共通ブロック)の順位にしたがって、和集合、積集合及び差集合などの集合論を用いて、クエリーに含まれる各タスクの処理をきわめて論理的に行うものである。   Static multi-operation creates an access plan from each task in the group, obtains the processing cost of each task from the access plan, refers to the obtained processing cost, and determines the processing cost from the task with the smallest processing cost. The tasks in the group are arranged in order from the largest task. Up to this point, the procedure is the same as that for dynamic multi-operation processing. Then, using the database index, each task in the group examines the blocks that need to be accessed to perform task processing from the blocks in the common relation, and collects them in a block set corresponding to each task. Next, the order of the blocks to be accessed is determined by obtaining the union of the block sets corresponding to each task in accordance with the order from the task with the lowest processing cost to the task with the higher processing cost. According to this order, blocks in a common relation are accessed from the disk, and this block is set as a common block, and task processing within a group that needs to be processed on this block is processed at once. This method performs logical processing of each task included in a query using set theory such as union, product set, and difference set according to the order of blocks to be accessed (common blocks). .

今回は、上述の問題点(1)の解決方法のさらなる改善と、問題点(2),(3)を解決するため、データベースに問い合わせのあった数多くのクエリーを効率よく処理することができる合成関係演算を利用したマルチオペレーション・プロセッシングを提案する。合成関係演算を利用したマルチオペレーション・プロセッシングは、マルチオペレーション・プロセッシングに独自に定義する合成関係演算を利用した処理方法を加えることによって、前述のマルチオペレーション・プロセッシングを用いたクエリーの処理よりもさらに数多くのタスクの処理を一度に行い、ディスクへのアクセスを少なくして、ユーザから問い合わせのあった数多くのクエリーをすばやく処理していく方法である。   This time, in order to solve the above problem (1) and to solve the problems (2) and (3), it is possible to efficiently process many queries that have been inquired in the database. We propose multi-operation processing using relational operations. Multi-operation processing using synthetic relational operations is much more than the above-mentioned query processing using multi-operation processing by adding processing methods using synthetic relational operations that are uniquely defined to multi-operation processing. It is a method that processes many tasks at once, reduces disk access, and quickly processes many queries from users.

以下で詳しく説明する合成関係演算を利用したマルチオペレーション・プロセッシングは、ユーザから問い合わせがあったクエリーが、クエリーの最適化によってクエリーの処理ツリーが作成されると、処理ツリー上の接点であるタスクをトポロジカルソートの順番で、他のタスクから依存がなく、直接的に処理できるタスクを見つけ、これらのタスクを、それぞれのタスクがアクセスするデータベースのリレーションをもとにグループに分ける。次に、グループ内のタスクをさらに共通部分式ごとにサブグループに集めて、それぞれのサブグループに対して、サブグループ内のタスクをもとに合成関係演算タスクを作成し、マルチオペレーション・プロセッシングを使用して、合成関係演算タスクを含むグループ内のタスクの処理を一度に行うものである。   Multi-operation processing using composition-related operations, which will be described in detail below, is a query that has been queried by the user. When a query processing tree is created by query optimization, tasks that are points of contact on the processing tree are displayed. In the order of topological sort, a task that can be directly processed without dependency from other tasks is found, and these tasks are divided into groups based on the relation of the database accessed by each task. Next, the tasks in the group are further grouped into subgroups for each common subexpression, and for each subgroup, a composite relation operation task is created based on the tasks in the subgroup, and multi-operation processing is performed. Used to process the tasks in the group including the composition related calculation task at once.

合成関係演算タスクの処理結果は、サブグループ内の個々のタスクの処理結果のすべてを含んでいるために、サブグループ内のタスクは、合成関係演算タスクの処理結果として得られたリレーションを部分的に共有することになる。
合成関係演算タスクの処理結果を部分的に共有していることを示すために、サブグループ内の個々のタスクに対して格納位置による仮想リレーションを作成し、仮想リレーションに合成関係演算タスクの処理結果を共有するために必要な情報を記録しておく。
合成関係演算タスクが選択演算の場合には、選択条件に使用された属性で整列された処理結果であるリレーションを作成し、仮想リレーションとして、共有する合成関係演算タスクの処理結果のリレーション名、レコードの格納位置(レコードの行範囲、レコードが格納してあるブロックの番号とアドレス)などの情報を記録しておく。
合成関係演算タスクが射影演算の場合には、仮想リレーションとして、共有する合成関係演算タスクの処理結果のリレーション名、属性の格納位置(列番号)などの情報を記録しておく。
仮想リレーションにこれらの情報を記録しておくことによって、仮想リレーションを用いて処理を行うタスクは、合成関係演算タスクの処理結果の中から必要なレコードをすばやく取り出すことができるようになる。このように、合成関係演算を利用したマルチオペレーション・プロセッシングは、サブグループに集められたいくつかのタスクを1つの合成関係演算タスクに置き換えて処理を行い、サブグループ内の個々のタスクは、仮想リレーションを通して、合成関係演算タスクの処理結果のリレーションを部分的に共有することになる。このため、サブグループ内の個々のタスクの間で選択範囲及び/又は属性列の重なっているレコードを含んだ処理結果のリレーションをディスク上に別々に作成する必要がなくなり、ディスクをアクセスする回数を減らすことができるようになり、そのことによってクエリーの処理速度を向上させることが可能となる。
Since the processing result of the composite relational operation task includes all of the processing results of the individual tasks in the subgroup, the task in the subgroup partially uses the relation obtained as the processing result of the composite relational operation task. Will share with you.
In order to show that the processing result of the composite relational calculation task is partially shared, a virtual relation based on the storage position is created for each task in the subgroup, and the processing result of the composite relational calculation task is added to the virtual relation. Record the information you need to share.
If the synthetic relational calculation task is a selection calculation, create a relation that is the processing result arranged by the attribute used in the selection condition, and use the relation name and record of the processing result of the synthetic relational calculation task to be shared as a virtual relation The information such as the storage position (the row range of the record, the number and address of the block in which the record is stored) is recorded.
When the composition relation calculation task is a projection calculation, information such as the relation name of the processing result of the composition relation calculation task to be shared and the storage position (column number) of the attribute is recorded as a virtual relation.
By recording these pieces of information in the virtual relation, a task that performs processing using the virtual relation can quickly extract a necessary record from the processing result of the composition relation calculation task. In this way, multi-operation processing using composite relational operations is performed by replacing several tasks collected in a subgroup with one composite relational calculation task, and each task in the subgroup is virtual Through the relation, the relation of the processing result of the composition related calculation task is partially shared. For this reason, it is not necessary to create relations of processing results including records with overlapping selection ranges and / or attribute columns between individual tasks in the subgroup, and the number of times the disk is accessed can be reduced. It is possible to reduce this, and it is possible to improve the query processing speed.

また、仮想リレーションのレコードに対してタスクが検索処理を行う場合は、仮想リレーションが部分的に共有する、合成関係演算タスクの処理結果として得られたリレーションの検索に使用する属性に対して、インデックスを作成しておく。そのことによって、共通の属性を用いて検索処理を行う他のタスクもインデックスを共有してレコードを検索することができるようになり、従来のハッシュ法を用いた結合演算処理のように、それぞれの結合演算タスクに対してメインメモリ内にハッシュテーブルを別々に作成する必要がなくなり、ディスクをアクセスする回数を減少させて、クエリーの処理速度を向上させることが可能となる。
さらに、仮想リレーションを用いて合成関係演算タスクの処理結果に対して処理を行うタスクは、仮想リレーションをもとにしてグループ分けをするのではなく、(仮想リレーションを包含している)合成関係演算タスクの処理結果として得られるリレーションをもとにグループ分けを行って、マルチオペレーション・プロセッシングを使用してこれらのタスク処理を一度に行うものとする。マルチオペレーション・プロセッシングを使用してこれらのタスク処理を一度に行うことによって、合成関係演算タスクの処理結果得られたリレーションは、何度もアクセスされることがなくなり、クエリーの処理速度を向上させることが可能となる。
以上に述べた方法を用いてクエリーからのタスク処理を行うことによって、合成関係演算を利用したマルチオペレーション・プロセッシングは、マルチオペレーション・プロセッシングだけを用いたタスク処理よりも、効率よくタスク処理を一度に行うことができるようになり、ディスクをアクセスする回数を減少させて、クエリーの処理速度を向上させることが可能となる。
In addition, when a task performs a search process on a record of a virtual relation, an index is used for the attribute used to search for the relation obtained as a result of the processing of the synthetic relation calculation task that is partially shared by the virtual relation. Create. As a result, other tasks that perform a search process using a common attribute can also search for a record by sharing an index. Like a conventional join operation process using a hash method, There is no need to create a separate hash table in the main memory for the join operation task, and the query access speed can be improved by reducing the number of disk accesses.
In addition, tasks that perform processing on the processing results of the composite relation calculation task using virtual relations are not grouped based on virtual relations, but are combined relation calculations (including virtual relations). It is assumed that grouping is performed based on the relation obtained as a result of task processing, and these task processes are performed at once using multi-operation processing. By performing these task processing at once using multi-operation processing, the relation obtained as a result of the processing of the composition relation operation task will not be accessed many times and the query processing speed will be improved. Is possible.
By performing task processing from a query using the method described above, multi-operation processing using composition-related operations performs task processing more efficiently than task processing using only multi-operation processing. It is possible to increase the query processing speed by reducing the number of times the disk is accessed.

以下で、図面を参照して、本発明の実施形態について詳しく説明する。
まず、本発明の合成関係演算を利用したマルチオペレーション・プロセッシングの概要を説明する。
Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.
First, an outline of multi-operation processing using the composition-related operation of the present invention will be described.

[1.合成関係演算を利用したマルチオペレーション・プロセッシング]
合成関係演算を利用したマルチオペレーション・プロセッシングは、ユーザから問い合わせのあったクエリーがクエリーの最適化によって、関係代数で構成された処理ツリーに変換されると、処理ツリー上の接点であるタスクをトポロジカルソートの順番で、他のタスクから依存がなく、直接的に処理できるタスクを見つける。そして、これらのタスクを、それぞれのタスクがアクセスするデータベースのリレーションをもとにグループ分けを行い、さらにグループ内のタスクを共通部分式ごとにサブグループに集めて、それぞれのサブグループに対して、サブグループ内のタスクをもとに合成関係演算タスクを作成する。その後、マルチオペレーション・プロセッシングを使用して合成関係演算タスクを含むグループ内のタスクの処理を一度に行うものである。
[1. Multi-operation processing using synthetic relational operations]
In multi-operation processing using synthetic relational operations, when a query queried by a user is converted to a processing tree composed of relational algebras by query optimization, tasks that are contact points on the processing tree are topologically processed. In the sort order, find a task that can be processed directly without dependency from other tasks. Then, these tasks are grouped based on the relation of the database accessed by each task, and the tasks in the group are collected into subgroups for each common subexpression, and for each subgroup, Create a composition-related operation task based on the tasks in the subgroup. Thereafter, multi-operation processing is used to process the tasks in the group including the composition related calculation task at a time.

[1−1.データベースシステムのアーキテクチャ]
図1は、本文で説明したクエリーの処理方法を用いたデータベースシステムのアーキテクチャの例である。ここで示した構成は、基本的に、上述した本発明者が出願した特願2006−356406号の図1と同様のものである。
図1において、クエリーQ1〜Q6をユーザから問い合わせのあったクエリーとして扱い、データベースのアーキテクチャを説明していくことにする。クエリーQ1〜Q6は、クエリー・オプティマイザー(問い合わせ最適化処理)(900)によって最適化され、関係代数で構成された処理ツリーP1〜P6(902)に変換される。クエリー・プロセッサ(901)は、クエリー・オプティマイザー(900)とマルチオペレーション・プロセッサ(マルチオペレーション・プロセッシングを行うプロセッサ)(905)を制御している。
クエリーの一連の処理を行うクエリー・プロセッサ(901)は、処理ツリーP1〜P6からトポロジカルソートの順番で、他のタスクから依存がなく、直接的に処理できるタスクt1 1,t1 3,t1 7,t1 9,t2 1,t2 3,t2 4,t3 1,t3 2,t4 1,t4 2,t5 1,t5 2,t6 1,t6 3(903)を見つける。次に、クエリー・プロセッサは、これらの直接的に処理できるタスクをそれぞれのタスクがアクセスするデータベースのリレーションをもとにしてグループG1〜G4に分ける。タスクt1 3,t2 1,t3 2,t4 1,t5 1,t6 3をグループG1に集め、タスクt1 1,t2 3,t3 1,t6 1をグループG2に集め、タスクt1 7,t2 4をグループG3に集め、タスクt1 9,t4 2,t5 2をグループG4に集める。
[1-1. Database system architecture]
FIG. 1 shows an example of the architecture of a database system using the query processing method described in the text. The configuration shown here is basically the same as that shown in FIG. 1 of Japanese Patent Application No. 2006-356406 filed by the inventor described above.
In FIG. 1, the queries Q1 to Q6 are treated as queries inquired by the user, and the database architecture will be described. Query Q1~Q6 is optimized by the query optimizer (Query optimization) (900), it is converted to the processing tree P 1 to P 6 composed of a relational algebra (902). The query processor (901) controls a query optimizer (900) and a multi-operation processor (processor that performs multi-operation processing) (905).
A query processor (901) that performs a series of processing of queries has tasks t 1 1 and t 1 3 that can be directly processed without dependency from other tasks in the order of topological sort from processing trees P 1 to P 6. , T 1 7 , t 1 9 , t 2 1 , t 2 3 , t 2 4 , t 3 1 , t 3 2 , t 4 1 , t 4 2 , t 5 1 , t 5 2 , t 6 1 , t Find 6 3 (903). Next, the query processor divides these tasks that can be directly processed into groups G1 to G4 based on the relation of the database accessed by each task. Tasks t 1 3 , t 2 1 , t 3 2 , t 4 1 , t 5 1 , t 6 3 are collected in group G1, and tasks t 1 1 , t 2 3 , t 3 1 , t 6 1 are grouped in group G2 Then, tasks t 1 7 and t 2 4 are collected in group G3, and tasks t 1 9 , t 4 2 and t 5 2 are collected in group G4.

グループにタスクを集めると、クエリー・プロセッサは、共通部分式を持つタスクをさらにサブグループに集める。タスクt1 3,t3 2,t6 3をサブグループSG1G1集め、タスクt4 1,t5 1をサブグループSG2G1に集め、タスクt2 3,t3 1をサブグループSG1G2に集め、タスクt1 7,t2 4をサブグループSG1G3に集めることになる。クエリー・プロセッサは、サブグループにタスクを集めると、サブグループに対して合成関係演算タスクを作成する。
サブグループSG1G1に対して合成関係演算タスクtG1 SG1を作成し、サブグループSG2G1に対して合成関係演算タスクtG1 SG2を作成し、サブグループSG1G2に対して合成関係演算タスクtG2 SG1を作成し、サブグループSG1G3に対して合成関係演算タスクtG3 SG1を作成する。合成関係演算タスクを作成すると、クエリー・プロセッサは、グループG1〜G4をグループ列(キュー)(904)に挿入する。
When collecting tasks into groups, the query processor further collects tasks with common subexpressions into subgroups. Tasks t 1 3 , t 3 2 , and t 6 3 are collected in subgroup SG1 G1 , tasks t 4 1 and t 5 1 are collected in subgroup SG2 G1 , and tasks t 2 3 and t 3 1 are collected in subgroup SG1 G2 . Tasks t 1 7 and t 2 4 are collected in subgroup SG1 G3 . When the query processor collects tasks in subgroups, it creates a composition relation operation task for the subgroups.
Create a composite relation calculation task t G1 SG1 for subgroup SG1 G1 , create a composite relation calculation task t G1 SG2 for subgroup SG2 G1 , and create a composite relation calculation task t G2 SG1 for subgroup SG1 G2 . And a composite relational calculation task t G3 SG1 is created for the subgroup SG1 G3 . When the composite relational calculation task is created, the query processor inserts the groups G1 to G4 into the group column (queue) (904).

グループの処理を行うマルチオペレーション・プロセッサ(905)は、利用できるプロセスの数(ここでは例として4つのプロセスを用意している)にしたがって、グループ列(キュー)からグループG1〜G4を取り出し、用意しているそれぞれのプロセスにマルチオペレーション・プロセッシングを使用してグループの処理を行わせる。ここでは、プロセス1がグループG1の処理を行い、プロセス2がグループG2の処理を行い、プロセス3がグループG3の処理を行い、プロセス4はグループG4の処理を行うことにする。これらのプロセスの処理は、オペレーティングシステム(OS)のプロセスのスケジューリングによって同時に処理されることになる。また、データベースサーバーに複数のCPU(907)を備えているならば、それぞれのプロセスによるグループの処理は、別々のCPU上で並列に処理されることになる。   The multi-operation processor (905) that performs group processing takes out groups G1 to G4 from the group queue (queue) according to the number of available processes (four processes are prepared here as an example), and prepares them. Have each of the processes doing group processing using multi-operation processing. Here, it is assumed that process 1 performs group G1, process 2 performs group G2, process 3 performs group G3, and process 4 performs group G4. The processes of these processes are processed simultaneously by scheduling of the operating system (OS) process. If the database server includes a plurality of CPUs (907), group processing by each process is performed in parallel on different CPUs.

まず、プロセス1が、グループG1内の合成関係演算タスクtG1 SG1,tG1 SG2、及びサブグループに集まらないタスクt2 1の処理を、t2 1,tG1 SG1,tG1 SG2の順番で終了すると、クエリー・プロセッサは、新たに処理できるタスクを処理ツリー(902)から検索する。タスクt2 1が終了すると、新たにタスクt2 2の処理を始めることができるようになり、クエリー・プロセッサは、新たにグループG5を作成してグループG5にタスクt2 2を加えて、グループG5をグループ列(キュー)(904)に挿入する。次にタスクtG1 SG1の処理が終了すると、新たにタスクt1 4,t3 3,t6 4の処理ができるようになり、クエリー・プロセッサは、新たにグループG6を作成してグループG6にタスクt1 4,t3 3,t6 4を加えて、グループG6をグループ列(キュー)(904)に挿入する。最後にタスクtG1 SG2の処理が終了すると、新たに処理できるタスクは見出されないのでグループは作成されない。グループG1の処理が終了すると、プロセス1以外のすべてのプロセスは、他のグループの処理を行っているので、続けてプロセス1がグループ列からグループG5を取り出して、グループG5の処理を始めることになる。
他のプロセス2〜4もそれぞれ、グループ列からグループを取り出し、並列に処理を行う。
First, the process 1 performs the processing of the composition-related operation tasks t G1 SG1 and t G1 SG2 in the group G1 and the task t 2 1 not collected in the subgroup in the order of t 2 1 , t G1 SG1 , t G1 SG2 . When finished, the query processor searches the processing tree (902) for tasks that can be newly processed. When task t 2 1 is finished, task t 2 2 can be newly started, and the query processor creates a new group G5 and adds task t 2 2 to group G5. Insert G5 into the group column (queue) (904). Next, when the processing of task t G1 SG1 is completed, tasks t 1 4 , t 3 3 , and t 6 4 can be newly processed, and the query processor newly creates group G6 and adds it to group G6. Tasks t 1 4 , t 3 3 , and t 6 4 are added to insert group G6 into the group column (queue) (904). Finally, when the processing of task t G1 SG2 is completed, no new task can be found and no group is created. When the processing of group G1 ends, all processes other than process 1 are processing other groups, so that process 1 continues to extract group G5 from the group column and start processing of group G5. Become.
Each of the other processes 2 to 4 also takes out a group from the group column and performs processing in parallel.

このようにして、それぞれのプロセスがグループの処理を終了するにつれて、次々にグループ列(904)からグループを取り出して、グループ内のタスク処理を行うことになり、マルチオペレーション・プロセッサ(905)は、グループの処理を繰り返して行っていくうちに、処理ツリー(902)内のタスクが次第に終了に近づき、処理ツリー内すべてのタスク処理が終了すると、与えられたすべてのクエリー処理は終了したことになる。また、クエリー・プロセッサ(901)が現在クエリーの処理(Q1からQ6までのクエリー)を行っている最中に、ユーザからの新たな問い合わせのクエリーQ7(909)があった場合には、クエリー・プロセッサは、クエリー・オプティマイザーを用いて新しいクエリーQ7に対する最適化を行って処理ツリーP7を作成し、処理ツリーP7からトポロジカルソートの順番で、処理できるタスクを見出し、それらのタスクと共通のリレーションをアクセスするタスクを集めたグループがグループ列に存在するかどうかを調べる。そのようなグループが既存のグループの中に存在するならば、そのグループにタスクを加えることになり、既存のグループに存在しない場合には、新たにグループを作成してそのグループにタスクを加えることにする。さらに、問い合わせのクエリーの数が増えると、プロセスがグループの処理を行っている間に、グループ列にいくつかのグループが待機するようになり、その間に数多くのタスクがグループに集められ、グループに集められたタスクが、さらにサブグループに集められて、数多くのタスク処理が一度に行われるようになる。このようにしてクエリーの処理を行うデータベースシステムは、数多くのクエリーを効率よく高速に行っていくものである。 In this way, as each process finishes processing the group, the group is sequentially taken out from the group column (904) to perform task processing in the group, and the multi-operation processor (905) As the group processing is repeated, the tasks in the processing tree (902) gradually approach the end, and when all the task processing in the processing tree is completed, all given query processing is completed. . When the query processor (901) is currently processing a query (query from Q1 to Q6) and there is a new query Q7 (909) from the user, the query the processor creates the process tree P 7 with optimization for the new query Q7 using query optimizer, in the process tree P 7 of topological sort order, the processing can be found tasks, in common with those tasks Check if there is a group in the group column that collects the tasks that access the relation. If such a group exists in an existing group, it will add a task to that group, and if it does not exist in the existing group, create a new group and add the task to that group. To. In addition, as the number of queries in the query increases, several groups wait in the group column while the process is processing the group, during which many tasks are gathered into the group, The collected tasks are further collected into subgroups so that many task processes can be performed at once. A database system that processes queries in this way efficiently performs many queries at high speed.

[1−2.合成関係演算を利用したマルチオペレーション・プロセッシングを用いたクエリー・プロセッサのフローチャート]
図2は、合成関係演算を利用したマルチオペレーション・プロセッシングを用いてクエリーが処理される一連の流れを説明するためのフローチャートである。
まず、SQLなどのリレーショナルデータベースの言語を使用して、ユーザからデータベースサーバーにクエリーの問い合わせが入力される(S110)。問い合わせのあったSQLの構文は、クエリー・オプティマイザー(900)によるクエリーの最適化処理によって関係演算で構成された処理ツリーに変換される(S120)。クエリー・プロセッサ(901)は、トポロジカルソートの順番で、直接的に処理することのできるタスクを見つける(S130)。直接的に処理することのできるタスクを見つけると、これらのタスクがアクセスするリレーションと共通のリレーションをアクセスするタスクが集められたグループがグループ列に存在するかどうかを調べる(S140)。共通のリレーションをアクセスするタスクが集められたグループがグループ列に存在しているならば、そのグループにタスクを加える(S150)。存在していない場合は、タスクのために新たなグループを作成し、そのグループにタスクを加えて、そのグループをグループ列に挿入する(S160)。
ここまでの処理は、前述した本発明者による特願2006−356406号に記載したものと同じである。
[1-2. Query processor flowchart using multi-operation processing using composition-related operations]
FIG. 2 is a flowchart for explaining a series of flows in which a query is processed using multi-operation processing using a composition relational operation.
First, using a relational database language such as SQL, a query query is input from the user to the database server (S110). The syntax of the queried SQL is converted into a processing tree composed of relational operations by query optimization processing by the query optimizer (900) (S120). The query processor (901) finds tasks that can be directly processed in the order of topological sort (S130). When a task that can be directly processed is found, it is checked whether there is a group in the group column in which the relations accessed by these tasks and the tasks accessing the common relations are collected (S140). If a group in which tasks that access the common relation are collected exists in the group column, the task is added to the group (S150). If it does not exist, a new group is created for the task, a task is added to the group, and the group is inserted into the group column (S160).
The processing so far is the same as that described in Japanese Patent Application No. 2006-356406 by the inventor described above.

グループにタスクを集めると、グループ内のタスクで共通部分式を持つタスクは、さらにサブグループに集める(S170)。サブグループにタスクを集めると、グループ内のサブグループに対して、サブグループ内のタスクをもとに合成関係演算タスクを作成する(S180)。
マルチオペレーション・プロセッサ(905)は、利用できるプロセスの数だけグループ列からグループを取り出し、マルチオペレーション・プロセッシングを用いて、グループ内の合成関係演算タスク、及びサブグループに集まらないタスクの処理を一度に行う(S190)。グループ内の合成関係演算タスクの処理が終了すると、サブグループ内のタスクに対して仮想リレーションを作成して合成関係演算タスクの処理結果内のレコードを部分的に共有できるようにする(S200)。
When the tasks are collected in the group, the tasks having the common subexpression among the tasks in the group are further collected in a subgroup (S170). When the tasks are collected in the subgroup, a composite relation calculation task is created for the subgroups in the group based on the tasks in the subgroup (S180).
The multi-operation processor (905) extracts groups from the group column as many as the number of processes that can be used, and uses multi-operation processing to process composite related arithmetic tasks within the group and tasks that do not gather into subgroups at once. Perform (S190). When the processing of the synthetic relational calculation task in the group is completed, a virtual relation is created for the task in the subgroup so that the records in the processing result of the synthetic relational calculation task can be partially shared (S200).

グループ内のタスク処理が終了すると、処理ツリー内のすべてのタスク処理が終了したかどうかを調べる(S210)。処理ツリー内にまだタスクが残っている場合は、繰り返して次に処理できるタスクを処理ツリーから見出していくことになる。
処理ツリー内のすべてのタスク処理が終了するとその処理ツリーに対応したクエリーの処理が終了する。
When task processing in the group ends, it is checked whether all task processing in the processing tree has ended (S210). If there are still tasks remaining in the processing tree, the next process can be repeatedly found from the processing tree.
When all the task processes in the processing tree are completed, the query processing corresponding to the processing tree is completed.

[1−3.合成関係演算を利用したマルチオペレーション・プロセッシングのアルゴリズム]
合成関係演算を利用したマルチオペレーション・プロセッシングを使用してグループに集められたタスクを一度に処理を行うに当たって、合成関係演算を利用したマルチオペレーション・プロセッシングのアルゴリズムをステップ1からステップ3に分けて、さらに説明する。
[1-3. Multi-operation processing algorithm using composite relational operations]
When processing tasks collected in a group using multi-operation processing using synthetic relational operations at once, the multi-operation processing algorithm using synthetic relational operations is divided into steps 1 to 3, Further explanation will be given.

[(a)ステップ1:タスクのサブグループ化]
共通のリレーションRに対してグループ内のタスクの処理を行うに当たって、次のようにタスク間の共通部分式に関する定義を定めて、グループ内のタスクを共通部分式ごとにサブグループに集める(S170)。
・共通部分式に関する定義:
次に示す選択演算,射影演算,及びその他の演算に関する条件を満たすならば、タスクtiとタスクtjは共通部分式をもっている。
・選択演算:
タスクtiは、リレーションRに対して属性A1,A2,A3,…,Akに関する選択条件(AND,ORで結合したもの)に使用する選択演算タスクであり、タスクtjは、同一のリレーションRに対して同一の属性A1,A2,A3,…,Akに関する選択条件(AND,ORで結合したもの)に使用する選択演算タスクであるときに、タスクtiとタスクtjが使用する選択条件において、1つの属性Ai(1≦i≦k)に関する選択条件だけは異なった条件かまたは同じ条件であり、Ai以外の属性に関する選択条件はまったく同じ条件である。
・射影演算:
タスクtiは、リレーションRに対する射影演算タスクであり、タスクtjは、同一のリレーションRに対する射影演算タスクである。
・その他の関係演算:
tiとtjは、同一の関係演算のタスク(ti≡tj)である。
以上の定義の条件に用いた演算は、あくまでも共通部分式に関するものである。
[(A) Step 1: Task sub-grouping]
When processing the tasks in the group for the common relation R, the definition of the common subexpression between tasks is defined as follows, and the tasks in the group are collected into subgroups for each common subexpression (S170). .
-Definitions related to common subexpressions:
The task t i and the task t j have a common subexpression if the following conditions regarding the selection operation, projection operation, and other operations are satisfied.
・ Selection calculation:
Task t i is a selection operation task used for selection conditions (connected by AND and OR) for attributes R 1 , A 2 , A 3 ,..., A k for relation R, and task t j is same relation R same attributes for a 1, a 2, a 3 , ..., when a select operation task used selection for a k conditions (aND, those bonded with OR), and a task t i In the selection conditions used by task t j , only the selection conditions for one attribute A i (1 ≦ i ≦ k) are different or the same conditions, and the selection conditions for attributes other than A i are exactly the same conditions. is there.
Projection calculation:
The task t i is a projection operation task for the relation R, and the task t j is a projection operation task for the same relation R.
・ Other relational operations:
t i and t j are tasks of the same relational operation (t i ≡t j ).
The calculations used for the conditions defined above relate only to common subexpressions.

[(b)ステップ2:合成関係演算タスクの作成]
ステップ1によってグループ内のタスクを共通部分式ごとにサブグループに集めると、サブグループ内のタスクの演算の種類に応じて、下記の方法を使用して、グループ内の各サブグループに対して、合成関係演算タスクを作成する(S180)。
[(B) Step 2: Creation of composition-related operation task]
When the tasks in the group are grouped into subgroups by common subexpression in step 1, depending on the type of operation of the tasks in the subgroup, for each subgroup in the group using the following method: A composition relation calculation task is created (S180).

・合成選択演算タスク作成方法:
サブグループ内の選択演算タスクTEMP_T1←σ<selection condition 1>R,TEMP_T2←σ<selection condition 2>R,TEMP_T3←σ<selection condition 3>R,…,TEMP_Tn←σ<selection condition n>Rに使われている選択条件<selection condition i>(i=1,2,…,n)を、ブール演算のORを使用して接続し、接続した選択条件から選択範囲の重複した部分を取り除くために、次のような最適化を行って1つの合成選択演算タスクを作成する。
TEMP_SG←σoptimize(<selection condition 1> OR <selection condition 2> OR <selection condition 3> …OR <selection condition n>)R
ここで、σ<selection condition i>R (i=1,2,…,n)は、リレーションRに対して選択条件<selection condition i>にもとづいて選択演算することを意味し、σoptimize(…)は、最適化により選択演算を行うことを意味する。また、TEMP_Ti←σ<selection condition i>Rは、リレーションRに対して、選択条件<selection condition i>にしたがって選択(σ)するタスクを表し、その処理結果をTEMP_Tiに記録するものとする。
-How to create a composite selection calculation task:
Selection calculation task TEMP_T1 ← σ <selection condition 1> R, TEMP_T2 ← σ <selection condition 2> R, TEMP_T3 ← σ <selection condition 3> R,…, TEMP_Tn ← σ <selection condition n> R In order to connect the selected condition <selection condition i> (i = 1,2, ..., n) using OR of Boolean operations, and remove the overlapping part of the selection range from the connected selection condition, One synthesis selection calculation task is created by performing the following optimization.
TEMP_SG ← σ optimize (<selection condition 1> OR <selection condition 2> OR <selection condition 3> … OR <selection condition n>) R
Here, σ <selection condition i> R (i = 1, 2,..., N) means that a selection operation is performed on relation R based on the selection condition <selection condition i>, and σ optimize (... ) Means performing a selection operation by optimization. TEMP_Ti ← σ <selection condition i> R represents a task to be selected (σ) in accordance with the selection condition <selection condition i> for relation R, and the processing result is recorded in TEMP_Ti.

・合成射影演算タスク作成方法:
サブグループ内の射影演算タスクTEMP_T1←π<attribute list 1>R,TEMP_T2←π<attribute list 2>R,TEMP_T3←π<attribute list 3>R ,…,TEMP_Tn←π<attribute list n>Rに使われている属性のリスト<attribute list i>(i=1,2,…,n)を集合Siに変換し、和集合(Union)を用いて各タスクからの属性を1つの集合TS=S1∪S2∪S3∪…∪Snに集める。そして属性の集合TSを属性のリスト<attribute list SG>に変換して、合成射影演算タスクTEMP_SG←π<attribute list SG>Rを作成する。ここで、π<attribute list i>R(i=1,2,…,n)は、リレーションRに対して、属性のリスト<attribute list i>にもとづき射影演算を行うことを意味する。また、TEMP_Ti←π<attribute list i>R(i=1,2,…,n)はリレーションRに対して属性<attribute list i>にもとづいて射影演算を行った結果をTEMP_Tiに記録することを表すものとする。
-How to create a composite projection calculation task:
Projection task in subgroup TEMP_T1 ← π <attribute list 1> R, TEMP_T2 ← π <attribute list 2> R, TEMP_T3 ← π <attribute list 3> Used for R,…, TEMP_Tn ← π <attribute list n> R The attribute list <attribute list i> (i = 1, 2,..., N) is converted into a set Si, and the attributes from each task are converted into a set TS = S1∪ using a union. S2∪S3∪… collect in Sn. Then, the attribute set TS is converted into an attribute list <attribute list SG>, and a composite projection operation task TEMP_SG ← π <attribute list SG> R is created. Here, π <attribute list i> R (i = 1, 2,..., N) means that a projection operation is performed on the relation R based on the attribute list <attribute list i>. Also, TEMP_Ti ← π <attribute list i> R (i = 1,2, ..., n) records that the result of projection operation on relation R based on attribute <attribute list i> is recorded in TEMP_Ti. It shall represent.

・その他の合成関係演算タスク作成方法:
サブグループには、同一の関係演算のタスクが集められているので、サブグループ内のタスクの1つを合成関係演算タスクとして使うものとする。
・ Other methods for creating composition-related computation tasks:
Since tasks of the same relational operation are collected in the subgroup, one of the tasks in the subgroup is assumed to be used as a composite relational calculation task.

[(c)ステップ3:マルチオペレーション・プロセッシングを使ったグループの処理]
ステップ2を用いてグループ内の各サブグループに関して作成された合成関係演算タスク及びグループ内でサブグループに集められないタスクに対してマルチオペレーション・プロセッシングを使用して処理を行う(S190)。
このマルチオペレーション・プロセッシングとして、ダイナミックマルチオペレーション・プロセッシングとスタティックマルチオペレーション・プロセッシングの2つの処理方法を提案してきた(特願2006−356406号参照)が、この実施形態では、スタティック・マルチオペレーション・プロセッシングをマルチオペレーション・プロセッシングとして用いて処理を行っていくことにする。スタティック・マルチオペレーション・プロセッシングを使って処理を行う場合は、グループ内の合成関係演算タスク及びグループ内でサブグループに集まらないタスクに対してアクセスプランを作成し、アクセスプランから各タスクの処理コストをもとめ、処理コストの小さいタスクから処理コストの大きいタスクへと順番に処理するために、アクセスするリレーション内のブロックの順位を決定し、その順位にしたがってディスク内のブロックをアクセスし、このブロックを共通ブロックとして、このブロック上で処理を行う必要のあるグループ内のタスク処理を一度に処理していくことになる。
[(C) Step 3: Group processing using multi-operation processing]
The multi-operation processing is performed on the composite relation calculation task created for each subgroup in the group using step 2 and the tasks not collected in the subgroup in the group (S190).
As this multi-operation processing, two processing methods of dynamic multi-operation processing and static multi-operation processing have been proposed (see Japanese Patent Application No. 2006-356406). In this embodiment, static multi-operation processing is performed. We will use it as multi-operation processing. When processing is performed using static multi-operation processing, an access plan is created for the composition-related computation tasks in the group and tasks that do not gather in subgroups in the group, and the processing cost of each task is calculated from the access plan. In order to process in order from the task with the lowest processing cost to the task with the higher processing cost, the order of the blocks in the relation to be accessed is determined, the blocks in the disk are accessed according to the order, and this block is shared. As a block, task processing in a group that needs to be processed on this block is processed at a time.

この方法は、アクセスすべきブロック(共通ブロック)の順位に従って、和集合、積集合及び差集合などの集合論を用いて、クエリーに含まれる各タスクの処理をきわめて論理的に行うものである。   According to this method, processing of each task included in a query is extremely logically performed using set theory such as a union set, a product set, and a difference set in accordance with the order of blocks to be accessed (common blocks).

[(d)仮想リレーション]
合成関係演算を利用したマルチオペレーション・プロセッシングによって処理された合成関係演算タスクの処理結果は、サブグループ内の個々のタスクの処理結果のすべてを含んでいるために、サブグループ内のタスクは、合成関係演算タスクの処理結果を部分的に共有することになる。
合成関係演算タスクの処理結果を部分的に共有していることを示すために、サブグループ内の個々のタスクに対して仮想リレーションを作成し、仮想リレーションに合成関係演算タスクの処理結果を共有するために必要な情報を記録しておく。
合成関係演算タスクが選択演算の場合、選択条件に使われた属性で整列された処理結果のリレーションを作成し、仮想リレーションとして、共有する合成関係演算の処理結果のリレーション名、レコードの格納位置(レコードの行範囲、レコードが格納してあるブロックの番号とアドレス)などの情報を記録しておくことになる。
また、合成関係演算タスクが射影演算の場合、仮想リレーションとして、共有する処理結果のリレーション名、属性の格納位置(列番号)などの情報を記録しておくことになる。
仮想リレーションにこれらの情報を記録しておくことによって、仮想リレーションを用いて処理を行うタスクは、合成関係演算タスクの処理結果の中から必要なレコードをすばやく取り出すことができるようになる(S200)。
[(D) Virtual relation]
Since the processing results of the composite relational operation task processed by multi-operation processing using the composite relational operation include all of the processing results of the individual tasks in the subgroup, the tasks in the subgroup are combined. The processing result of the relational calculation task is partially shared.
Create a virtual relation for each task in a subgroup and share the result of the synthetic relational calculation task in the virtual relation to show that the result of the synthetic relational calculation task is partially shared Record the information necessary for this.
If the composition relation calculation task is a selection calculation, create a relation of the processing results arranged by the attribute used in the selection condition, and as a virtual relation, the relation name of the processing result of the combination relation calculation to be shared, the storage location of the record ( Information such as the record row range and the block number and address in which the record is stored is recorded.
Further, when the compositing-related calculation task is a projection calculation, information such as a relation name of a processing result to be shared and an attribute storage position (column number) is recorded as a virtual relation.
By recording these pieces of information in the virtual relation, a task that performs processing using the virtual relation can quickly extract the necessary record from the processing result of the synthetic relation calculation task (S200). .

このようにして、サブグループに集められたいくつものタスクを1つの合成関係演算タスクに置き換えて処理を行い、サブグループ内の個々のタスクは仮想リレーションを通して合成関係演算タスクの処理結果を部分的に共有することになり、サブグループ内の個々のタスクの間で選択範囲、及び属性(列)の重なっているレコードを含んだ処理結果のリレーションをディスク上に別々に作成する必要がなくなるので、ディスクをアクセスする回数を減らすことができ、クエリーの処理速度を向上させることが可能となる。
また、仮想リレーションを用いて処理を行うタスクは、仮想リレーションをもとにしてグループ分けするのではなく、(仮想リレーションを包含している)合成関係演算タスクの処理結果として得られたリレーションをもとにグループ分けを行い、マルチオペレーション・プロセッシングを使用してこれらのタスク処理を一度に行うものとする。マルチオペレーション・プロセッシングを使用してこれらのタスク処理を一度に行うことによって、合成関係演算タスクの処理結果得られたリレーションのブロックは、何度もアクセスされることがなくなり、クエリーの処理速度を向上させることが可能となる。
In this way, a number of tasks collected in a subgroup are replaced with a single composite relational calculation task, and each task in the subgroup partially processes the processing results of the composite relational calculation task through a virtual relation. Since there is no need to separately create relations on the disk that include records with overlapping selection ranges and attributes (columns) among individual tasks in the subgroup, The number of accesses can be reduced, and the query processing speed can be improved.
In addition, tasks that are processed using virtual relations are not grouped based on virtual relations, but have relations obtained as a result of processing of synthetic relational calculation tasks (including virtual relations). Suppose that these tasks are processed at once using multi-operation processing. By performing these task processing at once using multi-operation processing, the relation block obtained as a result of the processing of the composition relation operation task is not accessed many times, and the query processing speed is improved. It becomes possible to make it.

以上のようにして、合成関係演算を利用したマルチオペレーション・プロセッシングを用いたクエリー処理を行うことによって、マルチオペレーション・プロセッシングだけを用いたクエリー処理よりも数多くのタスク処理が一度に行うことができるようになり、ディスクをアクセスする回数を減少させ、クエリーの処理速度を向上させることができる。   As described above, by performing query processing using multi-operation processing using composition-related operations, more task processing can be performed at once than query processing using only multi-operation processing. Thus, the number of times the disk is accessed can be reduced, and the query processing speed can be improved.

[2.合成関係演算を利用したマルチオペレーション・プロセッシングの具体例]
ここでは、上述で説明した合成関係演算を利用したマルチオペレーション・プロセッシングを、図3−1〜図3−3に示したデータ構造を有するデータベースに対するクエリーQ1〜Q5の例を用いて説明する。
[2. Specific examples of multi-operation processing using composition-related operations]
Here, the multi-operation processing using the composite relational operation described above will be described using examples of queries Q 1 to Q 5 for the database having the data structure shown in FIGS. 3-1 to 3-3. .

[2−1.リレーションとクエリー(問い合わせ)処理]
[(a)リレーションの例]
図3−1〜図3−3には、リレーションDEPARTMENT,EMPLOYEE,WORKS_ON,PROJECTから構成されているデータベースを示している。
リレーションDEPARTMENT(図3−1(a)参照)には25件のレコードが5つのブロックに格納してあり、それぞれのブロックには5件のレコードが存在しており、各ブロックは、次のブロックに対してブロックポインタを持っている。リレーションDEPARTMENTの主属性DNUMBERには、主インデックス(100)が存在し、主インデックスは、各ブロックに対してインデックスポインタを持っている。リレーションDEPARTMENTの属性DPHONEには、2次インデックス(102)が存在し、2次インデックスはリレーションDEPARTMENT内の各レコードに対してインデックスポインタを持っている。
リレーションEMPLOYEE(図3−2参照)には、20件のレコードが5つのブロックに格納してあり、それぞれのブロックには4件レコードが存在しており、各ブロックは次のブロックに対してブロックポインタを持っている。リレーションEMPLOYEEの主属性SSNには、主インデックス(104)が存在し、主インデックスは各ブロックに対してインデックスのポインタを持っている。
[2-1. Relation and query processing
[(A) Relation example]
FIGS. 3A to 3C show a database composed of relations DEPARTMENT, EMPLOYEE, WORKS_ON, and PROJECT.
The relation DEPARTMENT (see FIG. 3-1 (a)) stores 25 records in 5 blocks, and each block has 5 records, and each block has the next block. Has a block pointer. The main attribute DNUMBER of the relation DEPARTMENT has a main index (100), and the main index has an index pointer for each block. The attribute DPHONE of the relation DEPARTMENT has a secondary index (102), and the secondary index has an index pointer for each record in the relation DEPARTMENT.
In relation EMPLOYEE (see Fig. 3-2), 20 records are stored in 5 blocks, and there are 4 records in each block. Each block is a block for the next block. Have a pointer. The main attribute SSN of the relation EMPLOYEE has a main index (104), and the main index has an index pointer for each block.

リレーションPROJECT(図3−3(c)参照)には、10件のレコードが2つのブロックに格納してあり、それぞれのブロックには5件レコードが存在しており、各ブロックは、次のブロックに対してブロックポインタを持っている。リレーションPROJECTの主属性PNUMBERには、主インデックス(106)が存在し、主インデックスは、各ブロックに対してインデックスのポインタを持っている。
リレーションWORKS_ON(図3−3(d)参照)には、25件のレコードが5つのブロックに格納してあり、それぞれのブロックには5件のレコードが存在する。各ブロックは、次のブロックに対してブロックポインタを持っている。リレーションWORKS_ONの主属性ESSN,PNOは、リレーションEMPLOYEE,PROJECTに対する外部キーである。以上をまとめると次のような表になる。
In the relation PROJECT (see Fig. 3-3 (c)), 10 records are stored in 2 blocks, and 5 records exist in each block. Has a block pointer. The main attribute PNUMBER of the relation PROJECT has a main index (106), and the main index has an index pointer for each block.
In the relation WORKS_ON (see FIG. 3-3 (d)), 25 records are stored in five blocks, and there are five records in each block. Each block has a block pointer to the next block. The main attributes ESSN and PNO of the relation WORKS_ON are foreign keys to the relations EMPLOYEE and PROJECT. The following table summarizes the above.

[(b)クエリー例]
次に、図3−1〜図3−3に示したデータベースをもとにして合成関係演算を利用したマルチオペレーション・プロセッシングを説明するために、下記に示すようなクエリーQ1,Q2,Q3,Q4,Q5,Q6処理を取り上げることにする。図3−1〜図3−3のデータベースに対して、次のような6つのクエリーQ1,Q2,Q3,Q4,Q5,Q6の問い合わせがあったとする。
[(B) Query example]
Next, in order to explain multi-operation processing using composition-related operations based on the databases shown in FIGS. 3-1 to 3-3, queries Q 1 , Q 2 , Q as shown below are used. 3, Q 4, Q 5, to be taken up to Q 6 process. Assume that the following six queries Q 1 , Q 2 , Q 3 , Q 4 , Q 5 , and Q 6 have been made to the database shown in FIGS.

(Q1)SELECT LNAME,DNUMBER,DNAME,PNUMBER,PNAME
FROM DEPARTMENT,EMPLOYEE,PROJECT,WORKS_ON
WHERE DPHONE=23-3732 AND DNUMBER=DNUM AND
BDATE<'DEC-31-1961' AND SSN=ESSN AND
PNAME='Aquarius' AND PLOCATION='New York' AND PNUMBER=PNO;
(Q1) SELECT LNAME, DNUMBER, DNAME, PNUMBER, PNAME
FROM DEPARTMENT, EMPLOYEE, PROJECT, WORKS_ON
WHERE DPHONE = 23-3732 AND DNUMBER = DNUM AND
BDATE <'DEC-31-1961' AND SSN = ESSN AND
PNAME = 'Aquarius' AND PLOCATION = 'New York' AND PNUMBER = PNO;

(Q2)SELECT DNAME,DNUMBER,PNAME,PNUMBER,SSN,LNAME,BDATE
FROM EMPLOYEE,DEPARTMENT,PROJECT
WHERE SSN=164545566 AND SSN=MGRSSN AND
PNAME='Stafford' AND PLOCATION='New York' AND DNUMBER=DNUM;
(Q2) SELECT DNAME, DNUMBER, PNAME, PNUMBER, SSN, LNAME, BDATE
FROM EMPLOYEE, DEPARTMENT, PROJECT
WHERE SSN = 164545566 AND SSN = MGRSSN AND
PNAME = 'Stafford' AND PLOCATION = 'New York' AND DNUMBER = DNUM;

(Q3)SELECT SSN,FNAME,LNAME,DNAME,DNUMBER
FROM DEPARTMENT,EMPLOYEE
WHERE DNUMBER=DNUM AND BDATE>'JAN-1-1971';
(Q3) SELECT SSN, FNAME, LNAME, DNAME, DNUMBER
FROM DEPARTMENT, EMPLOYEE
WHERE DNUMBER = DNUM AND BDATE>'JAN-1-1971';

(Q4)SELECT *
FROM PROJECT,DEPARTMENT,EMPLOYEE
WHERE DNUMBER=DNUM AND PNUMBER=PNO AND SSN=ESSN;
(Q4) SELECT *
FROM PROJECT, DEPARTMENT, EMPLOYEE
WHERE DNUMBER = DNUM AND PNUMBER = PNO AND SSN = ESSN;

(Q5)SELECT *
FROM DEPARTMENT,EMPLOYEE,WORKS_ON
WHERE DNUMBER=DNUM AND SSN=ESSN AND HOURS<10;
(Q5) SELECT *
FROM DEPARTMENT, EMPLOYEE, WORKS_ON
WHERE DNUMBER = DNUM AND SSN = ESSN AND HOURS <10;

(Q6)SELECT FNAME,LNAME,DNUMBER,DNAME
FROM DEPARTMENT,EMPLOYEE
WHERE DNUMBER=7 AND DNUMBER=DNUM AND
BDATE>'FEB-11-1959' AND BDATE<'NOV-21-1966';
(Q6) SELECT FNAME, LNAME, DNUMBER, DNAME
FROM DEPARTMENT, EMPLOYEE
WHERE DNUMBER = 7 AND DNUMBER = DNUM AND
BDATE>'FEB-11-1959' AND BDATE <'NOV-21-1966';

[2−2.処理プランの作成]
クエリー・プロセッサは、問い合わせのあった各クエリーQ1,Q2,Q3,Q4,Q5,Q6に対して、クエリーの最適化を行い、各クエリーを処理していくための最良な処理方法である下記の処理プランを作成していくことになる。クエリーQ1に対して処理プランP1を作成し、クエリーQ2に対して処理プランP2を作成し、クエリーQ3に対して処理プランP3を作成し、クエリーQ4に対して処理プランP4を作成し、クエリーQ5に対して処理プランP5を作成し、クエリーQ6に対して処理プランP6を作成する。
[2-2. Create processing plan]
The query processor optimizes the query for each query Q 1 , Q 2 , Q 3 , Q 4 , Q 5 , Q 6 that has been queried and is the best way to process each query. The following processing plan, which is the processing method, will be created. It creates process plans P 1 for the query Q 1, creates process plans P 2 for the query Q 2, creates process plans P 3 for the query Q 3, the processing plan for the query Q 4 create a P 4, creates process plans P 5 for the query Q 5, to create a process plan P 6 for the query Q 6.

作成した処理プランを処理ツリーで表すと、図4−1〜図4−3に示したようにP1〜P6となる。
処理ツリーPi内のタスクti j(iは処理ツリーの番号、jはそれぞれの処理ツリー内の処理番号を表わしている)は、以下に示すように、
(ti j):処理結果←関係代数
として表し、処理結果は関係代数を処理した結果を表すものとする。処理結果名がTEMP_Tj_iの場合は、処理ツリーPi内のタスクti jの処理結果(処理ツリーの中間結果)を表し、処理結果がRESULT_Qiの場合は、処理ツリーPiの処理結果であることを表している。関係代数は、データベースのリレーションに対して、直接的に処理を行う演算であり、選択演算(σ)、射影演算(π)、結合演算(|X|)などの演算である。
When the created processing plan is represented by a processing tree, it becomes P 1 to P 6 as shown in FIGS.
Tasks t i j in processing tree P i (where i represents the number of the processing tree and j represents the processing number in each processing tree) are as follows:
(T i j ): processing result ← represented as relational algebra, and processing result represents the result of processing the relational algebra. If the processing result name is TEMP_Tj_i, the processing result of the task t i j in the process tree P i represents the (intermediate result of the processing tree), if the processing result is RESULT_Q i, is the processing result of the processing tree P i Represents that. Relational algebra is an operation that directly performs processing on database relations, such as a selection operation (σ), a projection operation (π), and a join operation (| X |).

処理プランP1
(t1 1): TEMP_T1_1←σDPHONE=23-3732DEPARTMENT
(t1 2): TEMP_T2_1←πDNUMBER,DNAMETEMP_T1_1
(t1 3): TEMP_T3_1←σBDATE<'DEC-31-1961'EMPLOYEE
(t1 4): TEMP_T4_1←πSSN,LNAME,DNUMTEMP_T3_1
(t1 5): TEMP_T5_1←TEMP_T2_1 |X|DNUMBER=DNUMTEMP_T4_1
(t1 6): TEMP_T6_1←πSSN,LNAME,DNUMBER,DNAMETEMP_T5_1
(t1 7): TEMP_T7_1←σPNAME='Aquarius” AND PLOCATION='New York'PROJECT
(t1 8): TEMP_T8_1←πPNUMBER,PNAMETEMP_T7_1
(t1 9): TEMP_T9_1←πESSN,PNOWORKS_ON
(t1 10):TEMP_T10_1←TEMP_T8_1 |X|PNUMBER=PNOTEMP_T9_1
(t1 11):TEMP_T11_1←πESSN,PNUMBER,PNAMETEMP_T10_1
(t1 12):TEMP_T12_1←TEMP_T6_1 |X|SSN=ESSNTEMP_T11_1
(t1 13): RESULT_Q1←πLNAME,DNUMBER,DNAME,PNUMBER,PNAMETEMP_T12_1
Processing plan P 1
(t 1 1 ): TEMP_T1_1 ← σ DPHONE = 23-3732 DEPARTMENT
(t 1 2 ): TEMP_T2_1 ← π DNUMBER, DNAME TEMP_T1_1
(t 1 3 ): TEMP_T3_1 ← σ BDATE <'DEC-31-1961' EMPLOYEE
(t 1 4 ): TEMP_T4_1 ← π SSN, LNAME, DNUM TEMP_T3_1
(t 1 5 ): TEMP_T5_1 ← TEMP_T2_1 | X | DNUMBER = DNUM TEMP_T4_1
(t 1 6 ): TEMP_T6_1 ← π SSN, LNAME, DNUMBER, DNAME TEMP_T5_1
(t 1 7 ): TEMP_T7_1 ← σ PNAME = 'Aquarius ” AND PLOCATION =' New York ' PROJECT
(t 1 8 ): TEMP_T8_1 ← π PNUMBER, PNAME TEMP_T7_1
(t 1 9 ): TEMP_T9_1 ← π ESSN, PNO WORKS_ON
(t 1 10 ): TEMP_T10_1 ← TEMP_T8_1 | X | PNUMBER = PNO TEMP_T9_1
(t 1 11 ) : TEMP_T11_1 ← π ESSN, PNUMBER, PNAME TEMP_T10_1
(t 1 12 ): TEMP_T12_1 ← TEMP_T6_1 | X | SSN = ESSN TEMP_T11_1
(t 1 13 ): RESULT_Q1 ← π LNAME, DNUMBER, DNAME, PNUMBER, PNAME TEMP_T12_1

処理プランP2
(t2 1):TEMP_T1_2←σSSN=164545566EMPLOYEE
(t2 2):TEMP_T2_2←πSSN,LNAME,BDATETEMP_T1_2
(t2 3):TEMP_T3_2←πDNUMBER,DNAME,MGRSSNDEPARTMENT
(t2 4):TEMP_T4_2←σPNAME='Stafford' AND PLOCATION='New York'PROJECT
(t2 5):TEMP_T5_2←πPNUMBER,PNAME,DNUMTEMP_T4_2
(t2 6):TEMP_T6_2←TEMP_T3_2 |X|DNUMBER=DNUMTEMP_T5_2
(t2 7):TEMP_T7_2←πDNUMBER,DNAME,MGRSSN,PNUMBER,PNAMETEMP_T6_2
(t2 8):TEMP_T8_2←TEMP_T2_2 |X|SSN=MGRSSNTEMP_T7_2
(t2 9):RESULT_Q2←πDNAME,DNUMBER,PNAME,PNUMBER,SSN,LNAME,BDATETEMP_T8_2
Processing plan P 2
(t 2 1 ): TEMP_T1_2 ← σ SSN = 164545566 EMPLOYEE
(t 2 2 ) : TEMP_T2_2 ← π SSN, LNAME, BDATE TEMP_T1_2
(t 2 3 ) : TEMP_T3_2 ← π DNUMBER, DNAME, MGRSSN DEPARTMENT
(t 2 4 ) : TEMP_T4_2 ← σ PNAME = 'Stafford' AND PLOCATION = 'New York' PROJECT
(t 2 5 ) : TEMP_T5_2 ← π PNUMBER, PNAME, DNUM TEMP_T4_2
(t 2 6 ): TEMP_T6_2 ← TEMP_T3_2 | X | DNUMBER = DNUM TEMP_T5_2
(t 2 7 ): TEMP_T7_2 ← π DNUMBER, DNAME, MGRSSN, PNUMBER, PNAME TEMP_T6_2
(t 2 8 ) : TEMP_T8_2 ← TEMP_T2_2 | X | SSN = MGRSSN TEMP_T7_2
(t 2 9 ): RESULT_Q2 ← π DNAME, DNUMBER, PNAME, PNUMBER, SSN, LNAME, BDATE TEMP_T8_2

処理プランP3
(t3 1):TEMP_T1_3←πDNUMBER,DNAMEDEPARTMENT
(t3 2):TEMP_T2_3←σBDATE>'JAN-1-1971'EMPLOYEE
(t3 3):TEMP_T3_3←πSSN,FNAME,LNAME,DNUMTEMP_T2_3
(t3 4):TEMP_T4_3←TEMP_T1_3 |X|DNUMBER=DNUMTEMP_T3_3
(t3 5):RESULT_Q3←πSSN,FNAME,LNAME,DNAME,DNUMBERTEMP_T4_3
Processing plan P 3
(t 3 1 ) : TEMP_T1_3 ← π DNUMBER, DNAME DEPARTMENT
(t 3 2 ) : TEMP_T2_3 ← σ BDATE>'JAN-1-1971' EMPLOYEE
(t 3 3 ) : TEMP_T3_3 ← π SSN, FNAME, LNAME, DNUM TEMP_T2_3
(t 3 4 ): TEMP_T4_3 ← TEMP_T1_3 | X | DNUMBER = DNUM TEMP_T3_3
(t 3 5 ): RESULT_Q3 ← π SSN, FNAME, LNAME, DNAME, DNUMBER TEMP_T4_3

処理プランP4
(t4 1):TEMP_T1_4←DEPARTMENT |X|DNUMBER=DNUMEMPLOYEE
(t4 2):TEMP_T2_4←PROJECT |X|PNUMBER=PNOWORKS_ON
(t4 3):RESULT_Q4←TEMP_T1_4 |X|SSN=ESSNTEMP_T2_4
Processing plan P 4
(t 4 1 ): TEMP_T1_4 ← DEPARTMENT | X | DNUMBER = DNUM EMPLOYEE
(t 4 2 ): TEMP_T2_4 ← PROJECT | X | PNUMBER = PNO WORKS_ON
(t 4 3 ): RESULT_Q4 ← TEMP_T1_4 | X | SSN = ESSN TEMP_T2_4

処理プランP5
(t5 1):TEMP_T1_5←DEPARTMENT |X|DNUMBER=DNUMEMPLOYEE
(t5 2):TEMP_T2_5←σHOURS<10WORKS_ON
(t5 3):RESULT_Q5←TEMP_T1_5 |X|SSN=ESSNTEMP_T2_5
Processing plan P 5
(t 5 1 ): TEMP_T1_5 ← DEPARTMENT | X | DNUMBER = DNUM EMPLOYEE
(t 5 2 ): TEMP_T2_5 ← σ HOURS <10 WORKS_ON
(t 5 3 ): RESULT_Q5 ← TEMP_T1_5 | X | SSN = ESSN TEMP_T2_5

処理プランP6
(t6 1):TEMP_T1_6←σDNUMBER=7DEPARTMENT
(t6 2):TEMP_T2_6←πDNUMBER,DNAMETEMP_T1_6
(t6 3):TEMP_T3_6←σBDATE>'FEB-11-1959' AND BDATE < NOV-21-1966'EMPLOYEE
(t6 4):TEMP_T4_6←πFNAME,LNAME,DNUMTEMP_T3_6
(t6 5):TEMP_T5_6←TEMP_T2_6 |X|DNUMBER=DNUMTEMP_T4_6
(t6 6):RESULT_Q6←πFNAME,LNAME,DNUMBER,DNAMETEMP_T5_6
Treatment plan P 6
(t 6 1 ): TEMP_T1_6 ← σ DNUMBER = 7 DEPARTMENT
(t 6 2 ): TEMP_T2_6 ← π DNUMBER, DNAME TEMP_T1_6
(t 6 3 ) : TEMP_T3_6 ← σ BDATE>'FEB-11-1959' AND BDATE < NOV-21-1966 ' EMPLOYEE
(t 6 4 ): TEMP_T4_6 ← π FNAME, LNAME, DNUM TEMP_T3_6
(t 6 5 ): TEMP_T5_6 ← TEMP_T2_6 | X | DNUMBER = DNUM TEMP_T4_6
(t 6 6 ): RESULT_Q6 ← π FNAME, LNAME, DNUMBER, DNAME TEMP_T5_6

[2−3.タスクのグループ化とサブグループ化]
[(a)タスクのグループ化]
合成関係演算を利用したマルチオペレーション・プロセッシングを適用するにあたって、図4−1〜図4−3に示した処理プランP1,P2,P3,P4,P5,P6にもとづいて作成された処理ツリーからトポロジカルソートの順番で、他のタスクから依存がなく直接的に処理できるタスクt1 1,t1 3,t1 7,t1 9,t2 1,t2 3,t2 4,t3 1,t3 2,t4 1,t4 2,t5 1,t5 2,t6 1,t6 3を見つけて、各タスクがアクセスするデータベースのリレーションをもとにグループに分けていくと、次のようにグループ分けすることになる。
[2-3. Task grouping and subgrouping]
[(A) Task grouping]
Created based on the processing plans P 1 , P 2 , P 3 , P 4 , P 5 , and P 6 shown in FIGS. Tasks t 1 1 , t 1 3 , t 1 7 , t 1 9 , t 2 1 , t 2 3 , t 2 that can be processed directly without dependency from other tasks in the order of topological sort from the processed tree 4 , t 3 1 , t 3 2 , t 4 1 , t 4 2 , t 5 1 , t 5 2 , t 6 1 , t 6 3 are found and grouped based on the relation of the database accessed by each task If you divide into the following, it will be grouped as follows.

また、2つのリレーションをアクセスする結合演算タスクなどの場合は、検索先のリレーションではなく検索元のリレーションをもとにしてグループ分けを行う。
EMPLOYEE: グループ G1={t1 3,t2 1,t3 2,t4 1,t5 1,t6 3}
DEPARTMENT:グループ G2={t1 1,t2 3,t3 1,t6 1}
PROJECT: グループ G3={t1 7,t2 4}
WORKS_ON: グループ G4={t1 9,t4 2,t5 2}
In addition, in the case of a join operation task that accesses two relations, grouping is performed based on the relation of the search source, not the relation of the search destination.
EMPLOYEE: Group G1 = {t 1 3 , t 2 1 , t 3 2 , t 4 1 , t 5 1 , t 6 3 }
DEPARTMENT: Group G2 = {t 1 1 , t 2 3 , t 3 1 , t 6 1 }
PROJECT: Group G3 = {t 1 7 , t 2 4 }
WORKS_ON: Group G4 = {t 1 9 , t 4 2 , t 5 2 }

グループG1には、リレーションEMPLOYEEをアクセスするタスクが集められ、グループG2には、リレーションDEPARTMENTをアクセスするタスクが集められ、グループG3にはリレーションPROJECTをアクセスするタスクが集められる。そしてグループG4にはリレーションWORKS_ONをアクセスするタスクが集められてグループ分けが行われる。   Tasks that access the relation EMPLOYEE are collected in the group G1, tasks that access the relation DEPARTMENT are collected in the group G2, and tasks that access the relation PROJECT are collected in the group G3. In the group G4, tasks that access the relation WORKS_ON are collected and grouped.

[(b)タスクのサブグループ化]
グループG1,G2,G3,G4にタスクが分けられると、グループ内のタスクで共通部分式を持っているタスクは、次のようにさらに共通部分式ごとにサブグループSG1G1,SG2G1,SG1G2,SG1G3に分けていくことになる。
[(B) Task sub-grouping]
When tasks are divided into groups G1, G2, G3, and G4, tasks having a common subexpression among the tasks in the group are further divided into subgroups SG1 G1 , SG2 G1 , SG1 G2 for each common subexpression as follows: , SG1 G3 .

EMPLOYEE: グループ G1 ={SG1G1,SG2G1,t2 1}
サブグループ SG1G1={t1 3,t3 2,t6 3}
サブグループ SG2G1={t4 1,t5 1}
DEPARTMENT: グループ G2 ={SG1G2,t1 1,t6 1}
サブグループ SG1G2={t2 3,t3 1}
PROJECT: グループ G3 ={SG1G3}
サブグループ SG1G3={t1 7,t2 4}
WORKS_ON: グループ G4 ={t1 9,t4 2,t5 2}
EMPLOYEE: Group G1 = {SG1 G1 , SG2 G1 , t 2 1 }
Subgroup SG1 G1 = {t 1 3 , t 3 2 , t 6 3 }
Subgroup SG2 G1 = {t 4 1 , t 5 1 }
DEPARTMENT: Group G2 = {SG1 G2 , t 1 1 , t 6 1 }
Subgroup SG1 G2 = {t 2 3 , t 3 1 }
PROJECT: Group G3 = {SG1 G3 }
Subgroup SG1 G3 = {t 1 7 , t 2 4 }
WORKS_ON: Group G4 = {t 1 9 , t 4 2 , t 5 2 }

サブグループSG1G1はリレーションEMPLOYEEに対して共通部分式の定義で述べた属性BDATEを選択条件に使用する選択演算タスクが集められたサブグループである。
サブグループSG2G1はリレーションEMPLOYEEに対して共通部分式の定義で述べた同一の関係演算の処理を行うタスクが集められたサブグループである。
サブグループSG1G2はリレーションDEPARTMENTに対して共通部分式の定義で述べた射影演算の処理を行うタスクのサブグループである。
サブグループSG1G3はリレーションPROJECTに対して共通部分式の定義で述べた属性PNAME,PLOCATIONを選択条件に使用する選択演算タスクが集められたサブグループであり、これらのタスクが使用する選択条件において、属性PNAMEに関する選択条件は異なっているが、それ以外の属性PLOCATIONに関する選択条件は全く同じ条件である。
グループG4内のタスクt1 9,t4 2,t5 2は共通部分式を持っていないので、グループG4にサブグループは作成されないことになる。
The subgroup SG1 G1 is a subgroup in which selection calculation tasks using the attribute BDATE described in the definition of the common subexpression for the relation EMPLOYEE as a selection condition are collected.
The subgroup SG2 G1 is a subgroup in which tasks for performing the same relational operation processing described in the definition of the common subexpression for the relation EMPLOYEE are collected.
The subgroup SG1 G2 is a subgroup of tasks for performing the projection operation processing described in the definition of the common subexpression for the relation DEPARTMENT.
The subgroup SG1 G3 is a subgroup in which the selection operation tasks that use the attributes PNAME and PLOCATION described in the definition of the common subexpression for the relation PROJECT as a selection condition are collected, and in the selection conditions used by these tasks, The selection conditions for the attribute PNAME are different, but the selection conditions for the other attributes PLOCATION are exactly the same.
Since tasks t 1 9 , t 4 2 , and t 5 2 in group G4 do not have a common subexpression, no subgroup is created in group G4.

図5は、処理ツリーからトポロジカルソートの順番で直接的に処理できるタスクt1 1,t1 3,t1 7,t1 9,t2 1,t2 3,t2 4,t3 1,t3 2,t4 1,t4 2,t5 1,t5 2,t6 1,t6 3(300)を、それぞれのタスクがアクセスするデータベースのリレーションをもとにグループG1,G2,G3,G4に分け、さらにグループ内のタスクで共通部分式を持っているタスクを共通部分式ごとにサブグループSG1G1,SG2G1,SG1G2,SG1G3に分けている様子を表わしている。 FIG. 5 shows tasks t 1 1 , t 1 3 , t 1 7 , t 1 9 , t 2 1 , t 2 3 , t 2 4 , t 3 1 , which can be processed directly from the processing tree in the order of topological sort. t 3 2 , t 4 1 , t 4 2 , t 5 1 , t 5 2 , t 6 1 , t 6 3 (300) are grouped into groups G 1, G 2, This shows that the tasks having a common subexpression among the tasks in the group are divided into subgroups SG1 G1 , SG2 G1 , SG1 G2 , SG1 G3 for each common subexpression.

[(c)合成関係演算タスクの作成]
グループ内にサブグループが作成されると、作成されたサブグループSG1G1,SG2G1,SG1G2,SG1G3に対して次のように合成関係演算タスクtG1 SG1,tG1 SG2,tG2 SG1,tG3 SG1を作成することができる。
(tG1 SG1):TEMP_SG1_G1←σBDATE<'NOV-21-1966' OR BDATE>'JAN-1-1971'EMPLOYEE
(tG1 SG2):TEMP_SG2_G1←DEPARTMENT |X|DNUMBER=DNUMEMPLOYEE
(tG2 SG1):TEMP_SG1_G2←πDNUMBER,DNAME,MGRSSNDEPARTMENT
(tG3 SG1):TEMP_SG1_G3←σPLOCATION='New York' AND (PNAME='Aquarius” OR PNAME='Stafford')PROJECT
[(C) Creation of composition-related operation task]
If subgroups in the group is created, the subgroup SG1 G1, SG2 G1, SG1 G2 , SG1 G3 synthesized as follows with respect to relational operations task t G1 SG1, t G1 SG2, t G2 SG1 created, t G3 SG1 can be created.
(t G1 SG1 ): TEMP_SG1_G1 ← σ BDATE <'NOV-21-1966' OR BDATE>'JAN-1-1971' EMPLOYEE
(t G1 SG2 ): TEMP_SG2_G1 ← DEPARTMENT | X | DNUMBER = DNUM EMPLOYEE
(t G2 SG1 ): TEMP_SG1_G2 ← π DNUMBER, DNAME, MGRSSN DEPARTMENT
(t G3 SG1 ) : TEMP_SG1_G3 ← σ PLOCATION = 'New York' AND (PNAME = 'Aquarius ” OR PNAME =' Stafford ') PROJECT

以上のように得られた合成関係演算タスクを説明すると、以下のようになる。
タスクtG1 SG1は、下記に示すようにサブグループSG1G1内の選択演算タスクt1 3,t3 2,t6 3の選択条件をブール演算のORを用いて接続して1つの選択条件<temp_cond>を作成し、接続した選択条件から選択範囲の重複した部分を取り除くために、簡潔化し最適化Optimize(<temp_cond>)した選択条件を作成し、その選択条件を用いた合成選択演算タスクである。
<temp_cond>=(BDATE<'DEC-31-1961') OR (BDATE>'JAN-1-1971') OR
(BDATE>'FEB-11-1959' AND BDATE<'NOV-21-1966')
Optimize(<temp_cond>) ⇒ BDATE<'NOV-21-1966' OR BDATE>'1-JAN-1972'
Optimize(<temp_cond>)によって表わされる選択条件は、ブール演算のORを用いて作成した選択条件<temp_cond>を最適化するために、それぞれの選択条件の選択範囲の論理和(Union)を求めて、選択範囲の重複した部分を取り除いて新たに簡潔化された選択条件として得られたものである。
The synthesis-related calculation task obtained as described above will be described as follows.
The task t G1 SG1 connects the selection conditions of the selection calculation tasks t 1 3 , t 3 2 , and t 6 3 in the subgroup SG1 G1 using a Boolean OR, as shown below, and selects one selection condition < Create a temp_cond>, create a selection condition that has been optimized and optimized (<temp_cond>) in order to remove the overlapping part of the selection range from the connected selection conditions, and in the synthesis selection operation task using that selection condition is there.
<temp_cond> = (BDATE <'DEC-31-1961') OR (BDATE>'JAN-1-1971') OR
(BDATE>'FEB-11-1959' AND BDATE <'NOV-21-1966')
Optimize (<temp_cond>) ⇒ BDATE <'NOV-21-1966' OR BDATE>'1-JAN-1972'
The selection condition represented by Optimize (<temp_cond>) is obtained by calculating the logical sum (Union) of the selection range of each selection condition in order to optimize the selection condition <temp_cond> created using OR of Boolean operations. This is obtained as a newly simplified selection condition by removing the overlapping portion of the selection range.

この最適化を、上述のタスクtG1 SG1の例で、図6を用いて詳しく説明する。
図6(a)は、ブール演算のORを使用して接続しているタスクt1 3の選択条件BDATE<'DEC-31-1961'である生年月日の選択範囲、タスクt6 3の選択条件BDATE>'FEB-11-1959' AND BDATE<'NOV-21-1966'である生年月日の選択範囲、タスクt3 2の選択条件BDATE>'JAN-1-1971'の生年月日の選択範囲を、生年月日の値が小さいほうから順番に左から右に1つの水平な線上に表している。
次に、図6(b)に示すように、タスクt1 3,t3 2,t6 3の選択条件に使われている生年月日の選択範囲の論理和(Union)を求めると、BDATEの値がNOV-21-1966以前とBDATEの値JAN-1-1971以降のBDATEの選択範囲のみが必要になることがわかる。
このようにして選択条件の選択範囲の論理和で求めた生年月日の選択範囲を新たな選択条件に直すと”BDATE<'NOV-21-1966' OR BDATE>'JAN-1-1971'”と簡潔化された選択条件になり、この選択条件を前述したように合成選択演算タスクtG1 SG1の選択演算の選択条件として使用することになる。
This optimization will be described in detail with reference to FIG. 6 using the above-described task t G1 SG1 .
6 (a) is selected conditional BDATE <'DEC-31-1961' a is date of birth of the selection of the task t 1 3 connecting with the OR Boolean operations, selection of the task t 6 3 Selection date of birth with condition BDATE>'FEB-11-1959' AND BDATE <'NOV-21-1966', selection condition for task t 3 2 BDATE> date of birth of 'JAN-1-1971' The selection range is represented on one horizontal line from left to right in order from the smallest date of birth.
Next, as shown in FIG. 6 (b), when the logical sum (Union) of the date of birth selection range used for the selection conditions of tasks t 1 3 , t 3 2 , and t 6 3 is obtained, BDATE It can be seen that only the selection range of BDATE after NOV-21-1966 and BDATE value JAN-1-1971 is necessary.
In this way, when the selection range of the date of birth obtained by the logical sum of the selection ranges of the selection conditions is changed to a new selection condition, “BDATE <'NOV-21-1966' OR BDATE>'JAN-1-1971'” As described above, this selection condition is used as the selection condition for the selection calculation of the composite selection calculation task t G1 SG1 .

タスクtG1 SG2は、サブグループSG2G1内のタスクが同一の結合演算(t4 1≡t5 1)なので、サブグループSG2G1内の結合演算タスクの1つをそのまま合成関係演算タスクとして使用することになる。
タスクtG2 SG1は、サブグループSG1G2内の射影演算タスクt2 3,t3 1に使われている属性を、和集合(Union)を使用して作成した合成射影演算タスクである。
タスクtG3 SG1は、下記に示すようにサブグループSG1G3内の選択演算タスクt1 7,t2 4の選択条件をブール演算のORを用いて接続して1つの選択条件<temp_cond>を作成し、接続した選択条件から選択範囲の重複した部分を取り除くために最適化Optimize(<temp_cond>)を行って作成した合成選択演算タスクである。
<temp_cond>=(PNAME='Aquarius' AND PLOCATION='New York') OR
(PNAME='Stafford' AND PLOCATION='New York')
Optimize(<temp_cond>) ⇒ PLOCATION='New York' AND (PNAME='Aquarius' OR PNAME='Stafford')
Task t G1 SG2 is because the task is the same join operation in the subgroup SG2 G1 (t 4 1 ≡t 5 1), using one of the join operation tasks in the subgroup SG2 G1 as it is synthetic relational operation tasks It will be.
The task t G2 SG1 is a composite projection calculation task created by using the union for the attributes used in the projection calculation tasks t 2 3 and t 3 1 in the subgroup SG1 G2 .
Task t G3 SG1 may create <temp_cond> 1 one selection condition connected with the OR Boolean selection operation tasks t 1 7, t 2 4 selection conditions subgroup SG1 in G3 as shown below This is a composite selection calculation task created by performing optimization Optimize (<temp_cond>) in order to remove the overlapping part of the selection range from the connected selection conditions.
<temp_cond> = (PNAME = 'Aquarius' AND PLOCATION = 'New York') OR
(PNAME = 'Stafford' AND PLOCATION = 'New York')
Optimize (<temp_cond>) ⇒ PLOCATION = 'New York' AND (PNAME = 'Aquarius' OR PNAME = 'Stafford')

Optimize(<temp_cond>)は、ブール演算のORを用いて作成した選択条件<temp_cond>を最適化するために、それぞれの選択条件の選択範囲の論理和(Union)を求めて、選択範囲の重複した部分であるPLOCATION='New York'を取り除いて新たに簡潔化された選択条件として得られたものである。   Optimize (<temp_cond>) calculates the logical sum (Union) of the selection ranges of each selection condition in order to optimize the selection condition <temp_cond> created using Boolean OR. This was obtained as a newly simplified selection condition by removing the part PLOCATION = 'New York'.

以上のように、グループ内のサブグループに対して合成関係演算タスクを作成すると、グループ内のサブグループを次のように合成関係演算タスクで置き換えることができる。
EMPLOYEE: グループ G1={tG1 SG1,tG1 SG2,t2 1}
DEPARTMENT:グループ G2={tG2 SG1,t1 1,t6 1}
PROJECT: グループ G3={tG3 SG1}
WORKS_ON: グループ G4={t1 9,t4 2,t5 2}
As described above, when a composite relational calculation task is created for a subgroup in a group, the subgroup in the group can be replaced with the composite relational calculation task as follows.
EMPLOYEE: Group G1 = {t G1 SG1, t G1 SG2, t 2 1}
DEPARTMENT: Group G2 = {t G2 SG1, t 1 1, t 6 1}
PROJECT: Group G3 = {t G3 SG1 }
WORKS_ON: Group G4 = {t 1 9 , t 4 2 , t 5 2 }

[2−4.マルチオペレーション・プロセッシングによる合成関係演算タスク処理]
グループ内のサブグループが合成関係演算タスクで置き換えられると、マルチオペレーション・プロセッシングを適用して、グループ内の合成関係演算タスクを含むグループ内のタスクの処理を一度に行っていくことにする。マルチオペレーション・プロセッシングとして、スタティック・マルチオペレーション・プロセッシング(特願2006−356406号参照)を使用して、グループG1,G2,G3,G4の処理を行っていく場合について記述する。
[2-4. Computation-related calculation task processing by multi-operation processing]
When a subgroup in a group is replaced with a composition-related operation task, multi-operation processing is applied to process the tasks in the group including the composition-related operation task in the group at once. A case will be described in which static multi-operation processing (see Japanese Patent Application No. 2006-356406) is used as multi-operation processing to perform processing of groups G1, G2, G3, and G4.

[(a)グループG1の処理]
スタティックマルチオペレーション・プロセッシングを使用してグループG1内の合成選択演算タスクtG1 SG1,tG1 SG2及びサブグループに集まらないタスクt2 1の処理を一度に行うことにする。前述したように、グループG1内の各タスクは次のようなものである。
EMPLOYEE:グループ G1={tG1 SG1,tG1 SG2,t2 1}
(tG1 SG1):TEMP_SG1_G1←σBDATE<'NOV-21-1966' OR BDATE>'JAN-1-1971'EMPLOYEE
(tG1 SG2):TEMP_SG2_G1←DEPARTMENT |X|DNUMBER=DNUMEMPLOYEE
(t2 1): TEMP_T1_2←σSSN=164545566EMPLOYEE
[(A) Group G1 processing]
It will be the processing of the task t 2 1 not gather the synthetic select operation task t G1 SG1, t G1 SG2 and subgroups in the group G1 using static multi-operation processing at a time. As described above, each task in the group G1 is as follows.
EMPLOYEE: Group G1 = {t G1 SG1, t G1 SG2, t 2 1}
(t G1 SG1 ): TEMP_SG1_G1 ← σ BDATE <'NOV-21-1966' OR BDATE>'JAN-1-1971' EMPLOYEE
(t G1 SG2 ): TEMP_SG2_G1 ← DEPARTMENT | X | DNUMBER = DNUM EMPLOYEE
(t 2 1 ): TEMP_T1_2 ← σ SSN = 164545566 EMPLOYEE

[(a−1)各タスクのアクセスプラン]
まずグループG1内のタスクtG1 SG1,tG1 SG2,t2 1に対して次のようなアクセスプランを作成する。
plan(tG1 SG1):EMPLOYEEを線形探索して選択処理を行う。
plan(tG1 SG2):EMPLOYEEをスキャンしてDEPARTMENTの主インデックスを使用して結合処理を行う。
plan(t2 1): EMPLOYEEの主インデックスを使った選択処理を行う。
[(A-1) Access plan for each task]
First the task t G1 SG1, t G1 SG2, t 2 1 in the group G1 to create the following access plan.
plan (t G1 SG1 ): Selects EMPLOYEE by linear search.
plan (t G1 SG2 ): Scans EMPLOYEE and performs join processing using DEPARTMENT's primary index.
plan (t 2 1 ): Selects using the main index of EMPLOYEE.

[(a-2)各タスクの処理コスト]
各タスクに対してアクセスプランを作成した後に、アクセスプランをもとに各タスクの処理コストを計算すると、以下のようになる。
タスクtG1 SG1の処理コスト:cost(tG1 SG1)=b=5
タスクtG1 SG2の処理コスト:cost(tG1 SG2)=bE+(|EMPLOYEE|*(xD+1))=5+(20*(1+1))=45
タスクt2 1の処理コスト:cost(t2 1)=xE+1=2
処理コストとはタスクの処理を行うためにディスクをアクセスする回数である。ここではタスクの処理を行うためにディスクをアクセスする回数を減らすのが目的であるので、メインメモリで計算する時間、処理結果をディスクに保存するコストは省略することにする。また、cost()は、処理コストを表すものとする。
[(A-2) Processing cost of each task]
After creating an access plan for each task, the processing cost of each task is calculated based on the access plan as follows.
Task t G1 SG1 processing cost: cost (t G1 SG1 ) = b = 5
Task t G1 SG2 processing cost: cost (t G1 SG2 ) = b E + (| EMPLOYEE | * (x D +1)) = 5+ (20 * (1 + 1)) = 45
Task t 2 1 processing cost: cost (t 2 1 ) = x E + 1 = 2
The processing cost is the number of times the disk is accessed for task processing. Here, the purpose is to reduce the number of times the disk is accessed in order to perform the task processing. Therefore, the time for calculation in the main memory and the cost for storing the processing result in the disk are omitted. Further, cost () represents the processing cost.

タスクtG1 SG1の処理コストは、リレーションEMPLOYEEを線形探索し、5つのブロックをアクセスするので処理コストはbE=5である。
タスクtG1 SG2の処理コストは、リレーションEMPLOYEEをスキャンする処理コストbEとEMPLOYEE内の各レコードに対してリレーションDEPARTMENTの主インデックスを使用して結合できるレコードを検索する処理コスト|EMPLOYEE|*(xD+1)を合計した処理コストである。
リレーションEMPLOYEEには、20件のレコードが5つのブロックに格納してある。xD+1は、B+ツリーインデックスなどマルチレベルのインデックスのレベルとブロックをアクセスする処理コストであり、図3−1のリレーションDEPARTMENTに存在する主インデックスのレベルxDは1であるので、タスクtG1 SG2の処理コストは、bE+(|EMPLOYEE|*(xD+1))=5+(20*(1+1))=45である。
タスクt2 1の処理コストは、主インデックスを使用して1つのレコードを検索する処理コストである。これは、リレーションのEMPLOYEEの主インデックスのレベルxEとブロックをアクセスする処理コストであり、図3−2のリレーションEMPLOYEEの主インデックスのレベルは1であるので、処理コストはxE+1=2である。
The processing cost of task t G1 SG1 is linear search for the relation EMPLOYEE and accesses five blocks, so the processing cost is b E = 5.
The processing cost of task t G1 SG2 is the processing cost of scanning relation EMPLOYEE b E and the processing cost of finding records that can be combined using the primary index of relation DEPARTMENT for each record in EMPLOYEE | EMPLOYEE | * (x D +1) is the total processing cost.
In relation EMPLOYEE, 20 records are stored in 5 blocks. x D +1 is the processing cost for accessing the level and block of a multi-level index such as a B + tree index, and the level x D of the main index existing in the relation DEPARTMENT in FIG. The processing cost of t G1 SG2 is b E + (| EMPLOYEE | * (x D +1)) = 5+ (20 * (1 + 1)) = 45.
The processing cost of task t 2 1 is the processing cost for searching for one record using the main index. This is the processing cost to access the block EMPLOYEE main index level x E of the relation, and the processing index is x E + 1 = 2 since the level of the main index of the relation EMPLOYEE in FIG. 3-2 is 1. It is.

以上のようにタスクtG1 SG1,tG1 SG2,t2 1に対して、処理コストを計算し、処理コストをもとに、これらのタスクを処理コストの小さい順番から並び替えると次のようになる。
sort(tG1 SG1,tG1 SG2,t2 1) ⇒ (t2 1,tG1 SG1,tG1 SG2)
sort(…)は並べ替えを表している。
To the task t G1 SG1, t G1 SG2, t 2 1 As described above, the processing cost is calculated, based on the processing cost, Rearranging these tasks from increasing order of processing cost as follows Become.
sort (t G1 SG1 , t G1 SG2 , t 2 1 ) ⇒ (t 2 1 , t G1 SG1 , t G1 SG2 )
sort (...) represents sorting.

[(a−3)各タスクに対応するブロックの集合]
タスクt2 1,tG1 SG1,tG1 SG2を処理するにあたって、インデックスを用いてアクセスする必要のあるリレーションのすべてのブロックを事前に調べて、各タスクに対応するブロック集合B2 1,BG1 SG1,BG1 SG2に集めると、次のようになる。
タスクt2 1に対するブロック集合:B2 1={b2}
タスクtG1 SG1に対するブロック集合:BG1 SG1={b1,b2,b3,b4,b5}
タスクtG1 SG2に対するブロック集合:BG1 SG2={b1,b2,b3,b4,b5}
このように、各タスクt2 1,tG1 SG1,tG1 SG2に対応するブロック集合B2 1,BG1 SG1,BG1 SG2を見出すことができるのは、以下に示すような理由にもとづくからである。
[(A-3) Set of blocks corresponding to each task]
When processing the tasks t 2 1 , t G1 SG1 , t G1 SG2 , all the blocks of the relation that need to be accessed using the index are examined in advance, and the block sets B 2 1 , B G1 corresponding to each task SG1, B G1 by collecting the SG2, as follows.
Block set for task t 2 1 : B 2 1 = {b 2 }
Block set for task t G1 SG1 : B G1 SG1 = {b 1 , b 2 , b 3 , b 4 , b 5 }
Block set for task t G1 SG2 : B G1 SG2 = {b 1 , b 2 , b 3 , b 4 , b 5 }
Thus, the block sets B 2 1 , B G1 SG1 , and B G1 SG2 corresponding to the tasks t 2 1 , t G1 SG1 , and t G1 SG2 can be found because of the following reasons. It is.

タスクt2 1は、選択条件”SSN=164545566”を満たすレコードが必要である。リレーションEMPLOYEEの主インデックスを使用すると、属性SSNの値が164545566であるレコードはブロックの相対アドレスが256であるブロックb2に格納してあることがわかり、ブロックb2だけをアクセスすることが必要となるので、タスクt2 1の処理を行うためにアクセスする必要のあるブロックの集合は{b2}となる。ブロックb2の相対アドレスとはリレーションEMPLOYEEの最初のブロックアドレスをゼロとしたときに、そこから何バイト移動したところにブロックb2が格納してあるかを表したものである。 The task t 2 1 needs a record that satisfies the selection condition “SSN = 164545566”. Using the primary index of the relation EMPLOYEE, you can see that the record with attribute SSN value 164545566 is stored in block b 2 with a relative block address of 256, and only block b 2 needs to be accessed. Therefore, the set of blocks that need to be accessed to perform the task t 2 1 is {b 2 }. When the first block address of the relation EMPLOYEE zero the relative address of the block b 2, in which the block b 2 is expressed or are stored in was many bytes moved from there.

タスクtG1 SG1は、選択条件”BDATE<'NOV-21-1966' OR BDATE>'JAN-1-1971'”を満たすレコードが必要である。リレーションEMPLOYEEの属性BDATEにはインデックスが存在しないので、リレーションEMPLOYEE内のすべてのレコードを線形探索するために、リレーションEMPLOYEEの最初のブロックb1から最後のブロックb5までのブロックをアクセスすることが必要となるので、タスクtG1 SG1の処理を行うためにアクセスする必要のあるブロックの集合は{b1,b2,b3,b4,b5}となる。 The task t G1 SG1 needs a record that satisfies the selection condition “BDATE <'NOV-21-1966' OR BDATE>'JAN-1-1971'". Since there is no index on attribute BDATE of relation EMPLOYEE, it is necessary to access blocks from the first block b 1 to the last block b 5 of relation EMPLOYEE to linearly search all records in relation EMPLOYEE Therefore, the set of blocks that need to be accessed in order to perform the task t G1 SG1 is {b 1 , b 2 , b 3 , b 4 , b 5 }.

タスクtG1 SG2は、結合演算の処理を行うために、リレーションEMPLOYEEの最初のブロックb1から最後のブロックb5までのブロックをアクセスすることが必要となるので、タスクtG1 SG2の処理を行うためにアクセスする必要のあるブロックの集合は{b1,b2,b3,b4,b5}となる。 Since task t G1 SG2 needs to access the blocks from the first block b 1 to the last block b 5 of the relation EMPLOYEE in order to perform the join operation, it processes task t G1 SG2. Therefore, the set of blocks that need to be accessed is {b 1 , b 2 , b 3 , b 4 , b 5 }.

[(a−4)アクセスすべきブロック(共通ブロック)の順位の決定]
以上のように、各タスクに対応するブロック集合を見出した後に、処理コストの小さいタスクから処理コストの大きいタスクへと順番に、すなわちタスクt2 1,tG1 SG1,tG1 SG2の順番に各タスクに対応するブロック集合の和集合を求めていくことにする。
まず、TB0={}(空集合)として、TB0とタスクt2 1に対応するブロック集合B2 1と和集合TB2 1を求める。次に、このTB2 1とタスクtG1 SG1に対応するブロック集合BG1 SG1の和集合TBG1 SG1を求める。さらに、このTBG1 SG1とタスクtG1 SG2に対応するブロック集合BG1 SG2との和集合TBG1 SG2を求めると次のようになる。この場合、和集合を求めるに当たっては、新たに加える集合は和集合の中で最後に加えていくものとする。
TB0={}
タスクt2 1に対応する集合B2 1との和集合:TB2 1=TB0∪B2 1={b2}
タスクtG1 SG1に対応する集合BG1 SG1との和集合:TBG1 SG1=TB2 1∪BG1 SG1={b2,b1,b3,b4,b5}
タスクtG1 SG2に対応する集合BG1 SG2との和集合:TBG1 SG2=TBG1 SG1∪BG1 SG2={b2,b1,b3,b4,b5}
[(A-4) Determination of order of blocks to be accessed (common blocks)]
As described above, after finding a block set corresponding to each task, each task is in order from a task with a low processing cost to a task with a high processing cost, that is, in order of tasks t 2 1 , t G1 SG1 , t G1 SG2. Let's find the union of the block set corresponding to the task.
First, as TB 0 = {} (empty set), a block set B 2 1 and a union set TB 2 1 corresponding to TB 0 and task t 2 1 are obtained. Then, the sum set TB G1 SG1 of the block set B G1 SG1 corresponding to the TB 2 1 and task t G1 SG1. Furthermore, the sum set TB G1 SG2 of the block set B G1 SG2 corresponding to the TB G1 SG1 and the task t G1 SG2 is obtained as follows. In this case, when obtaining the union, the newly added set is added last in the union.
TB 0 = {}
Union set with set B 2 1 corresponding to task t 2 1 : TB 2 1 = TB 0 ∪B 2 1 = {b 2 }
The union of the set B G1 SG1 corresponding to the task t G1 SG1 : TB G1 SG1 = TB 2 1 ∪B G1 SG1 = {b 2 , b 1 , b 3 , b 4 , b 5 }
Union of a set B G1 SG2 corresponding to the task t G1 SG2: TB G1 SG2 = TB G1 SG1 ∪B G1 SG2 = {b 2, b 1, b 3, b 4, b 5}

以上のように、処理コストの小さいタスクに対応するブロック集合から処理コストの大きいタスクに対応するブロック集合へと順番に和集合を求めていくと、最後のタスク(処理コストの1番大きいタスク)に対応するブロック集合との和集合TBG1 SG2から、ディスクのブロックb2からアクセスを開始し、ブロックb5でアクセスを終了すればよいことになり、ディスクにおけるリレーションEMPLOYEE内のブロックへのアクセスの順番を(b2,b1,b3,b4,b5)のように決定することができる。このような方法で和集合を求めることは、処理コストの小さいタスクから順番に処理を行うに当たって、ディスク内のブロックをどのような順番でアクセスすればよいか、その順番を決定するためである。このようにして得られたブロックb2,b1,b3,b4,b5は、タスクt2 1,tG1 SG1,tG1 SG2を順番に処理していくときに共有され得るので、これらのブロックを共通ブロックと呼ぶことにする。 As described above, when the union is obtained in order from the block set corresponding to the task with the low processing cost to the block set corresponding to the task with the high processing cost, the last task (the task with the highest processing cost) From the union TB G1 SG2 with the block set corresponding to, access should be started from block b 2 of the disk, and access should be terminated at block b 5 , and access to the blocks in the relation EMPLOYEE on the disk The order can be determined as (b 2 , b 1 , b 3 , b 4 , b 5 ). The reason for obtaining the union by this method is to determine the order in which blocks in the disk should be accessed in order from the task with the lowest processing cost. Since the blocks b 2 , b 1 , b 3 , b 4 , and b 5 obtained in this way can be shared when processing the tasks t 2 1 , t G1 SG1 , t G1 SG2 in order, These blocks are called common blocks.

前述したブロック集合B2 1,BG1 SG1,BG1 SG2の中に含まれているブロックを見ると、ブロックb2は、タスクt2 1,tG1 SG1,tG1 SG2を処理するために使用され、ブロックb1は、タスクtG1 SG1,tG1 SG2を処理するために使用され、ブロックb3,b4,b5は、タスクtG1 SG1,tG1 SG2を処理するために使用されることがわかる。これらのブロックを共通ブロックとして扱うことにすると、これらの共通ブロックを必要とするタスクを共通ブロック上で一度に処理することができる。以上のことをまとめると次のような表になる。
Looking at the blocks contained in the block sets B 2 1 , B G1 SG1 and B G1 SG2 described above, the block b 2 is used to process the tasks t 2 1 , t G1 SG1 and t G1 SG2. Block b 1 is used to process tasks t G1 SG1 and t G1 SG2 , and blocks b 3 , b 4 and b 5 are used to process tasks t G1 SG1 and t G1 SG2 I understand that. If these blocks are handled as common blocks, tasks that require these common blocks can be processed at once on the common block. The following table summarizes the above.

[(a−5)共通ブロックでのタスクの処理]
以上のように、それぞれの共通ブロックでどのようなタスクが処理されるかを見出すためには、タスクt2 1,tG1 SG1,tG1 SG2に対して作成されたブロック集合B2 1,BG1 SG1,BG1 SG2の情報にもとづいて、次に記述するような手順を用いればよい。
最初に、ブロックの相対アドレスが256であるブロックb2をディスクからアクセスして、ブロックb2内のデータをメインメモリに読み込み、グループ内のタスクt2 1,tG1 SG1,tG1 SG2がブロックb2で処理を行う必要があるかどうかを調べるため、ブロックb2を集合{b2}として表し、この{b2}とブロックの集合B2 1,BG1 SG1,BG1 SG2との間でそれぞれ積集合(Intersection)を求めると次のようになる。
タスクt2 1に対して:B2 1∩{b2}={b2}
タスクtG1 SG1に対して:BG1 SG1∩{b2}={b2}
タスクtG1 SG2に対して:BG1 SG2∩{b2}={b2}
[(A-5) Task processing in common block]
As described above, in order to find out what kind of task is processed in each common block, the block sets B 2 1 , B created for the tasks t 2 1 , t G1 SG1 , t G1 SG2 Based on the information of G1 SG1 and B G1 SG2, the following procedure may be used.
First, the block b 2 whose block relative address is 256 is accessed from the disk, the data in the block b 2 is read into the main memory, and the tasks t 2 1 , t G1 SG1 and t G1 SG2 in the group block to investigate whether it is necessary to perform processing in b 2, between the block b 2 a expressed as a set {b 2}, the {b 2} a set of blocks B 2 1, B G1 SG1, B G1 SG2 Then, the product set (Intersection) is obtained as follows.
For task t 2 1 : B 2 1 ∩ {b 2 } = {b 2 }
For task t G1 SG1 : B G1 SG1 ∩ {b 2 } = {b 2 }
For task t G1 SG2 : B G1 SG2 ∩ {b 2 } = {b 2 }

タスクt2 1,tG1 SG1,tG1 SG2に対する積集合が{b2}となり、タスクt2 1,tG1 SG1,tG1 SG2がメインメモリに読み込んだブロックb2で処理を行う必要があることが明らかになり、ブロックb2は共通ブロックとなり、共通ブロックb2で各タスクの処理を行うことになる。共通ブロックであるブロックb2でのタスクの処理が終了すると、ブロックb2を再びアクセスする必要がなくなるので、ブロックb2を取り除くために、集合B2 1,BG1 SG1,BG1 SG2と集合{b2}との差集合(Difference)を求める。得られた差集合の値をB2 1(1),BG1 SG1(1),BG1 SG2(1)とすると、次のようになる。
タスクt2 1に対して:B2 1−{b2}={}=B2 1(1)
タスクtG1 SG1に対して:BG1 SG1−{b2}={b1,b3,b4,b5}=BG1 SG1(1)
タスクtG1 SG2に対して:BG1 SG2−{b2}={b1,b3,b4,b5}=BG1 SG2(1)
この結果、集合B2 1(1)が空集合{}になりタスクt2 1の処理が終了したことがわかる。
The product set for tasks t 2 1 , t G1 SG1 , t G1 SG2 is {b 2 }, and task t 2 1 , t G1 SG1 , t G1 SG2 must perform processing in block b 2 read into the main memory As a result, the block b 2 becomes a common block, and each task is processed in the common block b 2 . When the processing of the task in the block b 2 which is the common block is completed, it is not necessary to access the block b 2 again, so that the set B 2 1 , B G1 SG1 and B G1 SG2 are set to remove the block b 2. Find the difference (Difference) with {b 2 }. If the values of the obtained difference set are B 2 1 (1) , B G1 SG1 (1) , and B G1 SG2 (1) , the result is as follows.
For task t 2 1 : B 2 1 − {b 2 } = {} = B 2 1 (1)
For task t G1 SG1 : B G1 SG1 − {b 2 } = {b 1 , b 3 , b 4 , b 5 } = B G1 SG1 (1)
For task t G1 SG2 : B G1 SG2 − {b 2 } = {b 1 , b 3 , b 4 , b 5 } = B G1 SG2 (1)
As a result, it can be seen that the set B 2 1 (1) becomes the empty set {} and the processing of the task t 2 1 is completed.

次に、ブロックの相対アドレスが0であるブロックb1をディスクからアクセスして、ブロックb1内のデータをメインメモリに読み込み、すでに処理の済んだタスクt2 1を除くグループ内のタスクtG1 SG1,tG1 SG2がブロックb1で処理を行う必要があるかどうかを調べるために、ブロックb1を集合{b1}として表し、{b1}とブロックの集合BG1 SG1(1),BG1 SG2(1)との間でそれぞれ積集合を求めると次のようになる。
タスクtG1 SG1に対して:BG1 SG1(1)∩{b1}={b1}
タスクtG1 SG2に対して:BG1 SG2(1)∩{b1}={b1}
タスクtG1 SG1,tG1 SG2に対する積集合が{b1}となり、タスクtG1 SG1,tG1 SG2がメインメモリに読み込んだブロックb1で処理を行うことが必要となり、ブロックb1は共通ブロックとなり、共通ブロックb1で各タスクの処理を行うことになる。共通ブロックであるブロックb1でのタスクの処理が終了すると、ブロックb1を再びアクセスする必要がなくなるので、集合BG1 SG1(1),BG1 SG2(1)と集合{b1}との差集合を求める。得られた差集合の値をBG1 SG1(2),BG1 SG2(2)とすると、次のようになる。
タスクtG1 SG1に対して:BG1 SG1(1)−{b1}={b3,b4,b5}=BG1 SG1(2)
タスクtG1 SG2に対して:BG1 SG2(1)−{b1}={b3,b4,b5}=BG1 SG2(2)
Next, block b 1 whose block relative address is 0 is accessed from the disk, the data in block b 1 is read into the main memory, and task t G1 in the group excluding task t 2 1 that has already been processed SG1, in order t G1 SG2 determine whether it is necessary to perform processing in blocks b 1, represents a block b 1 as a set {b 1}, {b 1} and the set of blocks B G1 SG1 (1), The product set with B G1 SG2 (1) is calculated as follows.
For task t G1 SG1 : B G1 SG1 (1) ∩ {b 1 } = {b 1 }
For task t G1 SG2 : B G1 SG2 (1) ∩ {b 1 } = {b 1 }
The product set for tasks t G1 SG1 and t G1 SG2 is {b 1 }, and tasks t G1 SG1 and t G1 SG2 need to perform processing in block b 1 read into the main memory, and block b 1 is a common block Thus, each task is processed in the common block b 1 . When the processing of the task in the block b 1 which is a common block is completed, it is not necessary to access the block b 1 again, so that the set B G1 SG1 (1) , B G1 SG2 (1) and the set {b 1 } Find the difference set. Assuming that the values of the difference set are B G1 SG1 (2) and B G1 SG2 (2) , the following is obtained.
For task t G1 SG1 : B G1 SG1 (1) − {b 1 } = {b 3 , b 4 , b 5 } = B G1 SG1 (2)
For task t G1 SG2 : B G1 SG2 (1) − {b 1 } = {b 3 , b 4 , b 5 } = B G1 SG2 (2)

次に、ブロックの相対アドレスが512であるブロックb3をディスクからアクセスして、ブロックb3内のデータをメインメモリに読み込み、すでに処理の済んだタスクt2 1を除くグループ内のタスクtG1 SG1,tG1 SG2がブロックb3で処理を行う必要があるかどうかを調べるために、ブロックb3を集合{b3}として表し、{b3}とブロックの集合BG1 SG1(2),BG1 SG2(2)との間で積集合を求めると次のようになる。
タスクtG1 SG1に対して:BG1 SG1(2)∩{b3}={b3}
タスクtG1 SG2に対して:BG1 SG2(2)∩{b3}={b3}
タスクtG1 SG1,tG1 SG2に対する積集合が{b3}となり、タスクtG1 SG1,tG1 SG2がメインメモリに読み込んだブロックb3で処理を行うことが必要となり、ブロックb3は共通ブロックとなり、共通ブロックb3でタスクtG1 SG1,tG1 SG2の処理を行うことになる。共通ブロックであるブロックb3でのタスクの処理が終了すると、ブロックb3を再びアクセスする必要がなくなるので、集合BG1 SG1(2),BG1 SG2(2)と集合{b3}との差集合を求めて、得られた差集合の値をBG1 SG1(3),BG1 SG2(3)とすると、次のようになる。
タスクtG1 SG1に対して:BG1 SG1(2)−{b3}={b4,b5}=BG1 SG1(3)
タスクtG1 SG2に対して:BG1 SG2(2)−{b3}={b4,b5}=BG1 SG2(3)
Next, the block b 3 whose block relative address is 512 is accessed from the disk, the data in the block b 3 is read into the main memory, and the task t G1 in the group excluding the already processed task t 2 1 SG1, t G1 SG2 is to determine whether it is necessary to perform processing at block b 3, represents the block b 3 as a set {b 3}, {b 3 } a set of blocks B G1 SG1 (2), The product set with B G1 SG2 (2) is as follows.
For task t G1 SG1 : B G1 SG1 (2) ∩ {b 3 } = {b 3 }
For task t G1 SG2 : B G1 SG2 (2) ∩ {b 3 } = {b 3 }
The product set for tasks t G1 SG1 and t G1 SG2 is {b 3 }, and tasks t G1 SG1 and t G1 SG2 must perform processing in block b 3 read into the main memory, and block b 3 is a common block Thus, the tasks t G1 SG1 and t G1 SG2 are processed in the common block b 3 . When the processing of the task in the block b 3 which is a common block is completed, it is not necessary to access the block b 3 again, so the set B G1 SG1 (2) , B G1 SG2 (2) and the set {b 3 } When the difference set is obtained and the values of the obtained difference set are B G1 SG1 (3) and B G1 SG2 (3) , the following is obtained.
For task t G1 SG1 : B G1 SG1 (2) − {b 3 } = {b 4 , b 5 } = B G1 SG1 (3)
For task t G1 SG2 : B G1 SG2 (2) − {b 3 } = {b 4 , b 5 } = B G1 SG2 (3)

次に、ブロックの相対アドレスが768であるブロックb4をディスクからアクセスして、ブロックb4内のデータをメインメモリに読み込み、すでに処理の済んだタスクt2 1を除くグループ内のタスクtG1 SG1,tG1 SG2がブロックb4で処理を行う必要があるかどうかを調べるために、ブロックb4を集合{b4}として表し、{b4}とブロックの集合BG1 SG1(3),BG1 SG2(3)との間で積集合を求めると次のようになる。
タスクtG1 SG1に対して:BG1 SG1(3)∩{b4}={b4}
タスクtG1 SG2に対して:BG1 SG2(3)∩{b4}={b4}
タスクtG1 SG1,tG1 SG2に対する積集合が{b4}となり、タスクtG1 SG1,tG1 SG2がメインメモリに読み込んだブロックb4で処理を行うことが必要となり、ブロックb4は共通ブロックとなり、共通ブロックb4でタスクtG1 SG1,tG1 SG2の処理を行うことになる。共通ブロックであるブロックb4でのタスクの処理が終了すると、ブロックb4を再びアクセスする必要がなくなるので、集合BG1 SG1(3),BG1 SG2(3)と集合{b4}との差集合を求める。得られた差集合の値をBG1 SG1(4),BG1 SG2(4)とすると、次のようになる。
タスクtG1 SG1に対して:BG1 SG1(3)−{b4}={b5}=BG1 SG1(4)
タスクtG1 SG2に対して:BG1 SG2(3)−{b4}={b5}=BG1 SG2(4)
Next, block b 4 whose block relative address is 768 is accessed from the disk, the data in block b 4 is read into the main memory, and task t G1 in the group excluding already processed task t 2 1 SG1, in order t G1 SG2 determine whether it is necessary to perform processing at block b 4, represents a block b 4 as a set {b 4}, {b 4 } a set of blocks B G1 SG1 (3), The product set with B G1 SG2 (3) is as follows.
For task t G1 SG1 : B G1 SG1 (3) ∩ {b 4 } = {b 4 }
For task t G1 SG2 : B G1 SG2 (3) ∩ {b 4 } = {b 4 }
The product set for tasks t G1 SG1 and t G1 SG2 is {b 4 }, and tasks t G1 SG1 and t G1 SG2 need to perform processing in block b 4 read into the main memory, and block b 4 is a common block Thus, the tasks t G1 SG1 and t G1 SG2 are processed in the common block b 4 . When the processing of the task in the block b 4 which is a common block is completed, it is not necessary to access the block b 4 again, so the set B G1 SG1 (3) , B G1 SG2 (3) and the set {b 4 } Find the difference set. Assuming that the values of the difference set are B G1 SG1 (4) and B G1 SG2 (4) , the following is obtained.
For task t G1 SG1 : B G1 SG1 (3) -{b 4 } = {b 5 } = B G1 SG1 (4)
For task t G1 SG2 : B G1 SG2 (3) − {b 4 } = {b 5 } = B G1 SG2 (4)

最後に、ブロックの相対アドレスが1024であるブロックb5をディスクからアクセスして、ブロックb5内のデータをメインメモリに読み込み、すでに処理の済んだタスクt2 1を除くグループ内のタスクtG1 SG1,tG1 SG2がブロックb5で処理を行う必要があるかどうかを調べるために、ブロックb5を集合{b5}として表し、集合{b5}とブロックの集合BG1 SG1(4),BG1 SG2(4)との間で積集合を求めると次のようになる。
タスクtG1 SG1に対して:BG1 SG1(4)∩{b5}={b5}
タスクtG1 SG2に対して:BG1 SG2(4)∩{b5}={b5}
タスクtG1 SG1,tG1 SG2に対する積集合が{b5}となり、タスクtG1 SG1,tG1 SG2がメインメモリに読み込んだブロックb5で処理を行うことが必要となり、ブロックb5は共通ブロックとなり、共通ブロックb5でタスクtG1 SG1,tG1 SG2の処理を行う。共通ブロックであるブロックb5でのタスクの処理が終了すると、ブロックb5を再びアクセスする必要がなくなるので、集合BG1 SG1(4),BG1 SG2(4)と集合{b5}との差集合を求める。得られた差集合の値をBG1 SG1(5),BG1 SG2(5)とすると、次のようになる。
タスクtG1 SG1に対して:BG1 SG1(4)−{b5}={}=BG1 SG1(5)
タスクtG1 SG2に対して:BG1 SG2(4)−{b5}={}=BG1 SG2(5)
この結果、集合BG1 SG1(5),BG1 SG2(5)が空集合{}になり、タスクtG1 SG1,tG1 SG2の処理が終了したことがわかり、これによってグループ内のすべてのタスクの処理が終了したことになる。
Finally, block b 5 whose block relative address is 1024 is accessed from the disk, the data in block b 5 is read into the main memory, and task t G1 in the group excluding task t 2 1 that has already been processed SG1, in order t G1 SG2 determine whether it is necessary to perform processing at block b 5, represents a block b 5 as a set {b 5}, the set {b 5} a set of blocks B G1 SG1 (4) , B G1 SG2 (4) , the product set is obtained as follows.
For task t G1 SG1 : B G1 SG1 (4) ∩ {b 5 } = {b 5 }
For task t G1 SG2 : B G1 SG2 (4) ∩ {b 5 } = {b 5 }
The product set for tasks t G1 SG1 and t G1 SG2 is {b 5 }, and tasks t G1 SG1 and t G1 SG2 need to perform processing in block b 5 read into the main memory, and block b 5 is a common block Thus, tasks t G1 SG1 and t G1 SG2 are processed in the common block b 5 . When the processing of the task in the block b 5 which is a common block is finished, it is not necessary to access the block b 5 again, so the set B G1 SG1 (4) , B G1 SG2 (4) and the set {b 5 } Find the difference set. When the values of the obtained difference set are B G1 SG1 (5) and B G1 SG2 (5) , the following is obtained.
For task t G1 SG1 : B G1 SG1 (4) − {b 5 } = {} = B G1 SG1 (5)
For task t G1 SG2 : B G1 SG2 (4) − {b 5 } = {} = B G1 SG2 (5)
As a result, it can be seen that the sets B G1 SG1 (5) and B G1 SG2 (5) become empty sets {}, and the processing of the tasks t G1 SG1 and t G1 SG2 is completed. This is the end of the process.

このように共通ブロックを利用して、ディスク内のリレーションのブロックを何度もアクセスすることなしに、グループ内のタスク処理を一度に行い、処理コストの小さいタスクから順番に次々と処理を行っていき、最後のタスク処理ですべてのタスク処理を終了させることができる。   In this way, using the common block, the task processing in the group is performed at once without accessing the relation block in the disk many times, and the processing is performed in order from the task with the lowest processing cost. All task processing can be terminated by the last task processing.

図7は、リレーションEMPLOYEEに対するタスクt2 1,tG1 SG1,tG1 SG2を、スタティック・マルチオペレーション・プロセッシングを使用して処理する様子を示す図である。
図7において、リレーションEMPLOYEEに対するタスクt2 1,tG1 SG1,tG1 SG2の処理を、処理コストの小さいタスクからアクセスしてく状態(スキャン1からスキャン3にわたって)と、処理結果のリレーションTEMP_T1_2,TEMP_SG1_G1,TEMP_SG2_G1に書き込んだ結果を表わしている。
一連のタスクの処理を行うプロセス(501)は、ディスク内のブロックをスキャン1でb2を、スキャン2でb1を、スキャン3でb3,b4,b5を、順にアクセスする。
プロセス(501)は、アクセスする各ブロックにおいて、そのブロックで処理を行う必要のあるグループ内のタスクの処理を一度に行い、処理結果をリレーションTEMP_T1_2,TEMP_SG1_G1,TEMP_SG2_G1に書き込み、すべてのブロックでのタスク処理が終了すると、スタティック・マルチオペレーション・プロセッシングによるグループG1のタスク処理は終了したことになる。
FIG. 7 is a diagram illustrating how the tasks t 2 1 , t G1 SG1 , and t G1 SG2 for the relation EMPLOYEE are processed using static multi-operation processing.
In FIG. 7, the processing of tasks t 2 1 , t G1 SG1 and t G1 SG2 for the relation EMPLOYEE is accessed from a task with a low processing cost (from scan 1 to scan 3), and the processing result relations TEMP_T1_2 and TEMP_SG1_G1 , TEMP_SG2_G1 represents the result written.
A process (501) for processing a series of tasks accesses blocks in the disk by scan 1 with b 2 , scan 2 with b 1 , scan 3 with b 3 , b 4 , and b 5 in order.
The process (501) processes the tasks in the group that need to be processed in each block to be accessed at one time, writes the processing result to the relation TEMP_T1_2, TEMP_SG1_G1, TEMP_SG2_G1, and the task in all blocks When the processing is completed, the task processing of the group G1 by static multi-operation processing is completed.

[(a−6)サブグループ内のタスクによる合成選択演算の処理結果の共有]
図7において、合成選択演算タスクtG1 SG1の処理結果TEMP_SG1_G1(503)は、サブグループ内のタスクt1 3,t3 2,t6 3の処理結果のすべてを含んでいるため、サブグループ内のタスクt1 3,t3 2,t6 3は、合成選択演算タスクtG1 SG2の処理結果TEMP_SG1_G1(503)を部分的に共有することになる。
[(A-6) Sharing of processing result of composition selection calculation by tasks in subgroup]
In FIG. 7, the processing result TEMP_SG1_G1 (503) of the composition selection calculation task t G1 SG1 includes all the processing results of the tasks t 1 3 , t 3 2 , and t 6 3 in the sub group. Tasks t 1 3 , t 3 2 , and t 6 3 partially share the processing result TEMP_SG1_G1 (503) of the synthesis selection calculation task t G1 SG2 .

図7に示した合成選択演算タスクtG1 SG1の処理結果TEMP_SG1_G1(503)は、選択条件に使用された属性BDATEの値で整列してあり、サブグループ内の個々のタスクt1 3,t3 2,t6 3の処理結果にそれぞれ対応する仮想リレーションTEMP_T3_1,TEMP_T2_3,TEMP_T3_6が処理結果TEMP_SG1_G1のレコードを部分的に共有している様子を表わしている。サブグループ内のタスクが合成関係演算タスクtG1 SG1の処理結果TEMP_SG1_G1を部分的に共有していることを示すために、処理結果TEMP_SG1_G1内のレコードを合成選択演算の選択条件に使用された属性BDATEの値で整列したときに、サブグループ内の個々のタスクt1 3,t3 2,t6 3に対して、以下のように仮想リレーションTEMP_T3_1,TEMP_T2_3,TEMP_T3_6を作成する。仮想リレーションには共有する合成関係演算タスクの処理結果(リレーション)名、その処理結果を共有するレコードの格納位置(レコードの行範囲、レコードが格納されているブロックの番号とアドレス)を記録しておく。
TEMP_T3_1={リレーション:TEMP_SG1_G1; 行:1〜9; ブロック:b1[0,256],b2[256,512],b3[512,768]};
TEMP_T2_3={リレーション:TEMP_SG1_G1; 行:13〜16; ブロック:b4[768,-]};
TEMP_T3_6={リレーション:TEMP_SG1_G1; 行:7〜12; ブロック:b2[256,512],b3[512,768]};
The processing result TEMP_SG1_G1 (503) of the composite selection calculation task t G1 SG1 shown in FIG. 7 is aligned with the value of the attribute BDATE used for the selection condition, and the individual tasks t 1 3 and t 3 in the subgroup are arranged. 2, t 6 3 of the processing result to the corresponding virtual relation TEMP_T3_1, TEMP_T2_3, represents how the TEMP_T3_6 is a record of the processing result TEMP_SG1_G1 partially shared. The attribute BDATE used in the selection condition of the composite selection operation is used to indicate that the tasks in the subgroup partially share the processing result TEMP_SG1_G1 of the composite-related operation task t G1 SG1. Virtual relations TEMP_T3_1, TEMP_T2_3, and TEMP_T3_6 are created for the individual tasks t 1 3 , t 3 2 , and t 6 3 in the subgroup as follows. In the virtual relation, record the processing result (relation) name of the compositing relation calculation task to be shared, and the storage location of the record sharing the processing result (the row range of the record, the block number and address where the record is stored) deep.
TEMP_T3_1 = {Relation: TEMP_SG1_G1; Row: 1-9; Block: b 1 [0,256], b 2 [256,512], b 3 [512,768]};
TEMP_T2_3 = {Relation: TEMP_SG1_G1; Line: 13-16; Block: b 4 [768,-]};
TEMP_T3_6 = {Relation: TEMP_SG1_G1; Row: 7-12; Block: b 2 [256,512], b 3 [512,768]};

仮想リレーションTEMP_T3_1は、サブグループSG1G1内のタスクt1 3の処理結果であり、合成関係演算タスクtG1 SG1の処理結果TEMP_SG1_G1のブロックb1,b2,b3に格納してあるレコードの1行から9行までを共有していることを表わしている。
仮想リレーションTEMP_T2_3は、サブグループSG1G1内のタスクt3 2の処理結果であり、TEMP_SG1_G1のブロックb4に格納してあるレコードの13行から16行までを共有していることを表わしている。
仮想リレーションTEMP_T3_6は、サブグループSG1G1内のタスクt6 3の処理結果であり、TEMP_SG1_G1のブロックb2,b3に格納してあるレコードの7行から12行までを共有していることを表わしている。
Virtual relation TEMP_T3_1 is a processing result of the task t 1 3 in the subgroup SG1 G1, synthetic relational operation block b 1 of the processing result TEMP_SG1_G1 task t G1 SG1, b 2, b 3 are stored in record 1 This means that lines 9 through 9 are shared.
The virtual relation TEMP_T2_3 is a processing result of the task t 3 2 in the subgroup SG1 G1 , and indicates that the 13th to 16th rows of the record stored in the block b 4 of the TEMP_SG1_G1 are shared.
Virtual relation TEMP_T3_6 is the task t 6 3 process results in the subgroup SG1 G1, indicates that they share to 12 lines from seven lines of the record that is stored in the block b 2, b 3 of TEMP_SG1_G1 ing.

[(a−7)合成選択演算の処理結果を共有するための手順]
合成選択演算タスクの処理結果得られたリレーションのレコードをサブグループ内個々の選択演算タスクが仮想リレーションを用いて部分的に共有するには、以下の手順を用いることになる。
(i)合成選択演算タスクの処理結果内のレコードは合成選択演算の選択条件に使用された属性の値で整列する。
(ii)整列された処理結果内のレコードをスキャンし、1つ1つのレコードがサブグループ内個々の選択演算タスクの選択条件を満たしているかどうかを調べていく。
(iii)合成選択演算タスクの処理結果において、どの行からどの行までのレコードがサブグループ内個々の選択演算タスクの選択範囲内のレコードであったかをそれぞれの処理結果である仮想リレーションに記録しておく。
[(A-7) Procedure for Sharing Processing Result of Composite Selection Operation]
In order for the individual selection calculation tasks in the subgroup to partially share the record of the relation obtained as a result of the processing of the composite selection calculation task using the virtual relation, the following procedure is used.
(I) Records in the processing result of the composite selection calculation task are aligned by the attribute values used in the selection conditions of the composite selection calculation.
(Ii) Scan the records in the sorted processing results to check whether each record satisfies the selection condition of each selection calculation task in the subgroup.
(Iii) In the processing result of the composite selection calculation task, record from which row to which row was a record within the selection range of each selection calculation task in the subgroup in the virtual relation that is the result of each processing. deep.

前述したよう合成選択演算tG1 SG1の処理結果TEMP_SG1_G1中からレコードを部分的に共有するサブグループSG1G1内のタスクは次のようなものである。
サブグループ SG1G1={t1 3,t3 2,t6 3}
(t1 3):TEMP_T3_1←σBDATE<'DEC-31-1961'EMPLOYEE
(t3 2):TEMP_T2_3←σBDATE>'JAN-1-1971'EMPLOYEE
(t6 3):TEMP_T3_6←σBDATE>'FEB-11-1959' AND BDATE<NOV-21-1966'EMPLOYEE
As described above, the tasks in the subgroup SG1 G1 that partially share records from the processing result TEMP_SG1_G1 of the synthesis selection calculation t G1 SG1 are as follows.
Subgroup SG1 G1 = {t 1 3 , t 3 2 , t 6 3 }
(t 1 3 ) : TEMP_T3_1 ← σ BDATE <'DEC-31-1961' EMPLOYEE
(t 3 2 ) : TEMP_T2_3 ← σ BDATE>'JAN-1-1971' EMPLOYEE
(t 6 3 ): TEMP_T3_6 ← σ BDATE>'FEB-11-1959' AND BDATE <NOV-21-1966 ' EMPLOYEE

図8−1,図8−2は、variable length record(可変長レコード),contiguous block allocation(隣接したブロックの配置),unspanned record(2つのブロックにまたがって格納されないレコード)のファイル形式で表せられる合成選択演算タスクtG1 SG1の処理結果TEMP_G1_SG1(600)内のレコードを、合成選択演算の選択条件に使用された属性BDATEの値をもとに、マージソートとクイックソートの2つのソートアルゴリズムを組み合わせて整列し、整列された処理結果(613)内のレコードを、サブグループSG1G1内の選択演算タスクt1 3,t3 2,t6 3の処理結果である仮想リレーションTEMP_T3_1,TEMP_T2_3,TEMP_T3_6が部分的に共有するための手順を表している。 FIGS. 8A and 8B are represented in the file format of variable length record, variable block allocation (adjacent block allocation), and unspanned record (record that is not stored across two blocks). Combined selection calculation task t G1 SG1 processing result TEMP_G1_SG1 (600) records are combined with two sort algorithms, merge sort and quick sort, based on the value of attribute BDATE used as the selection condition for the composite selection calculation. The virtual relations TEMP_T3_1, TEMP_T2_3, and TEMP_T3_6, which are the processing results of the selection operation tasks t 1 3 , t 3 2 , and t 6 3 in the subgroup SG1 G1, are stored in the sorted processing results (613). It represents the procedure for partial sharing.

(1)最初にマージソートを適用してリレーション内のブロック列をブロック数が1つになるまで再帰的に2つに分割していく(図8−1:600〜606)。 (1) First, a merge sort is applied, and the block sequence in the relation is recursively divided into two until the number of blocks becomes one (FIG. 8-1: 600 to 606).

(2)ブロック列内のブロック数が1つになると、ブロック列(図8−1:603〜606)をそれ以上分割することはできないので、ブロック列内のブロックb1〜b4を順番にメインメモリに読み込んで、属性BDATEの値をもとにブロック内のレコードを整列する。ブロック内のレコードを整列するにあたって、ブロック内の可変長レコードはそれぞれサイズが異なるので(バイト数が異なるので)、ブロック内の個々のレコードに対してポインタ(レコードのアドレス)(図8−1:614〜617)をメインメモリ内に配列させ、クイックソートを用いて配列されたポインタをポインタが持つレコードの値(レコードのアドレスから求められるレコードのBDATEの値)をもとに整列する。 (2) When the number of blocks in the block row becomes 1, the block row (FIG. 8-1: 603 to 606) cannot be further divided, so blocks b 1 to b 4 in the block row are sequentially Read into main memory and arrange the records in the block based on the value of attribute BDATE. When aligning the records in the block, the variable-length records in the block have different sizes (because the number of bytes is different), so pointers (record addresses) to the individual records in the block (FIG. 8-1: 614 to 617) are arranged in the main memory, and the pointers arranged using the quick sort are arranged based on the value of the record having the pointer (the BDATE value of the record obtained from the address of the record).

(3)整列されたポインタの順番(図8−2:618〜621)に従ってブロック内のレコードを並びかえる。 (3) The records in the block are rearranged according to the order of the aligned pointers (FIG. 8-2: 618 to 621).

(4)ブロック内のレコードが整列されると、次はマージソートによる再起の呼び出しから戻るときに(図8−2:607〜613)、整列済みの2つのブロック列から1つのブロック列に結合していく。結合するにあたっては、結合するレコードを整列された順番で並べていく。 (4) When the records in the block are aligned, the next time when returning from the recall call by merge sort (FIG. 8-2: 607 to 613), the two aligned block sequences are combined into one block sequence. I will do it. When merging, the records to be merged are arranged in the sorted order.

(5)最後に2つのブロック列(図8−2:611,612)が1つのブロック列(613)に結合される際に、1つ1つのレコードがサブグループSG1G1内の選択演算タスクt1 3,t3 2,t6 3の選択条件をそれぞれ満たしているかどうかを一度に調べていく。 (5) Finally, when two block strings (FIG. 8-2: 611, 612) are combined into one block string (613), each record is a selection operation task t in the subgroup SG1 G1 . Whether the selection conditions 1 3 , t 3 2 , and t 6 3 are satisfied is examined at a time.

(6)ブロック列(図8−2:613)にすべてレコードが整列されると、タスクt1 3,t3 2,t6 3に対して、ブロック列(613)に加えられたレコードの中でどの行からどの行までのレコードが選択範囲内のレコードであったかを仮想リレーションTEMP_T3_1,TEMP_T2_3,TEMP_T3_6に記録しておくことになる。仮想リレーションTEMP_T3_1,TEMP_T2_3,TEMP_T3_6には実際のレコードを加えるのではなく、前述したように整列された処理結果(613)を部分的に共有するレコードの格納位置(レコードの行範囲及びそれらのレコードが格納してあるブロックの番号とアドレス)を記録しておくことになる。 (6) When all the records are arranged in the block sequence (FIG. 8-2: 613), among the records added to the block sequence (613) for tasks t 1 3 , t 3 2 and t 6 3 Thus, it is recorded in the virtual relations TEMP_T3_1, TEMP_T2_3, and TEMP_T3_6 which record from which line to which line was within the selection range. Rather than adding actual records to the virtual relations TEMP_T3_1, TEMP_T2_3, and TEMP_T3_6, the storage locations of records that partially share the processing result (613) arranged as described above (the row range of records and those records are The stored block number and address) are recorded.

このようにして、サブグループSG1G1内の選択演算タスクt1 3,t3 2,t6 3が合成選択演算タスクtG1 SG1の処理結果TEMP_G1_SG1内のレコードを部分的に共有できるのは、処理結果TEMP_G1_SG1(613)内のレコードを整列するために用いた属性BDATEを、タスクt1 3,t3 2,t6 3が個々の選択条件に使用しているからである。このレコードを共有する範囲を調べる作業は、以上に述べた方法のようにリレーション内のレコードを最終的にブロック列(613)を形成するときに行うことが重要である。その理由は、最終的にブロック列(613)で整列した後に、サブグループ内のタスクのレコードの共有する範囲を求めると、再度、リレーション内のすべてのレコードをディスクから読み直さなければならなくなり、そのためにディスクアクセスが必要になるからである。 In this way, the selection computation tasks t 1 3 , t 3 2 , t 6 3 in the subgroup SG1 G1 can partially share the records in the processing result TEMP_G1_SG1 of the synthesis selection computation task t G1 SG1. This is because the tasks B 1 3 , T 3 2 , and T 6 3 use the attribute BDATE used to arrange the records in the result TEMP_G1_SG1 (613) as individual selection conditions. It is important that the work of examining the range sharing the record is performed when the record in the relation is finally formed into the block string (613) as in the method described above. The reason is that after finally aligning with the block column (613) and finding the shared range of the task records in the subgroup, all the records in the relation must be read again from the disk, This is because disk access is required.

その他、処理結果内のレコードを整列する必要がない場合、すなわち合成選択演算の選択条件に使用されている属性が主属性である場合は、処理結果内のレコードはすでに整列された順番に格納されていくことになるので、処理結果にレコードを加える際に、サブグループ内の個々の選択演算タスクの選択条件を満たしているかを一度に調べていくことになる。   In addition, when there is no need to arrange the records in the processing result, that is, when the attribute used in the selection condition of the composite selection operation is the main attribute, the records in the processing result are stored in the already arranged order. Therefore, when adding a record to the processing result, it is checked at a time whether the selection conditions of the individual selection calculation tasks in the subgroup are satisfied.

以上のようにして、サブグループに集められたいくつかの選択演算タスクを1つの合成選択演算タスクtG1 SG1に置き換えて処理を行うと、サブグループSG1G1内のタスクt1 3,t3 2,t6 3に対応する仮想リレーションは処理結果TEMP_SG1_G1内のレコードを部分的に共有することになり、サブグループ内の個々のタスクt1 3,t3 2,t6 3の間で選択範囲の重なっているレコードを含んだ処理結果のリレーションをディスク上に別々に作成する必要がなくなるので、ディスクをアクセスする回数を減少させ、クエリーの処理速度を向上させることができる。 As described above, when several selection calculation tasks collected in the subgroup are replaced with one synthesis selection calculation task t G1 SG1 , the tasks t 1 3 and t 3 2 in the sub group SG1 G1 are performed. , T 6 3 will partially share the records in the processing result TEMP_SG1_G1, and the selection range between the individual tasks t 1 3 , t 3 2 , t 6 3 in the subgroup Since it is not necessary to separately create relations of processing results including overlapping records on the disk, the number of times the disk is accessed can be reduced, and the query processing speed can be improved.

また、仮想リレーションを作成して合成選択演算タスクの処理結果を共有するその他の理由は、仮想リレーションを用いて合成選択演算タスクの処理結果に対して処理を行うタスクを別々に処理するのではなく、マルチオペレーション・プロセッシングを用いて一度に処理するためである。そのため仮想リレーションを用いて処理を行うタスクは、仮想リレーションをもとにしてグループ分けをするのではなく、仮想リレーションを包含している合成関係演算タスクの処理結果のリレーションをもとにグループ分けを行い、仮想リレーションに記録してある情報から共通ブロックを見出し、グループ内のタスク処理を一度に行っていくことになる。   Another reason for creating a virtual relation and sharing the processing result of the synthesis selection calculation task is not to separately process the task for processing the processing result of the synthesis selection calculation task using the virtual relation. This is because processing is performed at once using multi-operation processing. Therefore, tasks that perform processing using virtual relations are not grouped based on virtual relations, but are grouped based on relations of processing results of synthetic relational calculation tasks that include virtual relations. The common block is found from the information recorded in the virtual relation, and the task processing in the group is performed at once.

このようにして、仮想リレーションを用いたタスク処理を一度に行うと、合成選択演算の処理結果内のブロックは一度しかアクセスされないので、ディスクをアクセスする回数を減少させ、クエリーの処理速度を向上させることができる。   In this way, if task processing using virtual relations is performed at once, blocks in the processing result of the synthesis selection operation are accessed only once, so the number of disk accesses is reduced and query processing speed is improved. be able to.

[(a−8)その他の合成関係演算の処理結果の共有]
グループG1の合成関係演算タスクtG1 SG2の処理結果TEMP_SG2_G1は、サブグループSG2G1内のタスクt4 1,t5 1によって共有されることになる。合成関係演算タスクtG1 SG2は結合演算であり、サブグループSG2G1内のタスクt4 1,t5 1は、同一のタスク(t4 1≡t5 1)なので、タスクt4 1の処理結果TEMP_T1_4とタスクt5 1の処理結果TEMP_T1_5は、合成関係演算タスクtG1 SG2の処理結果TEMP_SG2_G1をそのまま、それぞれのタスクの処理結果として使用することになる(TEMP_T1_4≡TEMP_T1_5≡TEMP_SG2_G1)。
[(A-8) Sharing of processing results of other composition-related operations]
The processing result TEMP_SG2_G1 of the composition related calculation task t G1 SG2 of the group G1 is shared by the tasks t 4 1 and t 5 1 in the subgroup SG2 G1 . Since the composition-related operation task t G1 SG2 is a join operation and the tasks t 4 1 and t 5 1 in the subgroup SG2 G1 are the same task (t 4 1 ≡t 5 1 ), the processing result of the task t 4 1 TEMP_T1_4 and task t 5 1 processing result TEMP_T1_5 is the processing result TEMP_SG2_G1 synthetic relational operation task t G1 SG2 as it would be used as a processing result of each task (TEMP_T1_4≡TEMP_T1_5≡TEMP_SG2_G1).

[(a−9)新たなグループの作成]
マルチオペレーション・プロセッシングを使用してグループG1内の合成関係演算タスクtG1 SG1,tG1 SG2及びサブグループに集まらないタスクt2 1の処理が、タスクt2 1,tG1 SG1,tG1 SG2の順番で終了すると、図4−1〜図4−3の処理ツリーからトポロジカルソートの順番で新たに処理できるタスクを見出していくことになる。
最初にタスクt2 1が終了すると、処理ツリーP2からわかるように、新たにタスクt2 2の処理を始めることができるようになる。タスクt2 2は、タスクt2 1の処理結果TEMP_T1_2に対して処理を行うタスクとして、新たにグループG5(これまでのグループG4に加えて)を作成してグループG5にタスクt2 2を加えることにする。
[(A-9) Creation of new group]
Using multi-operation processing, the processing of the composition-related operation tasks t G1 SG1 and t G1 SG2 in the group G1 and the task t 2 1 that does not gather in the subgroup is performed by the tasks t 2 1 , t G1 SG1 and t G1 SG2 When the processing is completed in order, tasks that can be newly processed in the order of topological sort are found from the processing trees of FIGS. 4-1 to 4-3.
When the task t 2 1 ends first, as can be seen from the processing tree P 2 , processing of the task t 2 2 can be newly started. Task t 2 2 creates a new group G5 (in addition to the previous group G4) as a task for processing the processing result TEMP_T1_2 of task t 2 1 , and adds task t 2 2 to group G5 I will decide.

次に、タスクtG1 SG1の処理が終了すると、サブグループSG1G1内のタスクt1 3,t3 2,t6 3の処理が終了することになり、処理ツリーP1,P3,P6からわかるように、新たにタスクt1 4,t3 3,t6 4の処理ができるようになる。タスクt1 4,t3 3,t6 4はそれぞれアクセスする仮想リレーションが異なるが、タスクt1 4はタスクt1 3の処理結果である仮想リレーションTEMP_T3_1を包含している合成選択演算タスクtG1 SG1の処理結果TEMP_SG1_G1をアクセスし、タスクt3 3はタスクt3 2の処理結果である仮想リレーションTEMP_T2_3を包含している合成選択演算タスクtG1 SG1の処理結果TEMP_SG1_G1をアクセスし、タスクt6 4はタスクt6 3の処理結果である仮想リレーションTEMP_T3_6を包含している合成選択演算タスクtG1 SG1の処理結果TEMP_SG1_G1をアクセスするので、これらの新たなタスクt1 4,t3 3,t6 4は共通のリレーションTEMP_SG1_G1に対して処理を行うタスクとして、新たにグループG6を作成して、グループG6にタスクt1 4,t3 3,t6 4を加えることにする。 Next, when the processing of task t G1 SG1 ends, the processing of tasks t 1 3 , t 3 2 , t 6 3 in subgroup SG1 G1 ends, and processing trees P 1 , P 3 , P 6 As can be seen, the tasks t 1 4 , t 3 3 , and t 6 4 can be newly processed. Task t 1 4, t 3 3, t 6 4 virtual relation is different for each access, but the task t 1 4 task t 1 3 of the processing result is a virtual relation TEMP_T3_1 include by are synthetic select operation task t G1 accesses the processing result TEMP_SG1_G1 of SG1, it accesses the processing result TEMP_SG1_G1 task t 3 3 tasks t 3 encompass a is virtual relation TEMP_T2_3 2 treatment results are synthetic select operation task t G1 SG1, task t 6 4 Accesses the processing result TEMP_SG1_G1 of the synthesis selection calculation task t G1 SG1 including the virtual relation TEMP_T3_6 that is the processing result of the task t 6 3 , so these new tasks t 1 4 , t 3 3 , t 6 4 Creates a new group G6 as a task for processing the common relation TEMP_SG1_G1, and adds tasks t 1 4 , t 3 3 , and t 6 4 to the group G6.

最後に、タスクtG1 SG2の処理が終了すると、サブグループSG2G1内のタスクt4 1,t5 1の処理が終了することになり、処理ツリーP4,P5からわかるように、グループG4に集められたタスクt4 2,t5 2の処理が終了していないため、新たに処理できるタスクは見出されないのでグループは作成されない。 Finally, the processing of the task t G1 SG2 is finished, it will be the processing of the task t 4 1, t 5 1 in the subgroup SG2 G1 is completed, as can be seen from the processing tree P 4, P 5, Group G4 Since the processing of tasks t 4 2 and t 5 2 collected in (1) has not been completed, no new task can be found, so no group is created.

以上のことをまとめると、グループG1内のタスクの処理が終了することによって新たに見出されたタスクt2 2,t1 4,t3 3,t6 4がアクセスする処理結果のリレーションをもとに、次のようにグループG5,グループG6が作成される。
TEMP_T1_2:グループ G5={t2 2}
(t2 2):TEMP_T2_2←πSSN,LNAME,BDATETEMP_T1_2
TEMP_SG1_G1:グループ G6={t1 4,t3 3,t6 4}
(t1 4):TEMP_T4_1←πSSN,LNAME,DNUMTEMP_T3_1
(t3 3):TEMP_T3_3←πSSN,FNAME,LNAME,DNUMTEMP_T2_3
(t6 4):TEMP_T4_6←πFNAME,LNAME,DNUMTEMP_T3_6
Summarizing the above, the relation of the processing results accessed by the tasks t 2 2 , t 1 4 , t 3 3 , and t 6 4 newly found by the completion of the processing of the tasks in the group G1 is also obtained. At the same time, group G5 and group G6 are created as follows.
TEMP_T1_2: Group G5 = {t 2 2 }
(t 2 2 ) : TEMP_T2_2 ← π SSN, LNAME, BDATE TEMP_T1_2
TEMP_SG1_G1: Group G6 = {t 1 4 , t 3 3 , t 6 4 }
(t 1 4 ): TEMP_T4_1 ← π SSN, LNAME, DNUM TEMP_T3_1
(t 3 3 ) : TEMP_T3_3 ← π SSN, FNAME, LNAME, DNUM TEMP_T2_3
(t 6 4 ): TEMP_T4_6 ← π FNAME, LNAME, DNUM TEMP_T3_6

グループG5には、タスクt2 1の処理結果TEMP_T1_2に対して処理を行うタスクt2 2が集められることになり、グループG6には、合成選択演算タスクtG1 SG1の処理結果TEMP_SG1_G1に対して処理を行うタスクt1 4,t3 3,t6 4が集められることになる。 The group G5, will be the task t 2 2 which performs processing for the task t 2 1 processing result TEMP_T1_2 is collected, the group G6, processing for the processing result TEMP_SG1_G1 synthetic select operation task t G1 SG1 Tasks t 1 4 , t 3 3 , and t 6 4 for performing are collected.

[(b)グループG2の処理]
次に、マルチオペレーション・プロセッシングを使用してグループG2内の合成射影演算タスクtG2 SG1及びサブグループに集まらないタスクt1 1,t6 1の処理を一度に行うことにする。前述したように、グループG2内の各タスクは次のようなものである。
DEPARTMENT:グループ G2={tG2 SG1,t1 1,t6 1}
(tG2 SG1):TEMP_SG1_G2←πDNUMBER,DNAME,MGRSSNDEPARTMENT
(t1 1): TEMP_T1_1←σDPHONE=23-3732DEPARTMENT
(t6 1): TEMP_T1_6←σDNUMBER=7DEPARTMENT
[(B) Processing of group G2]
Next, the processing of the composite projection operation task t G2 SG1 in the group G2 and the tasks t 1 1 and t 6 1 not collected in the subgroups are performed at once using multi-operation processing. As described above, each task in the group G2 is as follows.
DEPARTMENT: Group G2 = {t G2 SG1, t 1 1, t 6 1}
(t G2 SG1 ): TEMP_SG1_G2 ← π DNUMBER, DNAME, MGRSSN DEPARTMENT
(t 1 1 ): TEMP_T1_1 ← σ DPHONE = 23-3732 DEPARTMENT
(t 6 1 ): TEMP_T1_6 ← σ DNUMBER = 7 DEPARTMENT

[(b−1)各タスクのアクセスプラン]
まず、グループG2内の合成射影演算タスクtG2 SG1及びサブグループに集められないタスクt1 1,t6 1に対して次のようなアクセスプランを作成する。
plan(tG2 SG1):DEPARTMENTをスキャンして射影演算を行う。
plan(t1 1):DEPARTMENTの2次インデックスを使用して1つのレコードを検索する。
plan(t6 1):DEPARTMENTの主インデックスを使用して1つのレコードを検索する。
[(B-1) Access plan for each task]
First, the following access plans are created for the composite projection operation task t G2 SG1 in the group G2 and the tasks t 1 1 and t 6 1 that are not collected in the subgroup.
plan (t G2 SG1 ): Scans DEPARTMENT and performs projection operation.
plan (t 1 1 ): Search one record using the secondary index of DEPARTMENT.
plan (t 6 1 ): Retrieves one record using the main index of DEPARTMENT.

[(b−2)各タスクの処理コスト]
各タスクに対してアクセスプランを作成すると、アクセスプランをもとに、各タスクの処理コストを計算する。
タスクtG2 SG1の処理コスト:cost(tG2 SG1)=bD=5
タスクt1 1の処理コスト:cost(t1 1)=xD2+1=3
タスクt6 1の処理コスト:cost(t6 1)=xD1+1=2
タスクtG2 SG1の処理コストは、リレーションDEPARTMENTをスキャンして射影演算の処理を行うために、リレーション中のすべてのブロックをアクセスする処理コストなのでbD=5である。
[(B-2) Processing cost of each task]
When an access plan is created for each task, the processing cost of each task is calculated based on the access plan.
Task t G2 SG1 processing cost: cost (t G2 SG1 ) = b D = 5
Task t 1 1 processing cost: cost (t 1 1 ) = x D2 + 1 = 3
Task t 6 1 processing cost: cost (t 6 1 ) = x D1 + 1 = 2
The processing cost of the task t G2 SG1 is b D = 5 because it is a processing cost for accessing all blocks in the relation in order to scan the relation DEPARTMENT and perform the projection operation.

タスクt1 1の処理コストは、リレーションDEPARTMENTの2次インデックス(102)を使用して1つのレコードを検索する処理コストである。これは2次インデックスのレベルxD2とブロックをアクセスする処理コストであり、図3−1のリレーションDEPARTMENTの2次インデックス(102)のレベルxD2は2であるので、処理コストはxD2+1=3である。
タスクt6 1の処理コストは、リレーションDEPARTMENTの主インデックス(100)を使用して1つのレコードを検索する処理コストである。xD1+1は、リレーションDEPARTMENTの主インデックス(100)を使用して目的のデータを見つけるためにアクセスするインデックスのレベルxD1と当面のブロックをアクセスする処理コストである。図3−1のリレーションDEPARTMENTの主インデックス(100)のレベルは1であるので(xD1=1となり)、タスクt6 1の処理コストはxD1+1=2である。
The processing cost of task t 1 1 is the processing cost for searching one record using the secondary index (102) of the relation DEPARTMENT. This is the level x D2 of the secondary index and the processing cost of accessing the block. Since the level x D2 of the secondary index (102) of the relation DEPARTMENT in FIG. 3A is 2, the processing cost is x D2 +1. = 3.
Processing cost of the task t 6 1 is a processing cost for searching a single record using the primary index of the relation DEPARTMENT (100). x D1 +1 is the level x D1 of the index accessed to find the target data using the primary index (100) of the relation DEPARTMENT and the processing cost of accessing the current block. Level of the main index (100) of the relation DEPARTMENT in Figure 3-1 because it is 1 (x D1 = 1 next), the processing cost of the task t 6 1 are x D1 + 1 = 2.

以上のように処理コストを計算すると、処理コストをもとにグループ内のタスクを処理コストの小さい順番から並べ替えると次のようになる。
sort(tG2 SG1,t1 1,t6 1)⇒(t6 1,t1 1,tG2 SG1)
When the processing cost is calculated as described above, the tasks in the group are rearranged from the processing cost in the descending order based on the processing cost.
sort (t G2 SG1 , t 1 1 , t 6 1 ) ⇒ (t 6 1 , t 1 1 , t G2 SG1 )

[(b−3)各タスクに対応するブロック集合]
タスクt6 1,t1 1,tG2 SG1に対して、インデックスを使用して、アクセスする必要のあるすべてのブロックを事前に調べて、各タスクに対応するブロック集合B6 1,B1 1,BG2 SG1に集めると、次のようになる。
タスクt6 1に対して:B6 1={b2}
タスクt1 1に対して:B1 1={b5}
タスクtG2 SG1に対して:BG2 SG1={b1,b2,b3,b4,b5}
このように、各タスクt6 1,t1 1,tG2 SG1 に対応するブロック集合B6 1,B1 1,BG2 SG1を見出すことができるのは、以下に示すような理由にもとづくからである。
タスクt6 1は、選択条件”DNUMBER=7”を満たすレコードが必要である。リレーションDEPARTMENTの主インデックスを使用すると、属性DNUMBERの値が7であるレコードはブロックの相対アドレスが256であるブロックb2に格納してあることがわかり、ブロックb2だけをアクセスすることが必要となるので、タスクt6 1の処理を行うためにアクセスする必要のあるブロックの集合は{b2}となる。
[(B-3) Block set corresponding to each task]
To the task t 6 1, t 1 1, t G2 SG1, using an index, all blocks that need to be accessed examined beforehand, block set B 6 1 corresponding to each task, B 1 1 , B G2 SG1 is collected as follows.
For task t 6 1 : B 6 1 = {b 2 }
For task t 1 1 : B 1 1 = {b 5 }
For task t G2 SG1 : B G2 SG1 = {b 1 , b 2 , b 3 , b 4 , b 5 }
Thus, can be found block sets B 6 1, B 1 1, B G2 SG1 corresponding to each task t 6 1, t 1 1, t G2 SG1 , since based on the reasons below It is.
Task t 6 1, it is necessary records that meet the selection condition "DNUMBER = 7". Using the primary index of the relation DEPARTMENT, you can see that the record with attribute DNUMBER value 7 is stored in block b 2 with a relative block address of 256, and only block b 2 needs to be accessed. Therefore, the set of blocks that need to be accessed in order to perform the process of task t 6 1 is {b 2 }.

タスクt1 1は、選択条件”DPHONE=23-3732”を満たすレコードが必要である。リレーションDEPARTMENTの2次インデックスを使用すると、属性DPHONEの値が23-3732であるレコードはブロックの相対アドレスが1024であるブロックb5に格納してあることがわかり、ブロックb5だけをアクセスすることが必要となるので、タスクt1 1の処理を行うためにアクセスする必要のあるブロックの集合は{b5}となる。
タスクtG2 SG1は、射影演算の処理を行うために、リレーションDEPARTMENT内の最初のブロックb1から最後のブロックb5までのブロックをアクセスすることが必要となるので、タスクtG2 SG1の処理を行うためにアクセスする必要のあるブロック集合は{b1,b2,b3,b4,b5}となる。
The task t 1 1 needs a record that satisfies the selection condition “DPHONE = 23-3732”. Using the secondary index of the relation DEPARTMENT, we can see that the record with attribute DPHONE value 233-3732 is stored in block b 5 with a relative block address of 1024, and only block b 5 is accessed. Therefore, the set of blocks that need to be accessed to perform the processing of task t 1 1 is {b 5 }.
Task t G2 SG1, in order to perform the projection operation process, since it is necessary to access the block from the first block b 1 in the relation DEPARTMENT until the last block b 5, the processing of the task t G2 SG1 The block set that needs to be accessed in order to do is {b 1 , b 2 , b 3 , b 4 , b 5 }.

[(b−4)アクセスすべきブロック(共通ブロック)の順位の決定]
以上のように、各タスクに対応するブロック集合を見出した後に、処理コストの小さいタスクから処理コストの大きいタスクへと順番に、すなわちタスクt6 1,t1 1,tG2 SG1の順番に各タスクに対応するブロック集合の和集合を求めていくことにする。
まず、TB0={}(空集合)として、TB0とタスクt6 1に対応するブロック集合B6 1と和集合TB6 1を求める。次に、このTB6 1とタスクt1 1に対応するブロック集合B1 1の和集合TB1 1を求める。さらに、このTB1 1とタスクtG2 SG1に対応するブロック集合BG2 SG1との和集合TBG2 SG1を求めると次のようになる。この場合、和集合を求めるに当たっては、新たに加える集合は和集合の中で最後に加えていくものとする。
TB0={}
タスクt6 1に対応する集合B6 1との和集合:TB6 1=TB0∪B6 1={b2}
タスクt1 1に対応する集合B1 1との和集合:TB1 1=TB6 1∪B1 1={b2,b5}
タスクtG2 SG1に対応する集合BG2 SG1との和集合:TBG2 SG1=TB1 1∪BG2 SG1={b2,b5,b1,b3,b4}
[(B-4) Determination of order of blocks to be accessed (common blocks)]
As described above, after finding a block set corresponding to each task, each task is in order from a task with a low processing cost to a task with a high processing cost, that is, in order of tasks t 6 1 , t 1 1 , t G2 SG1. Let's find the union of the block set corresponding to the task.
First, as TB 0 = {} (empty set), a block set B 6 1 and a union set TB 6 1 corresponding to TB 0 and task t 6 1 are obtained. Then, the sum set TB 1 1 set of blocks B 1 1 corresponding to the TB 6 1 and task t 1 1. Furthermore, the TB 1 1 and when the sum set TB G2 SG1 of the block set B G2 SG1 corresponding to the task t G2 SG1 as follows. In this case, when obtaining the union, the newly added set is added last in the union.
TB 0 = {}
Union set with set B 6 1 corresponding to task t 6 1 : TB 6 1 = TB 0 ∪B 6 1 = {b 2 }
Union set with set B 1 1 corresponding to task t 1 1 : TB 1 1 = TB 6 1 ∪B 1 1 = {b 2 , b 5 }
The union of the set B G2 SG1 corresponding to task t G2 SG1 : TB G2 SG1 = TB 1 1 ∪B G2 SG1 = {b 2 , b 5 , b 1 , b 3 , b 4 }

以上のように、処理コストの小さいタスクに対応するブロック集合から処理コストの大きいタスクに対応するブロック集合へと順番に和集合を求めていくと、最後のタスク(処理コストの1番大きいタスク)に対応するブロック集合との和集合TBG2 SG1から、ディスクのブロックb2からアクセスを開始し、ブロックb4でアクセスを終了すればよいことになり、ディスクにおけるリレーションDEPARTMENT内のブロックへのアクセスの順番を(b2,b5,b1,b3,b4)のように決定することができる。このような方法で和集合を求めることは、処理コストの小さいタスクから順番に処理を行うに当たって、ディスク内のブロックをどのような順番でアクセスすればよいか、その順番を決定するためである。このようにして得られたブロックb2,b5,b1,b3,b4は、タスクt6 1,t1 1,tG2 SG1を順番に処理していくときに共用され得るので、これらのブロックを共通ブロックと呼ぶことにする。 As described above, when the union is obtained in order from the block set corresponding to the task with the low processing cost to the block set corresponding to the task with the high processing cost, the last task (the task with the highest processing cost) From the union TB G2 SG1 with the block set corresponding to, access should be started from block b 2 of the disk and access terminated at block b 4 , and access to the blocks in the relation DEPARTMENT on the disk The order can be determined as (b 2 , b 5 , b 1 , b 3 , b 4 ). The reason for obtaining the union by this method is to determine the order in which blocks in the disk should be accessed in order from the task with the lowest processing cost. Since the thus blocking b 2 obtained, b 5, b 1, b 3, b 4 , can be shared when sequentially processes the task t 6 1, t 1 1, t G2 SG1 in order, These blocks are called common blocks.

前述したブロック集合B6 1,B1 1,BG2 SG1の中に含まれているブロックを見ると、ブロックb2は、タスクt6 1,tG2 SG1を処理するために使用され、ブロックb5は、タスクt1 1,tG2 SG1を処理するために使用され、ブロックb1,b3,b4は、タスクtG2 SG1を処理するために使用されることがわかる。これらのブロックを共通ブロックとして扱うことにすると、これらの共通ブロックを必要とするタスクを共通ブロック上で一度に処理することができる。以上のことをまとめると次のような表になる。
Looking at the blocks included in the block set B 6 1 , B 1 1 , B G2 SG1 described above, the block b 2 is used to process the tasks t 6 1 , t G2 SG1 and the block b It can be seen that 5 is used to process tasks t 1 1 , t G2 SG1 and blocks b 1 , b 3 , b 4 are used to process tasks t G2 SG1 . If these blocks are handled as common blocks, tasks that require these common blocks can be processed at once on the common block. The following table summarizes the above.

[(b−5)共通ブロックでのタスクの処理]
以上のように、それぞれの共通ブロックでどのようなタスクが処理されるかを見出すためには、タスクt6 1,t1 1,tG2 SG1に対して作成されたブロック集合B6 1,B1 1,BG2 SG1の情報にもとづいて、次に記述するような手順を用いればよい。
最初に、ブロックの相対アドレスが256であるブロックb2をディスクからアクセスして、ブロックb2内のデータをメインメモリに読み込み、グループ内のタスクt6 1,t1 1,tG2 SG1がブロックb2で処理を行う必要があるかどうかを調べるため、ブロックb2を集合{b2}として表し、この集合{b2}とブロックの集合B6 1,B1 1,BG2 SG1との間でそれぞれ積集合(Intersection)を求めると次のようになる。
タスクt6 1に対して:B6 1∩{b2}={b2}
タスクt1 1に対して:B1 1∩{b2}={}
タスクtG2 SG1に対して:BG2 SG1∩{b2}={b2}
[(B-5) Task processing in common block]
As described above, in order to find out what kind of task is processed in each common block, the block sets B 6 1 , B created for the tasks t 6 1 , t 1 1 , t G2 SG1 are used. 1 1 , B G2 Based on SG1 information, the following procedure should be used.
First, block b 2 whose block relative address is 256 is accessed from the disk, the data in block b 2 is read into the main memory, and tasks t 6 1 , t 1 1 and t G2 SG1 in the group block. to investigate whether it is necessary to perform processing in b 2, represents the block b 2 as a set {b 2}, and the set {b 2} a set of blocks B 6 1, B 1 1, B G2 SG1 The product set (Intersection) between them is as follows.
For task t 6 1 : B 6 1 ∩ {b 2 } = {b 2 }
For task t 1 1 : B 1 1 ∩ {b 2 } = {}
For task t G2 SG1 : B G2 SG1 ∩ {b 2 } = {b 2 }

タスクt1 1を除くタスクt6 1,tG2 SG1に対する積集合が{b2}となり、タスクt6 1,tG2 SG1がメインメモリに読み込んだブロックb2で処理を行う必要があることが明らかになり、ブロックb2は共通ブロックとなり、共通ブロックb2で各タスクの処理を行うことになる。共通ブロックであるブロックb2でのタスクの処理が終了するとブロックb2を再びアクセスする必要がなくなるので、集合B6 1,BG2 SG1と集合{b2}との差集合(Difference)を求める。得られた差集合の値をB6 1 (1),BG2 SG1(1)とすると、次のようになる。
タスクt6 1に対して:B6 1−{b2}={}=B6 1(1)
タスクtG2 SG1に対して:BG2 SG1−{b2}={b1,b3,b4,b5}=BG2 SG1(1)
この結果、集合B6 1(1)が空集合{}になりタスクt6 1の処理が終了したことがわかる。
The product set for tasks t 6 1 and t G2 SG1 excluding task t 1 1 is {b 2 }, and tasks t 6 1 and t G2 SG1 need to perform processing in block b 2 read into the main memory. As will be apparent, the block b 2 becomes a common block, and each task is processed in the common block b 2 . When the processing of the task in the common block block b 2 is completed, it is not necessary to access the block b 2 again, so the difference set (Difference) between the set B 6 1 , B G2 SG1 and the set {b 2 } is obtained. . When the obtained difference set values are B 6 1 (1) and B G2 SG1 (1) , the following is obtained.
To the task t 6 1: B 6 1 - {b 2} = {} = B 6 1 (1)
For task t G2 SG1 : B G2 SG1 − {b 2 } = {b 1 , b 3 , b 4 , b 5 } = B G2 SG1 (1)
As a result, it can be seen that the set B 6 1 (1) processing of the task t 6 1 empty set {} is completed.

次に、ブロックの相対アドレスが1024であるブロックb5をディスクからアクセスして、ブロックb5内のデータをメインメモリに読み込み、すでに処理の済んだタスクt6 1を除くグループ内のタスクt1 1,tG2 SG1がブロックb5で処理を行う必要があるかどうかを調べるために、ブロックb5を集合{b5}として表し、{b5}とブロックの集合B1 1,BG2 SG1(1)との間でそれぞれ積集合を求めると次のようになる。
タスクt1 1に対して:B1 1∩{b5}={b5}
タスクtG2 SG1に対して:BG2 SG1(1)∩{b5}={b5}
Next, the block b 5 whose block address is 1024 is accessed from the disk, the data in the block b 5 is read into the main memory, and the task t 1 in the group excluding the task t 6 1 that has already been processed. 1, in order to t G2 SG1 determine whether it is necessary to perform processing at block b 5, represents a block b 5 as a set {b 5}, {b 5 } and a set of blocks B 1 1, B G2 SG1 Finding the product set with (1) is as follows.
For task t 1 1 : B 1 1 ∩ {b 5 } = {b 5 }
For task t G2 SG1 : B G2 SG1 (1) ∩ {b 5 } = {b 5 }

タスクt1 1,tG2 SG1に対する積集合が{b5}となり、タスクt1 1,tG2 SG1がメインメモリに読み込んだブロックb5で処理を行うことが必要となり、ブロックb5は共通ブロックとなり、共通ブロックb5でタスクt1 1,tG2 SG1の処理を行うことになる。共通ブロックであるブロックb5でのタスクの処理が終了すると、ブロックb5を再びアクセスする必要がなくなるので、集合B1 1,BG2 SG1(1)と集合{b5}との差集合を求める。得られた差集合の値をB1 1(1),BG2 SG1(2)とすると、次のようになる。
タスクt1 1に対して:B1 1−{b5}={}=B1 1(1)
タスクtG2 SG1に対して:BG2 SG1(1)−{b5}={b1,b3,b4}=BG2 SG1(2)
この結果、集合B1 1(1)が空集合{}になりタスクt1 1の処理が終了したことがわかる。この段階で、グループに残ったタスクはtG2 SG1のみとなるので、リレーションDEPARTMENTから残ったブロックb1,b3,b4をアクセスしてタスクtG2 SG1の処理を行い、タスクtG2 SG1の処理が終了するとグループ内すべてのタスクの処理が終了することになる。
The product set for tasks t 1 1 and t G2 SG1 is {b 5 }, and it is necessary to perform processing in block b 5 that tasks t 1 1 and t G2 SG1 read into the main memory, and block b 5 is a common block Thus, the tasks t 1 1 and t G2 SG1 are processed in the common block b 5 . When the processing of the task in the block b 5 which is a common block is completed, it is not necessary to access the block b 5 again, so that the difference set between the set B 1 1 , B G2 SG1 (1) and the set {b 5 } is obtained. Ask. Assuming that the values of the obtained difference set are B 11 (1) and B G2 SG1 (2) , the following is obtained.
For task t 1 1 : B 1 1 − {b 5 } = {} = B 1 1 (1)
For task t G2 SG1 : B G2 SG1 (1) − {b 5 } = {b 1 , b 3 , b 4 } = B G2 SG1 (2)
As a result, it can be seen that the set B 1 1 (1) becomes an empty set {} and the processing of the task t 1 1 is completed. At this stage, since the remaining tasks in the group and only the t G2 SG1, it performs processing tasks t G2 SG1 to access the blocks b 1, b 3, b 4 remaining from relation DEPARTMENT, task t G2 SG1 When the processing is completed, the processing of all tasks in the group is completed.

図9は、スタティックマルチオペレーション・プロセッシングを使用して、リレーションDEPARTMENTに対するタスクt6 1,t1 1,tG2 SG1の処理コストの小さいタスクからアクセスしていく状態(スキャン1からスキャン5にわたって)と処理結果をリレーションTEMP_T1_6(704),TEMP_T1_1(703),TEMP_SG1_G2(705)に書き込んだ結果を表わした図である。
一連のタスクの処理を行うプロセス(701)は、ディスク内のブロックを、図9で示すように、ブロックb2,b5,b1,b3,b4の順番でアクセスし、各ブロックにおいて、そのブロックで処理を行う必要のあるグループ内のタスクの処理を行い、処理結果をリレーションTEMP_T1_6(704),TEMP_T1_1(703),TEMP_SG1_G2(705)に書き込み、すべてのブロックでのタスク処理が終了するとスタティックマルチオペレーション・プロセッシングによるグループG2のタスク処理は終了したことになる。
9, using the static multi-operation processing, the task t 6 1, t 1 1, t G2 SG1 state sequentially processes accessing the cost of small tasks (for Scan 1 Scan 5) for the relation DEPARTMENT and It is a figure showing the result of having written the processing result in relation TEMP_T1_6 (704), TEMP_T1_1 (703), and TEMP_SG1_G2 (705).
A process (701) for processing a series of tasks accesses the blocks in the disk in the order of blocks b 2 , b 5 , b 1 , b 3 , and b 4 as shown in FIG. When the tasks in the group that need to be processed in that block are processed, the processing results are written to the relations TEMP_T1_6 (704), TEMP_T1_1 (703), and TEMP_SG1_G2 (705). The task processing of group G2 by static multi-operation processing has been completed.

[(b−6)合成射影演算タスクの処理結果の作成]
合成射影演算タスクtG2 SG1の処理結果TEMP_SG1_G2は、サブグループSG1G2内の射影演算タスクt2 3,t3 1によって部分的に共有されることになる。前述したようにサブグループSG1G2内のタスクは次のようなものである。
サブグループ SG1G2={t2 3,t3 1}
(t2 3):TEMP_T3_2←πDNUMBER,DNAME,MGRSSNDEPARTMENT
(t3 1):TEMP_T1_3←πDNUMBER,DNAMEDEPARTMENT
合成射影演算タスクtG2 SG1の処理結果TEMP_SG1_G2内の属性(列)をサブグループSG1G2内の射影演算タスクt2 3,t3 1が部分的に共有するには、合成射影演算タスクtG2 SG1の処理を行った際に、処理結果TEMP_SG1_G2を共有するサブグループSG1G2内のタスクt2 3,t3 1に対して、図9に示した仮想リレーションTEMP_T3_2,TEMP_T1_3を作成することにする。仮想リレーションには、共有する合成射影演算の処理結果(リレーション)名、その処理結果を共有する属性の格納位置(列番号)を次のように記録しておくことにする。
TEMP_T3_2={リレーション:TEMP_SG1_G2; 列:1,2,3};
TEMP_T1_3={リレーション:TEMP_SG1_G2; 列:1,2};
[(B-6) Creation of processing result of composite projection operation task]
The processing result TEMP_SG1_G2 of the composite projection calculation task t G2 SG1 is partially shared by the projection calculation tasks t 2 3 and t 3 1 in the subgroup SG1 G2 . As described above, the tasks in the subgroup SG1 G2 are as follows.
Subgroup SG1 G2 = {t 2 3 , t 3 1 }
(t 2 3 ) : TEMP_T3_2 ← π DNUMBER, DNAME, MGRSSN DEPARTMENT
(t 3 1 ) : TEMP_T1_3 ← π DNUMBER, DNAME DEPARTMENT
To partially share the attribute (column) in the processing result TEMP_SG1_G2 of the composite projection operation task t G2 SG1 with the projection operation tasks t 2 3 and t 3 1 in the subgroup SG1 G2 , the composite projection operation task t G2 SG1 When the above process is performed, the virtual relations TEMP_T3_2 and TEMP_T1_3 shown in FIG. 9 are created for the tasks t 2 3 and t 3 1 in the subgroup SG1 G2 sharing the processing result TEMP_SG1_G2. In the virtual relation, the processing result (relation) name of the compositing projection operation to be shared and the storage position (column number) of the attribute sharing the processing result are recorded as follows.
TEMP_T3_2 = {Relation: TEMP_SG1_G2; Column: 1,2,3};
TEMP_T1_3 = {Relation: TEMP_SG1_G2; Column: 1,2};

仮想リレーションTEMP_T3_2は、サブグループSG1G2内のタスクt2 3の処理結果であり、合成射影演算タスクtG2 SG1の処理結果TEMP_SG1_G2の列1,2,3を共有する。
仮想リレーションTEMP_T1_3は、サブグループSG1G2内のタスクt3 1の処理結果であり、合成射影演算タスクtG2 SG1の処理結果TEMP_SG1_G2の列1,2を共有する。
以上のようにして、サブグループに集められたいくつもの射影演算タスクを1つの合成射影演算タスクtG2 SG1に置き換えて処理を行い、サブグループSG1G2内のタスクt2 3,t3 1は、仮想リレーションを通して処理結果TEMP_SG1_G2内の属性(列)を部分的に共有することになり、サブグループ内の個々のタスクt2 3,t3 1に対して射影する属性が重なっているレコードを含んだ処理結果のリレーションをディスク上に別々に作成する必要がなくなるので、ディスクをアクセスする回数を減少させ、クエリーの処理速度を向上させることが可能になる。
Virtual relation TEMP_T3_2 is a processing result of the task t 2 3 in the subgroup SG1 G2, share columns 1, 2 and 3 of the processing result TEMP_SG1_G2 synthetic project operation task t G2 SG1.
The virtual relation TEMP_T1_3 is the processing result of the task t 3 1 in the subgroup SG1 G2 , and shares the columns 1 and 2 of the processing result TEMP_SG1_G2 of the composite projection operation task t G2 SG1 .
As described above, a number of projection calculation tasks collected in the subgroup are replaced with one composite projection calculation task t G2 SG1 , and tasks t 2 3 and t 3 1 in the subgroup SG1 G2 are The attribute (column) in the processing result TEMP_SG1_G2 will be partially shared through the virtual relation, and the records that overlap the attributes projected to the individual tasks t 2 3 and t 3 1 in the subgroup are included. Since it is not necessary to separately create relations of processing results on the disk, it is possible to reduce the number of times of accessing the disk and improve the query processing speed.

図9の合成射影演算タスクtG2 SG1の処理結果TEMP_SG1_G2(705)は、仮想リレーションTEMP_T3_2と仮想リレーションTEMP_T1_3によって共有されている様子を表わしている。マルチオペレーション・プロセッシングを使用して合成関係演算タスクの処理結果を作成するにあたって、合成関係演算タスクの処理結果内のレコードに対して、結合演算などのタスクによって検索処理が行われる場合は、検索処理に使用される属性に対してインデックスを作成しておく。 The processing result TEMP_SG1_G2 (705) of the composite projection calculation task t G2 SG1 in FIG. When creating a processing result of a composite relational operation task using multi-operation processing, if the search process is performed on a record in the processing result of the composite relational calculation task by a task such as a join operation, the search process Create an index for the attribute used for.

図9の合成射影演算タスクtG2 SG1の処理結果TEMP_SG1_G2(705)内のレコードは、サブグループSG1G2内のタスクt2 3,t3 1の処理終了後に、図4−1〜図4−3の処理ツリーが示すように、結合演算タスクt2 6,t3 4によって検索されるため、検索処理に使用される属性DNUMBERに対してインデックス(702)を作成している。結合演算タスクt2 6は仮想リレーションTEMP_T3_2に対して検索処理を行うタスクであり、結合演算タスクt3 4は仮想リレーションTEMP_T1_3に対して検索処理を行うタスクであり、仮想リレーションTEMP_T3_2と仮想リレーションTEMP_T1_3はリレーションTEMP_SG1_G2(705)内の属性(列)を部分的に共有しているので、リレーションTEMP_SG1_G2に対して作成されたインデックス(702)は結合演算タスクt2 6,t3 4の検索処理のために共有されることになる。タスクt2 6はインデックス(702)を用いてリレーションTEMP_SG1_G2(705)からレコードを検索し、検索されたレコードが仮想リレーションTEMP_T3_2内に含まれているときには、仮想リレーションTEMP_T3_2からレコードを検索したことになる。同様に、タスクt3 4はインデックス(702)を用いてリレーションTEMP_SG1_G2(705)からレコードを検索し、検索されたレコードが仮想リレーションTEMP_T1_3内に含まれているときには、仮想リレーションTEMP_T1_3からレコードを検索したことになる。レコードが検索されると、検索されたレコードから個々の仮想リレーションに記録してある必要な属性(列)のみを射影することになる。 The records in the processing result TEMP_SG1_G2 (705) of the composite projection operation task t G2 SG1 in FIG. 9 are processed after the processing of the tasks t 2 3 and t 3 1 in the subgroup SG1 G2 is completed. As shown in the processing tree, an index (702) is created for the attribute DNUMBER used for the search processing because the search is performed by the join operation tasks t 2 6 and t 3 4 . Join operation task t 2 6 is a task that performs a search process on virtual relation TEMP_T3_2, and join operation task t 3 4 is a task that performs a search process on virtual relation TEMP_T1_3, and virtual relation TEMP_T3_2 and virtual relation TEMP_T1_3 are Since the attribute (column) in the relation TEMP_SG1_G2 (705) is partially shared, the index (702) created for the relation TEMP_SG1_G2 is used for the search processing of the join operation tasks t 2 6 and t 3 4 Will be shared. Task t 2 6 uses the index (702) to search for a record from the relation TEMP_SG1_G2 (705). . Similarly, task t 3 4 retrieves a record from relation TEMP_SG1_G2 (705) using index (702), and retrieves a record from virtual relation TEMP_T1_3 when the retrieved record is included in virtual relation TEMP_T1_3. It will be. When a record is retrieved, only the necessary attributes (columns) recorded in the individual virtual relations are projected from the retrieved record.

このようにして、合成関係演算タスクの処理結果に対してインデックスを作成しておくと、仮想リレーションに対してレコードを検索するタスクは、インデックスを共有することができるようになり、個々の仮想リレーションに対して別々にインデックスを作成する必要がなくなるので、ディスクをアクセスする回数を減少させて、クエリーの処理速度を向上させることが可能になる。   In this way, if an index is created for the processing result of the composition-related calculation task, tasks that search records for the virtual relation can share the index, and individual virtual relations can be shared. Therefore, it is not necessary to create an index separately, so that the number of times the disk is accessed can be reduced and the query processing speed can be improved.

[(b−7)新たなグループの作成]
以上のように合成関係演算を利用したマルチオペレーション・プロセッシングを使用してグループG2内の合成射影演算タスクtG2 SG1及びサブグループに集まらないタスクt6 1,t1 1の処理が、タスクt6 1,t1 1,tG2 SG1の順番で終了し、合成射影演算タスクtG2 SG1の処理結果TEMP_SG1_G2に対してインデックスが作成されると、図4−1〜図4−3の処理ツリーからトポロジカルソートの順番で新たに処理できるタスクを見出していくことになる。
[(B-7) Creation of new group]
Processing of the task t 6 1, t 1 1 not gather the synthetic project operation task t G2 SG1 and subgroups in the group G2 by using multi-operation processing utilizing a synthetic relational operation as described above is the task t 6 1 , t 1 1 , t G2 SG1 is completed in this order, and when an index is created for the processing result TEMP_SG1_G2 of the composite projection operation task t G2 SG1 , topological from the processing tree of FIGS. 4-1 to 4-3 Tasks that can be newly processed in the sort order will be found.

最初に、タスクt6 1が終了すると処理ツリーP6からわかるように新たにタスクt6 2の処理を始めることができるようになる。タスクt6 2は、タスクt6 1の処理結果TEMP_T1_6に対して処理を行うタスクとして新たにグループG7を作成してグループG7にタスクt6 2を加えることになる。
次に、タスクt1 1が終了すると処理ツリーP1からわかるように新たにタスクt1 2の処理を始めることができるようになる。タスクt1 2は、タスクt1 1の処理結果TEMP_T1_1に対して処理を行うタスクとして新たにグループG8を作成してグループG8にタスクt1 2を加えることになる。
First, when the task t 6 1 is completed, the processing of the task t 6 2 can be newly started as can be seen from the processing tree P 6 . Task t 6 2 will be added to the task t 6 2 group G7 by creating a new group G7 as a task for performing a process to the task t 6 1 processing result TEMP_T1_6.
Next, when the task t 1 1 is completed, the processing of the task t 1 2 can be newly started as can be seen from the processing tree P 1 . Task t 1 2 will be added to the task t 1 2 the group G8 to create a new group G8 as a task for performing a process to the task t 1 1 processing result TEMP_T1_1.

最後、にタスクtG2 SG1の処理が終了すると、サブグループSG1G2内のタスクt2 3,t3 1の処理が終了することになり、処理ツリーP2,P3からわかるように、グループG3に集められたタスクt2 4の処理とグループG6に集められたタスクt3 3の処理が終了していないので、新たに処理できるタスクは見出されないのでグループは作成することはない。
以上のことをまとめるとグループG2内のタスクの処理が終了することによって新たに見出されたタスクt6 2,t1 2をアクセスする処理結果のリレーションをもとに次のようにグループG7,グループG8が作成される。
TEMP_T1_6:グループ G7={t6 2}
(t6 2):TEMP_T2_6←πDNUMBER,DNAMETEMP_T1_6
TEMP_T1_1:グループ G8={t1 2}
(t1 2):TEMP_T2_1←πDNUMBER,DNAMETEMP_T1_1
グループG7には、タスクt6 1の処理結果TEMP_T1_6に対して処理を行うタスクt6 2が集められることになる。グループG8には、タスクt1 1の処理結果TEMP_T1_1に対して処理を行うタスクt1 2が集められることになる。
Finally, when the processing of the task t G2 SG1 is finished, the processing of the tasks t 2 3 and t 3 1 in the subgroup SG1 G2 is finished. As can be seen from the processing trees P 2 and P 3 , the group G3 Since the processing of task t 2 4 collected in (1) and the processing of task t 3 3 collected in group G6 have not been completed, no new task can be found, so no group is created.
To summarize the above, based on the relation of the processing results for accessing the tasks t 6 2 and t 1 2 newly found by the completion of the processing of the tasks in the group G2, the group G7, Group G8 is created.
TEMP_T1_6: Group G7 = {t 6 2 }
(t 6 2 ): TEMP_T2_6 ← π DNUMBER, DNAME TEMP_T1_6
TEMP_T1_1: Group G8 = {t 1 2 }
(t 1 2 ) : TEMP_T2_1 ← π DNUMBER, DNAME TEMP_T1_1
The group G7, so that the task t 6 2 which performs processing for the task t 6 1 processing result TEMP_T1_6 is collected. The group G8, so that the task t 1 2 for performing processing for the task t 1 1 processing result TEMP_T1_1 is collected.

[(c)グループG3の処理]
グループG2の処理が終了すると、次はグループG3内の合成選択演算タスクtG3 SG1の処理を行うことになる。前述したようにグループG3内の合成選択演算タスクは次のようなものである。
PROJECT:グループ G3={tG3 SG1}
(tG3 SG1):TEMP_SG1_G3←σPLOCATION='New York' AND (PNAME='Aquarius' OR PNAME='Stafford')PROJECT
グループG3には1つのタスクしか存在しないため、合成選択演算タスクtG3 SG1の処理を直接行うことになる。合成選択演算タスクtG3 SG1の処理が終了すると、PLOCATONがNew Yorkであり、PNAMEが'Aquarius' または'Stafford'であるレコードを2件ほど含んだ処理結果TEMP_SG1_G3を作成する。処理結果TEMP_SG1_G3内のレコードは属性PNAMEの値で整列し、サブグループSG1G3内のタスクt1 7,t2 4に対しては次のような仮想リレーションを作成する。
TEMP_T7_1={リレーション:TEMP_SG1_G3; 行:1; ブロック:b1};
TEMP_T4_2={リレーション:TEMP_SG1_G3; 行:2; ブロック:b1};
仮想リレーションTEMP_T7_1は、サブグループSG1G3内のタスクt1 7の処理結果であり、TEMP_SG1_G3のブロックb1に格納されている属性PNAMEの値がAquariusである1行目のレコードを共有することになる。
[(C) Processing of group G3]
When the process of the group G2 is completed, the process of the synthesis selection calculation task t G3 SG1 in the group G3 is performed next. As described above, the synthesis selection calculation task in the group G3 is as follows.
PROJECT: Group G3 = {t G3 SG1 }
(t G3 SG1 ) : TEMP_SG1_G3 ← σ PLOCATION = 'New York' AND (PNAME = 'Aquarius' OR PNAME = 'Stafford') PROJECT
Since there is only one task in the group G3, the synthesis selection calculation task t G3 SG1 is directly processed. When the process of the composite selection calculation task t G3 SG1 is completed, a processing result TEMP_SG1_G3 including about two records in which PLOCATON is New York and PNAME is 'Aquarius' or 'Stafford' is created. Records in the processing result TEMP_SG1_G3 are arranged by the value of the attribute PNAME, and the following virtual relation is created for the tasks t 1 7 and t 2 4 in the subgroup SG1 G3 .
TEMP_T7_1 = {Relation: TEMP_SG1_G3; Line: 1; Block: b 1 };
TEMP_T4_2 = {Relation: TEMP_SG1_G3; Line: 2; Block: b 1 };
Virtual relation TEMP_T7_1 is a processing result of the task t 1 7 subgroup SG1 within G3, so that the value of the attribute PNAME stored in the block b 1 of TEMP_SG1_G3 share the first row of records is Aquarius .

仮想リレーションTEMP_T4_2は、サブグループSG1G3内のタスクt2 4の処理結果であり、TEMP_SG1_G3のブロックb1に格納されている属性PNAMEの値がStaffordである2行目のレコードを共有することになる。
グループG3内の合成選択演算タスクtG3 SG1の処理が終了すると、サブグループSG1G3内のタスクt1 7,t2 4の処理が終了することになり、図4−1〜図4−3の処理ツリーP1,P2からわかるように、新たにタスクt1 8,t2 5を処理できるようになる。
タスクt1 8,t2 5はそれぞれアクセスする仮想リレーションが異なるが、タスクt1 8は、タスクt1 7の処理結果である仮想リレーションTEMP_T7_1を通して、合成選択演算タスクtG3 SG1の処理結果TEMP_SG1_G3をアクセスし、タスクt2 5は、タスクt2 4の処理結果である仮想リレーションTEMP_T4_2を通して、合成選択演算タスクtG3 SG1の処理結果TEMP_SG1_G3をアクセスすることになるので、共通のリレーションTEMP_SG1_G3に対して処理を行うタスクとして、新たにグループG9を作成して、グループG9にタスクt1 8,t2 5を加えることになる。
Virtual relation TEMP_T4_2 is the task t 2 4 processing result subgroup SG1 within G3, so that the value of the attribute PNAME stored in the block b 1 of TEMP_SG1_G3 share the second row of records is Stafford .
When the processing of the composite selection calculation task t G3 SG1 in the group G3 is completed, the processing of the tasks t 1 7 and t 2 4 in the subgroup SG1 G3 is completed, as shown in FIGS. As can be seen from the processing trees P 1 and P 2 , the tasks t 1 8 and t 2 5 can be newly processed.
The tasks t 1 8 and t 2 5 have different virtual relations to be accessed, but the task t 1 8 receives the processing result TEMP_SG1_G3 of the synthesis selection calculation task t G3 SG1 through the virtual relation TEMP_T7_1 that is the processing result of the task t 1 7. access task t 2 5, through virtual relation TEMP_T4_2 a processing result of the task t 2 4, it means that access to the processing result TEMP_SG1_G3 synthetic select operation task t G3 SG1, processing with respect to the common relation TEMP_SG1_G3 As a task to perform, a new group G9 is created, and tasks t 1 8 and t 2 5 are added to group G9.

以上のことをまとめると、グループG3内のタスク処理が終了することによって見出されたタスクt1 8,t2 5を次のようにグループG9に集めることになる。
TEMP_SG1_G3:グループG9={t1 8,t2 5}
(t1 8):TEMP_T8_1←πPNUMBER,PNAMETEMP_T7_1
(t2 5):TEMP_T5_2←πPNUMBER,PNAME,DNUMTEMP_T4_2
In summary, the tasks t 1 8 and t 2 5 found by completing the task processing in the group G3 are collected in the group G9 as follows.
TEMP_SG1_G3: Group G9 = {t 1 8 , t 2 5 }
(t 1 8 ): TEMP_T8_1 ← π PNUMBER, PNAME TEMP_T7_1
(t 2 5 ) : TEMP_T5_2 ← π PNUMBER, PNAME, DNUM TEMP_T4_2

[(d)グループG4の処理]
次に、マルチオペレーション・プロセッシングを適用してグループG4内のタスクt1 9,t4 2,t5 2の処理を一度に行うことになる。前述したように、グループG4内の各タスクは次のようなものである。
WORKS_ON:グループ G4={t1 9,t4 2,t5 2}
(t1 9):TEMP_T9_1←πESSN,PNOWORKS_ON
(t4 2):TEMP_T2_4←PROJECT |X|PNUMBER=PNOWORKS_ON
(t5 2):TEMP_T2_5←σHOURS<10WORKS_ON
ここではマルチオペレーション・プロセッシングによるG4内のタスクt1 9,t4 2,t5 2の処理の説明は省略することにする。マルチオペレーション・プロセッシングによってグループG4内のタスクt1 9,t4 2,t5 2の処理を行うと、図4−1〜図4−3の処理ツリーからトポロジカルソートの順番で新たに処理できるタスクを見出していくことになる。
[(D) Group G4 processing]
Next, by applying multi-operation processing, the tasks t 1 9 , t 4 2 and t 5 2 in the group G4 are processed at once. As described above, each task in the group G4 is as follows.
WORKS_ON: Group G4 = {t 1 9 , t 4 2 , t 5 2 }
(t 1 9 ) : TEMP_T9_1 ← π ESSN, PNO WORKS_ON
(t 4 2 ) : TEMP_T2_4 ← PROJECT | X | PNUMBER = PNO WORKS_ON
(t 5 2 ): TEMP_T2_5 ← σ HOURS <10 WORKS_ON
Here, the description of the processing of tasks t 1 9 , t 4 2 , and t 5 2 in G4 by multi-operation processing is omitted. When multi by operation processing in the group G4 task t 1 9, t 4 2, performs t 5 2 processing tasks that can be newly processed in the order from the processing tree topological sort of FIG. 4-1 to Figure 4-3 Will be found.

最初に、タスクt1 9の処理が終了すると、処理ツリーP1からわかるように、グループG9内のタスクt1 8の処理が終了していないため、新たに処理できるタスクは見出されないので、グループは作成されないままである。
次に、タスクt4 2の処理が終了すると、処理ツリーP4からわかるように、グループG1内のタスクt4 1の処理はすでに終了しているので、新たにタスクt4 3の処理を始めることができるようになる。タスクt4 3はタスクt4 1の処理結果TEMP_T1_4とタスクt4 2の処理結果TEMP_T2_4を用いて結合演算の処理を行うタスクである。結合演算の検索元にTEMP_T2_4を使用するので、処理結果TEMP_T2_4に対して処理を行うタスクとして新たにグループG10を作成して、グループG10にタスクt4 3を加えることにする。
First, when the processing of task t 1 9 is completed, as can be seen from the processing tree P 1, since the processing of task t 1 8 in group G9 has not ended, a task that can be newly processed is not found. The group remains uncreated.
Next, when the processing of task t 4 2 ends, as can be seen from the processing tree P 4 , the processing of task t 4 1 in group G1 has already ended, so the processing of task t 4 3 is newly started. Will be able to. Task t 4 3 is a task that performs a join operation using the processing result TEMP_T1_4 of task t 4 1 and the processing result TEMP_T2_4 of task t 4 2 . Because it uses TEMP_T2_4 the join operation search source, newly create a group G10 as a task for performing processing for the processing result TEMP_T2_4, to the addition of the task t 4 3 group G10.

最後に、タスクt5 2の処理が終了すると、処理ツリーP5からわかるように、グループG1内のタスクt5 1の処理はすでに終了しているので、新たにタスクt5 3の処理を始めることができるようになる。タスクt5 3はタスクt5 1の処理結果TEMP_T1_5とタスクt5 2の処理結果TEMP_T2_5を用いて結合演算の処理を行うタスクである。結合演算の検索元にTEMP_T2_5を使用するので、処理結果TEMP_T2_5に対して処理を行うタスクとして新たにグループG11を作成して、グループG11にタスクt5 3を加えることにする。
以上のことをまとめると、グループG4内のタスクt1 9,t4 2,t5 2の処理が終了することによって見出されたタスクt4 3,t5 3を次のようにグループに分けすることになる。タスクt4 3の処理結果は、クエリーQ4の最終の処理結果となるので、RESULT_Q4で表わすことにする。タスクt5 3の処理結果は、クエリーQ5の最終の処理結果となるので、RESULT_Q5で表わすことにする。
TEMP_T2_4:グループ G10={t4 3}
(t4 3):RESULT_Q4←TEMP_T1_4 |X|SSN=ESSNTEMP_T2_4
TEMP_T2_5:グループ G11={t5 3}
(t5 3):RESULT_Q5←TEMP_T1_5 |X|SSN=ESSNTEMP_T2_5
Finally, when the processing of task t 5 2 is completed, as can be seen from the processing tree P 5 , the processing of task t 5 1 in group G1 has already ended, so a new processing of task t 5 3 is started. Will be able to. Task t 5 3 is a task for processing the join operation using a processing result TEMP_T1_5 and task t 5 2 of the processing result TEMP_T2_5 task t 5 1. Because it uses TEMP_T2_5 the join operation search source, newly create a group G11 as a task for performing processing for the processing result TEMP_T2_5, to be added to the task t 5 3 group G11.
To summarize the above, the tasks t 4 3 and t 5 3 found by the completion of the processing of tasks t 1 9 , t 4 2 and t 5 2 in the group G4 are divided into groups as follows. Will do. Since the processing result of task t 4 3 is the final processing result of query Q 4 , it will be expressed as RESULT_Q 4 . Processing results Task t 5 3, since the final processing result of the query Q 5, to be represented by RESULT_Q5.
TEMP_T2_4: Group G10 = {t 4 3 }
(t 4 3 ): RESULT_Q4 ← TEMP_T1_4 | X | SSN = ESSN TEMP_T2_4
TEMP_T2_5: Group G11 = {t 5 3 }
(t 5 3 ): RESULT_Q5 ← TEMP_T1_5 | X | SSN = ESSN TEMP_T2_5

[(e)グループG5の処理]
グループG4の処理が終了すると、次はグループG5の処理を行うことになる。前述したように、グループG5内のタスクは次のようなものである。
TEMP_T1_2:グループ G5={t2 2}
(t2 2):TEMP_T2_2←πSSN,LNAME,BDATETEMP_T1_2
グループG5には1つのタスクt2 2しか存在しておらず、タスクt2 2はタスクt2 1の処理結果TEMP_T1_2に対して射影演算の処理を行うタスクである。このようにグループに1つのタスクしか存在してしない場合は、グループG5内のタスクt2 2を直接処理することになる。
タスクt2 2の処理が終了すると、図4−2の処理ツリーP2からわかるように、グループG9内のタスクt2 5の処理が終了しておらず、グループに集められていないタスクt2 6,t2 7の処理も終了していないので、新たに処理できるタスクは見出されないのでグループは作成されない。
[(E) Group G5 processing]
When the processing of the group G4 is completed, the processing of the group G5 is performed next. As described above, the tasks in the group G5 are as follows.
TEMP_T1_2: Group G5 = {t 2 2 }
(t 2 2 ) : TEMP_T2_2 ← π SSN, LNAME, BDATE TEMP_T1_2
Not present only one task t 2 2 The group G5, the task t 2 2 is a task for processing project operation to the task t 2 1 processing result TEMP_T1_2. Thus, when only one task exists in the group, the task t 2 2 in the group G5 is directly processed.
When the processing of the task t 2 2 is completed, as can be seen from the processing tree P 2 in Figure 4-2, the processing of the task t 2 5 in the group G9 is not completed, the task t 2 which is not collected into groups Since the processing of 6 and t 2 7 has not been completed, no new task can be found and no group is created.

グループG5の処理を終わると、次はグループG6の処理を行うことになる。グループG6には、合成選択演算タスクtG1 SG1の処理結果TEMP_SG1_G1に対して処理を行うタスクが集められているので、詳しく説明することにする。 When the process of group G5 is completed, the process of group G6 is performed next. In the group G6, tasks for processing the processing result TEMP_SG1_G1 of the composition selection calculation task t G1 SG1 are collected, and will be described in detail.

ここまで扱ってきたタスク処理は、データベースのリレーションEMPLOYEE,DEPARTMENT,PROJECT,WORKS_ONなどデータベースのリレーションに対するタスク処理であった。次に、データベースのリレーションではなく、合成関係演算タスクの処理結果として得られたリレーションに対するタスク処理を取り上げて説明することにする。   The task processing that has been handled so far has been task processing for database relations such as database relations EMPLOYEE, DEPARTMENT, PROJECT, and WORKS_ON. Next, the task processing for the relation obtained as a result of the processing of the composition relation calculation task, not the database relation, will be described.

[(f)グループG6の処理(合成関係演算タスクの処理結果として得られたリレーションに対するタスク処理)]
マルチオペレーション・プロセッシングを使用してグループG6内のタスクt1 4,t3 3,t6 4の処理を一度に行うことにする。前述したように、グループG6内のタスクは次のようなものである。
TEMP_SG1_G1:グループ G6={t1 4,t3 3,t6 4}
(t1 4):TEMP_T4_1←πSSN,LNAME,DNUM TEMP_T3_1
(t3 3):TEMP_T3_3←πSSN,FNAME,LNAME,DNUM TEMP_T2_3
(t6 4):TEMP_T4_6←πFNAME,LNAME,DNUM TEMP_T3_6
[(F) Process of group G6 (task process for the relation obtained as a result of the process of the composition relation calculation task)]
Using multi-operation processing, tasks t 1 4 , t 3 3 , and t 6 4 in group G6 are processed at once. As described above, the tasks in the group G6 are as follows.
TEMP_SG1_G1: Group G6 = {t 1 4 , t 3 3 , t 6 4 }
(t 1 4 ): TEMP_T4_1 ← π SSN, LNAME, DNUM TEMP_T3_1
(t 3 3 ) : TEMP_T3_3 ← π SSN, FNAME, LNAME, DNUM TEMP_T2_3
(t 6 4 ): TEMP_T4_6 ← π FNAME, LNAME, DNUM TEMP_T3_6

[(f−1)各タスクのアクセスプラン]
スタティック・マルチオペレーション・プロセッシングの処理方法にもとづいて、グループG6内の各タスクt1 4,t3 3,t6 4に対してアクセスプランを作成する。タスクt1 4の処理に用いられる仮想リレーションTEMP_T3_1,タスクt3 3の処理に用いられる仮想リレーションTEMP_T2_3,タスクt6 4の処理に用いられる仮想リレーションTEMP_T3_6からそれぞれタスクがアクセスするブロックを調べることになる。前述したように、仮想リレーションTEMP_T3_1,TEMP_T2_3,TEMP_T3_6には、合成選択演算タスクtG1 SG1の処理結果TEMP_SG1_G1を共有するブロックの番号とアドレスがすでに記録してあるので、事前にどのブロックをアクセスしたらよいかがわかる。タスクt1 4,t3 3,t6 4のアクセスプランは次のようになる。
plan(t1 4):TEMP_SG1_G1のブロックb1,b2,b3をアクセスして射影演算の処理を行う。
plan(t3 3):TEMP_SG1_G1のブロックb4をアクセスして射影演算の処理を行う。
plan(t6 4):TEMP_SG1_G1のブロックb2,b3をアクセスして射影演算の処理を行う。
[(F-1) Access plan for each task]
Based on the static multi-operation processing method, an access plan is created for each task t 1 4 , t 3 3 , t 6 4 in the group G6. The blocks accessed by the task are examined from the virtual relation TEMP_T3_1 used for the processing of task t 1 4, the virtual relation TEMP_T2_3 used for the processing of task t 3 3 , and the virtual relation TEMP_T3_6 used for the processing of task t 6 4. . As described above, in the virtual relations TEMP_T3_1, TEMP_T2_3, and TEMP_T3_6, the block number and address sharing the processing result TEMP_SG1_G1 of the synthesis selection calculation task t G1 SG1 are already recorded, so which block should be accessed in advance. I understand how. The access plans for tasks t 1 4 , t 3 3 , and t 6 4 are as follows.
plan (t 1 4 ): Access the blocks b 1 , b 2 , and b 3 of TEMP_SG1_G1 to perform the projection operation.
plan (t 3 3 ): Access the block b 4 of TEMP_SG1_G1 to perform the projection operation.
plan (t 6 4 ): Access the blocks b 2 and b 3 of TEMP_SG1_G1 to perform the projection operation.

[(f−2)各タスクの処理コスト]
アクセスプランをもとに各タスクの処理コストを計算すると、次のように表すことができる。
タスクt1 4の処理コスト:cost(t1 4)=3
タスクt3 3の処理コスト:cost(t3 3)=1
タスクt6 4の処理コスト:cost(t6 4)=2
タスクt1 4の処理コストは、リレーションTEMP_SG1_G1からブロックの相対アドレスが0,256,512である3つのブロックb1,b2,b3をアクセスして射影演算の処理を行う処理コストなので3である。
タスクt3 3の処理コストは、リレーションTEMP_SG1_G1からブロックの相対アドレスが768であるブロックb4をアクセスして射影演算の処理を行う処理コストなので1である。
タスクt6 4の処理コストは、リレーションTEMP_SG1_G1からブロックの相対アドレスが256,512である2つのブロックb2,b3をアクセスして射影演算の処理を行う処理コストなので2である。以上のように処理コストを計算すると、処理コストをもとにグループ内のタスクを処理コストの小さい順番で並べ替えると次のようになる。
sort(t1 4,t3 3,t6 4) ⇒ (t3 3,t6 4,t1 4)
[(F-2) Processing cost of each task]
When the processing cost of each task is calculated based on the access plan, it can be expressed as follows.
Processing cost of the task t 1 4: cost (t 1 4) = 3
Task t 3 3 processing cost: cost (t 3 3 ) = 1
Task t 6 4 processing cost: cost (t 6 4 ) = 2
Processing cost of the task t 1 4 is a relation TEMP_SG1_G1 3 single block b 1 relative address block is 0,256,512 from, b 2, b 3 3 Since processing cost for processing the project operation by accessing the is there.
The processing cost of the task t 3 3 is 1 because it is a processing cost for accessing the block b 4 whose relative address is 768 from the relation TEMP_SG1_G1 and performing the projection operation.
The processing cost of task t 6 4 is 2 because it is a processing cost for accessing the two blocks b 2 and b 3 whose relative addresses of the blocks are 256 and 512 from the relation TEMP_SG1_G1 and performing the projection operation. When the processing costs are calculated as described above, the tasks in the group are rearranged in order of increasing processing costs based on the processing costs as follows.
sort (t 1 4 , t 3 3 , t 6 4 ) ⇒ (t 3 3 , t 6 4 , t 1 4 )

[(f−3)各タスクに対応するブロック集合]
仮想リレーションに記録してある情報をもとに、タスクt3 3,t6 4,t1 4がリレーションTEMP_SG1_G1からアクセスする必要のあるブロックを調べて、各タスクに対応するブロック集合B3 3,B6 4,B1 4に集めると、次のようになる。
タスクt3 3に対応する集合B3 3との和集合:B3 3={b4}
タスクt6 4に対応する集合B6 4との和集合:B6 4={b2,b3}
タスクt1 4に対応する集合B1 4との和集合:B1 4={b1,b2,b3}
[(F-3) Block set corresponding to each task]
Based on the information in the virtual relation are recorded, the task t 3 3, t 6 4, t 1 4 examines certain block need to be accessed from relation TEMP_SG1_G1, block set B 3 3 corresponding to each task, When collected in B 6 4, B 1 4, as follows.
Union set with set B 3 3 corresponding to task t 3 3 : B 3 3 = {b 4 }
Union set with set B 6 4 corresponding to task t 6 4 : B 6 4 = {b 2 , b 3 }
The union with the set B 1 4 corresponding to the task t 1 4 : B 1 4 = {b 1 , b 2 , b 3 }

[(f−4)アクセスすべきブロック(共通ブロック)の順位の決定]
以上のように、各タスクに対応するブロック集合を見出した後に、処理コストの小さいタスクから処理コストの大きいタスクへと順番に、すなわちタスクt3 3,t6 4,t1 4の順番に各タスクに対応するブロック集合の和集合を求めていくことにする。
まず、TB0={}(空集合)として、TB0とタスクt3 3に対応するブロック集合B3 3と和集合TB3 3を求める。次に、このTB3 3とタスクt6 4に対応するブロック集合B6 4との和集合TB6 4を求める。さらに、このTB6 4とタスクt1 4に対応するブロック集合B1 4との和集合TB1 4を求めると次のようになる。この場合、和集合を求めるに当たっては、新たに加える集合は和集合の中で最後に加えていくものとする。
TB0={}
タスクt3 3に対して:TB3 3=TB0∪B3 3={b4}
タスクt6 4に対して:TB6 4=TB3 3∪B6 4={b4,b2,b3}
タスクt1 4に対して:TB1 4=TB6 4∪B1 4={b4,b2,b3,b1}
[(F-4) Determination of order of blocks to be accessed (common blocks)]
As described above, after the finding block set corresponding to each task, in order to process cost greater task from a small task of processing cost, i.e. in the order of the task t 3 3, t 6 4, t 1 4 each Let's find the union of the block set corresponding to the task.
First, as TB 0 = {} (empty set), a block set B 3 3 and a union set TB 3 3 corresponding to TB 0 and task t 3 3 are obtained. Then, the sum set TB 6 4 of the block set B 6 4 corresponding to the TB 3 3 and task t 6 4. Further, when finding the TB 6 4 and union TB 1 4 the block set B 1 4 corresponding to the task t 1 4 is as follows. In this case, when obtaining the union, the newly added set is added last in the union.
TB 0 = {}
For task t 3 3 : TB 3 3 = TB 0 ∪B 3 3 = {b 4 }
For task t 6 4 : TB 6 4 = TB 3 3 ∪B 6 4 = {b 4 , b 2 , b 3 }
For task t 1 4 : TB 1 4 = TB 6 4 ∪B 1 4 = {b 4 , b 2 , b 3 , b 1 }

集合TB1 4からリレーションTEMP_SG1_G1内のブロックをb4,b2,b3,b1の順番でアクセスしていけばよいことがわかる。前述したブロック集合B3 3,B6 4,B1 4の中に含まれているブロックを見ると、ブロックb4は、タスクt3 3を処理するために使用され、ブロックb2は、タスクt6 4,t1 4を処理するために使用され、ブロックb3は、タスクt6 4,t1 4を処理するために使用され、ブロックb1は、タスクt1 4を処理するために使用されることがわかる。これらのブロックを共通ブロックとして扱うことにすると、これらの共通ブロックを必要とするタスクを共通ブロック上で一度に処理することができる。以上のことをまとめると次のような表になる。
Set TB 1 4 from the block in the relation TEMP_SG1_G1 b 4, b 2, b 3, b it can be seen that it should be accessible in one order. Looking at the blocks included in the block set B 3 3, B 6 4, B 1 4 described above, the block b 4 is used to process the task t 3 3, block b 2, the task is used to process t 6 4, t 1 4, block b 3 is used to process the task t 6 4, t 1 4, block b 1, in order to handle tasks t 1 4 It can be seen that it is used. If these blocks are handled as common blocks, tasks that require these common blocks can be processed at once on the common block. The following table summarizes the above.

[(f−5)共通ブロックでのタスクの処理]
以上のように、それぞれの共通ブロックでどのようなタスクが処理されるかを見出すためには、タスクt3 3,t6 4,t1 4に対して作成されたブロック集合B3 3,B6 4,B1 4の情報にもとづいて、次に記述するような手順を用いればよい。
最初に、ブロックの相対アドレスが768であるブロックb4をディスクからアクセスして、ブロックb4内のデータをメインメモリに読み込み、グループ内のタスクt3 3,t6 4,t1 4がブロックb4で処理を行う必要があるかどうかを調べるため、ブロックb4を集合{b4}として表わし、ブロック集合B3 3,B6 4,B1 4とそれぞれ積集合(intersection)を求める。
タスクt3 3に対して:B3 3∩{b4}={b4}
タスクt6 4に対して:B6 4∩{b4}={}
タスクt1 4に対して:B1 4∩{b4}={}
[(f-5) Task processing in common block]
As described above, in order to find what tasks are processed in each common block, the task t 3 3, t 6 4, t 1 4 block set B 3 3 created for, B 6 4, B based on 1 4 information, then the procedure may be used as described.
First, the block b 4 relative address of the block is 768 to access the disk to read the data in the block b 4 to the main memory, the task t 3 3 in the group, t 6 4, t 1 4 block to investigate whether it is necessary to perform processing with b 4, it represents a block b 4 as a set {b 4}, block set B 3 3, B 6 4, B 1 4 , respectively intersection Request (intersection).
For task t 3 3 : B 3 3 ∩ {b 4 } = {b 4 }
For task t 6 4 : B 6 4 ∩ {b 4 } = {}
For task t 1 4 : B 1 4 ∩ {b 4 } = {}

タスクt6 4,t1 4を除くタスクt3 3に対する集合の積が空集合{}ではないため、メインメモリに読み込んだブロックb4内の各レコードに対してタスクt3 3の処理を行う。ブロックb4での処理が終了するとブロックb4を再びアクセスする必要がなくなるため、集合B3 3と集合{b4}との差集合(difference)を求めて、求めた差集合の値をB3 3(1)とすると次のようになる。
タスクt3 3に対して:B3 3−{b4}={}=B3 3(1)
集合B3 3(1)が空集合{}になりタスクt3 3の処理が終了したことがわかる。
次に、ブロックの相対アドレスが256であるブロックb2をディスクからアクセスして、ブロックb2内のデータをメインメモリに読み込み、すでに処理の済んだタスクt3 3を除くグループ内のタスクt6 4,t1 4がブロックb2で処理を行う必要があるかどうかを調べるために、ブロックb2を集合{b2}として表し、集合{b2}とブロック集合B6 4,B1 4との間でそれぞれ積集合を求めると次のようになる。
タスクt6 4に対して:B6 4∩{b2}={b2}
タスクt1 4に対して:B1 4∩{b2}={b2}
Since the product of the set for task t 3 3 excluding tasks t 6 4 and t 1 4 is not an empty set {}, the process of task t 3 3 is performed on each record in block b 4 read into the main memory. . When the processing in the block b 4 is completed, it is not necessary to access the block b 4 again. Therefore, a difference between the set B 3 3 and the set {b 4 } is obtained, and the value of the obtained difference set is set to B 3 3 (1) is as follows.
For task t 3 3 : B 3 3 − {b 4 } = {} = B 3 3 (1)
It can be seen that the set B 3 3 (1) becomes an empty set {} and the processing of the task t 3 3 is finished.
Next, the block b 2 whose block relative address is 256 is accessed from the disk, the data in the block b 2 is read into the main memory, and the task t 6 in the group excluding the task t 3 3 that has already been processed. 4, t 1 4 to determine whether it is necessary to perform processing at block b 2, represents the block b 2 as a set {b 2}, the set {b 2} with the block sets B 6 4, B 1 4 The product set between and is obtained as follows.
For task t 6 4 : B 6 4 ∩ {b 2 } = {b 2 }
For task t 1 4 : B 1 4 ∩ {b 2 } = {b 2 }

タスクt6 4,t1 4に対する積集合が{b2}となり、タスクt6 4,t1 4がメインメモリに読み込んだブロックb2で処理を行うことが必要となり、ブロックb2は共通ブロックとなり、共通ブロックb2でタスクt6 4,t1 4の処理を行うことになる。共通ブロックであるブロックb2でのタスクの処理が終了すると、ブロックb2を再びアクセスする必要がなくなるので、集合B6 4,B1 4と集合{b2}との差集合を求める。得られた差集合の値をB6 4(1),B1 4(1)とすると、次のようになる。
タスクt6 4に対して:B6 4−{b2}={b3}=B6 4(1)
タスクt1 4に対して:B1 4−{b2}={b1,b3}=B1 4(1)
Task t 6 4, t 1 intersection for 4 {b 2}, and the it is necessary to task t 6 4, t 1 4 performs processing in block b 2 read into the main memory, the block b 2 common block next, so that the processing of the task t 6 4, t 1 4 in a common block b 2. When the processing of tasks in the block b 2 is a common block is completed, since there is no need to re-access the block b 2, we obtain the set difference of the set {b 2} the set B 6 4, B 1 4. When the values of the obtained difference set are B 6 4 (1) and B 14 (1) , the following is obtained.
For task t 6 4 : B 6 4 − {b 2 } = {b 3 } = B 6 4 (1)
For task t 1 4 : B 1 4 − {b 2 } = {b 1 , b 3 } = B 1 4 (1)

次に、ブロックの相対アドレスが512であるブロックb3をディスクからアクセスして、ブロックb3内のデータをメインメモリに読み込み、すでに処理の済んだタスクt3 3を除くグループ内のタスクt6 4,t1 4がブロックb3で処理を行う必要があるかどうかを調べるために、ブロックb3を集合{b3}として表し、集合{b3}とブロック集合B6 4(1),B1 4(1)との間でそれぞれ積集合を求めると次のようになる。
タスクt6 4に対して:B6 4(1)∩{b3}={b3}
タスクt1 4に対して:B1 4(1)∩{b3}={b3}
タスクt6 4,t1 4に対する積集合が{b3}となり、タスクt6 4,t1 4がメインメモリに読み込んだブロックb3で処理を行うことが必要となり、ブロックb3は共通ブロックとなり、共通ブロックb3でタスクt6 4,t1 4の処理を行うことになる。共通ブロックであるブロックb3でのタスクの処理が終了すると、ブロックb3を再びアクセスする必要がなくなるので、集合B6 4(1),B1 4(1)と集合{b3}との差集合を求める。得られた差集合の値をB6 4(2),B1 4(2)とすると、次のようになる。
タスクt6 4に対して:B6 4(1)−{b3}={}=B6 4(2)
タスクt1 4に対して:B1 4(1)−{b3}={b1}=B1 4(2)
Next, the block b 3 whose block relative address is 512 is accessed from the disk, the data in the block b 3 is read into the main memory, and the task t 6 in the group excluding the task t 3 3 that has already been processed. 4, t 1 4 to determine whether it is necessary to perform processing at block b 3, represents the block b 3 as a set {b 3}, the set {b 3} and block set B 6 4 (1), Finding the product set with B 1 4 (1) is as follows.
For task t 6 4 : B 6 4 (1) ∩ {b 3 } = {b 3 }
For task t 1 4 : B 1 4 (1) ∩ {b 3 } = {b 3 }
Task t 6 4, t 1 intersection for the 4 {b 3}, and the it is necessary to task t 6 4, t 1 4 performs processing in block b 3 read into main memory, block b 3 is common block next, so that the processing of the task t 6 4, t 1 4 in a common block b 3. When the processing of the task in the block b 3 which is the common block is completed, it is not necessary to access the block b 3 again, so that the set B 6 4 (1) , B 14 (1) and the set {b 3 } Find the difference set. Assuming that the values of the obtained difference sets are B 6 4 (2) and B 14 (2) , the following is obtained.
For task t 6 4 : B 6 4 (1) − {b 3 } = {} = B 6 4 (2)
For task t 1 4 : B 1 4 (1) − {b 3 } = {b 1 } = B 1 4 (2)

この結果、集合B6 4(3)が空集合{}になりタスクt6 4の処理が終了したことがわかる。この段階で、グループに残ったタスクはt1 4のみとなるので、リレーションTEMP_SG1_G1から残ったブロックb1をアクセスしてタスクt1 4の処理を行い、タスクt1 4の処理が終了するとグループ内すべてのタスクの処理が終了することになる。 As a result, it can be seen that the set B 6 4 (3) the processing of the task t 6 4 empty set {} is completed. At this stage, since the remaining tasks in the group and only the t 1 4, performs processing tasks t 1 4 accesses the block b 1 remaining from relation TEMP_SG1_G1, in the group when the processing of the task t 1 4 ends All tasks will be processed.

以上のように、リレーションTEMP_SG1_G1内のブロックをb4,b2,b3,b1の順番でアクセスすることによって、処理コストの小さいタスクからt3 3,t6 4,t1 4の順番でタスク処理が終了することがわかる。図10は、スタティックマルチオペレーション・プロセッシングを使用してグループG6の処理を行っている様子を表している。プロセス(801)は、リレーションTEMP_SG1_G1(800)内ブロックをb4,b2,b3,b1の順番でアクセスして、タスクt3 3,t6 4,t1 4の処理を一度に行い、処理結果をTEMP_T3_3,TEMP_T4_6,TEMP_T4_1に書き込んでいる。 As described above, the blocks in the relation TEMP_SG1_G1 b 4, by b 2, b 3, are accessed in the order of b 1, a small task of processing cost t 3 at 3, t 6 4, t 1 4 order It can be seen that the task processing ends. FIG. 10 shows a state in which processing of the group G6 is performed using static multi-operation processing. Process (801) is a relation TEMP_SG1_G1 (800) in the block access in the order of b 4, b 2, b 3 , b 1, performs processing tasks t 3 3, t 6 4, t 1 4 at a time The processing results are written in TEMP_T3_3, TEMP_T4_6, and TEMP_T4_1.

[(f−6)新たなグループの作成]
マルチオペレーション・プロセッシングを使用してグループG6内のタスクが、タスクt3 3,t6 4,t1 4の順番で終了すると、図4−1〜図4−3の処理ツリーからトポロジカルソートの順番で新たに処理できるタスクを見出していくことになる。
最初に、タスクt3 3の処理が終了すると、処理ツリーP3からわかるように新たにタスクt3 4の処理を始めることができるようになる。タスクt3 4は、タスクt3 1の処理結果TEMP_T1_3とタスクt3 3の処理結果TEMP_T3_3を用いた結合演算の処理を行うタスクであり、TEMP_T1_3を検索先のリレーションとして使用し、TEMP_T3_3を検索元のリレーションとして使用することになるので、検索元のリレーションであるTEMP_T3_3に対して処理を行うタスクとして新たにグループG12を作成してグループG12にタスクt3 4を加える。
[(F-6) Create new group]
Task multi-operation processing group G6 using is, upon completion in the order of the task t 3 3, t 6 4, t 1 4, starting from the process tree of Figure 4-1 Figure 4-3 topological sort You will find a task that can be newly processed.
First, when the processing of task t 3 3 is completed, the processing of task t 3 4 can be newly started as can be seen from the processing tree P 3 . Task t 3 4 is a task that performs a join operation using the processing result TEMP_T1_3 of task t 3 1 and the processing result TEMP_T3_3 of task t 3 3 , and uses TEMP_T1_3 as the relation of the search destination and TEMP_T3_3 as the search source it means to use as a relation, creates a new group G12 added task t 3 4 group G12 and as a task that performs processing on TEMP_T3_3 a search source relation.

次に、タスクt6 4の処理が終了すると、処理ツリーP6からわかるように、グループG7内のタスクt6 2の処理が終了していないので、新たに処理できるタスクは見出されないので新たなグループは作成されない。
最後に、タスクt1 4の処理が終了すると、処理ツリーP1からわかるようにグループG8内のタスクt1 2の処理が終了していないので新たなグループは作成されない。
以上のことをまとめると、グループG6内のタスクt3 3,t6 4,t1 4の処理が終了することによって見出されたタスクt3 4を次のようにグループG12に加えることになる。
TEMP_T3_3:グループ G12={t3 4}
(t3 4):TEMP_T4_3←TEMP_T1_3 |X|DNUMBER=DNUMTEMP_T3_3
Next, when the processing of task t 6 4 is completed, as can be seen from the processing tree P 6 , the processing of task t 6 2 in group G7 has not been completed. No groups are created.
Finally, when the processing of the task t 1 4 is completed, the new group since the processing of the task t 1 2 has not been completed in the group G8 As can be seen from the process tree P 1 is not created.
In summary, will add the task t 3 4 found by the processing of the task t 3 3, t 6 4, t 1 4 in the group G6 is terminated group G12 as follows .
TEMP_T3_3: Group G12 = {t 3 4 }
(t 3 4 ): TEMP_T4_3 ← TEMP_T1_3 | X | DNUMBER = DNUM TEMP_T3_3

このようにして、グループの処理を繰り返して行っていくうちに、図4−1〜図4−3に示した処理ツリー内のタスクが次第に終了していき、処理ツリー内すべてのタスクの処理が終了すると、与えられたすべてのクエリー処理は終了することになる。   In this way, as the group processing is repeated, the tasks in the processing tree shown in FIGS. 4-1 to 4-3 are gradually completed, and all the tasks in the processing tree are processed. When finished, all query processing given will end.

[3.実際の処理結果]
合成関係演算を利用したマルチオペレーション・プロセッシングを用いたクエリー・プロセッサが、マルチオペレーション・プロセッシングを用いたクエリー・プロセッサ及び従来のクエリー・プロセッサ(MySQL Ver.3)よりも数多くのクエリーを早く処理することを証明するために、独自に開発したデータベースマネージメントシステム(DBMS)のソフトウェアMOB−DBに新たに合成関係演算を利用したマルチオペレーション・プロセッシングの処理を行うことができる機能を追加した。MOB−DBは、MySQLなど市場で幅広く使われているデータベースシステムよりも数多くのクエリーを高速に処理することを目的とし、SQLのインタープリタ、クエリーの最適化、トランザクションの同時処理、データを格納するストレージシステムなどデータベースマネージメントシステム(DBMS)に必要な十分な機能を備えたソフトウェアである。合成関係演算を利用したマルチオペレーション・プロセッシングの実験を行うにあたって、合成関係演算を利用したマルチオペレーション・プロセッシングには、スタティックマルチオペレーション・プロセッシングを使用することにした。
[3. Actual processing result]
A query processor using multi-operation processing using a composition relational operation can process a larger number of queries faster than a query processor using multi-operation processing and a conventional query processor (MySQL Ver.3). In order to prove the above, a function capable of performing multi-operation processing using synthetic relational operations is newly added to the MOB-DB of the database management system (DBMS) developed independently. MOB-DB aims to process many queries at a higher speed than database systems widely used in the market such as MySQL, SQL interpreter, query optimization, simultaneous processing of transactions, storage for storing data This software has sufficient functions necessary for a database management system (DBMS) such as a system. In conducting multi-operation processing experiments using composition-related operations, we decided to use static multi-operation processing for multi-operation processing using composition-related operations.

独自に開発したMOB−DBに、合成関係演算を利用したスタティックマルチオペレーション・プロセッシングを用いたクエリー処理を追加したことによって、MOB−DBは合成関係演算を利用したスタティックマルチオペレーションを用いたクエリー処理、スタティックマルチオペレーション・プロセッシングを用いたクエリー処理、ダイナミックマルチオペレーション・プロセッシングを用いたクエリー処理を行うことができ、これらのクエリー処理方法を自由に選択して実行することが可能になった。
次にMOB−DBを使用して、これらのクエリー処理方法によるクエリーの処理速度をそれぞれ調べた。さらに市場で幅広く使用されているMySQLのバージョン3と比較するために、共通のクエリー処理を行ってMOB−DBとMySQLの処理速度を調べた。
By adding query processing using static multi-operation processing using synthetic relational operations to MOB-DB developed uniquely, MOB-DB uses query multi-operations using synthetic relational operations, Query processing using static multi-operation processing and query processing using dynamic multi-operation processing can be performed, and these query processing methods can be freely selected and executed.
Next, using MOB-DB, the query processing speed by these query processing methods was examined. Furthermore, in order to compare with version 3 of MySQL widely used in the market, common query processing was performed to examine the processing speed of MOB-DB and MySQL.

MOB−DBを用いてクエリー処理のテストを行うには、数多くのレコードを格納した十分に大きいデータベースが必要なため、Windows XP Professional(R)を搭載した一般のエントリーレベルのパーソナルコンピューター(1つのCeleron CPU 2.53GHzプロセッサ、512MBメインメモリ、1つの145GBディスク)上に、図11のリレーションEMPLOYEE,DEPARTMENT,WORKS_ON,PROJECTと4つのリレーションから構成されるデータベースを作成し、それぞれのリレーションに10万件ずつレコードを格納し、合計40万件ほどのレコードをデータベースに加えた。クエリーを効率よく高速に処理するには、リレーションにインデックスが必要であるため、リレーションEMPLOYEE(1101)の主属性SSNに対して主インデックス(1100)を作成し、2次属性PHONEに対して2次インデックス(1102)を作成した。リレーションDEPARTMENT(1105)では、主属性DNUMBERに対して主インデックス(1104)を作成し、2次属性DPHONEに対して2次インデックス(1106)を作成した。リレーションPROJECT(1108)では、主属性PNUMBERに対して主インデックス(1107)を作成した。同様に、MySQLバージョン3を用いた場合にも、4個のリレーションから構成される共通のデータベースを作成し、MOB−DBと同様に、データベース内のリレーションに対してインデックスを加えた。   In order to test query processing using MOB-DB, a sufficiently large database that stores a large number of records is required. Therefore, a general entry level personal computer (one Celeron equipped with Windows XP Professional (R)) is installed. Create a database consisting of 4 relations (relationship EMPLOYEE, DEPARTMENT, WORKS_ON, PROJECT in Fig. 11) on a CPU 2.53GHz processor, 512MB main memory, and one 145GB disk), and record 100,000 records for each relation. And a total of 400,000 records were added to the database. In order to process the query efficiently and quickly, an index is required for the relation, so a primary index (1100) is created for the primary attribute SSN of the relation EMPLOYEE (1101) and a secondary is set for the secondary attribute PHONE. An index (1102) was created. In relation DEPARTMENT (1105), a primary index (1104) is created for the primary attribute DNUMBER, and a secondary index (1106) is created for the secondary attribute DPHONE. In relation PROJECT (1108), a primary index (1107) is created for the primary attribute PNUMBER. Similarly, when using MySQL version 3, a common database composed of four relations was created, and an index was added to the relations in the database in the same manner as MOB-DB.

次に、データベースサーバーに問い合わせるクエリーは、それぞれのクエリー・プロセッサの処理能力を最大限に利用するために、複雑な検索処理を必要とする数多くの異なるクエリーをSQLで記述した。それらのクエリーは次のような条件や特性を持つものである。   Next, the queries that query the database server described many different queries in SQL that require complex search processing to make the best use of the processing power of each query processor. These queries have the following conditions and characteristics.

(1)問い合わせるクエリーには、同じクエリーが1つとして含まれないようにするため、すべてのクエリーの検索条件は異なるものにした。また、各クエリーには、演算、属性、変数からなる検索条件をブール演算のAND,ORを組み合わせて、さらに複雑な検索条件を持たせて絞込み検索を行うようにした。 (1) In order to prevent the same query from being included as one query, the search conditions for all queries are different. Each query is combined with Boolean AND and OR search conditions consisting of operations, attributes, and variables, and a narrow search is performed with more complicated search conditions.

(2)クエリー・プロセッサによって十分な結合演算処理が行われるように、各クエリーには2つ以上の結合演算を含むようにした。また、クエリー・プロセッサによって必ず検索結果が得られるように、各クエリーには検索条件がゼロにならない検索条件を与えた。 (2) Each query includes two or more join operations so that the query processor can perform sufficient join operation processing. Each query is given a search condition that does not become zero so that the query processor can always obtain a search result.

(3)クエリー・プロセッサによってあらゆる種類の処理結果が得られるように、1000件以下の処理結果が得られるクエリー、1000件から1万件の処理結果が得られるクエリー、1万件から5万件の処理結果が得られるクエリー、5万件から10万件の処理結果が得られるクエリーをそれぞれ十分な数ほど(それぞれ25パーセントずつ)データベースに問い合わせた。 (3) Queries that obtain 1000 or less processing results, queries that obtain 1000 to 10,000 processing results, and 10,000 to 50,000 so that all kinds of processing results can be obtained by the query processor A sufficient number of queries (25 percent each) were queried from the database for queries from which 50,000 to 100,000 results were obtained.

(4)クエリー・プロセッサによってインデックスを用いた検索が行われるように、検索条件に主インデックスを利用するクエリー、2次インデックスを利用するクエリー、主インデックスと2次インデックスの両方を利用するクエリーを与えた。また、インデックスを利用しないクエリーがインデックスを利用するクエリーと交わって処理されるように、選択条件に主インデックスと2次インデックスの両方を利用しないクエリーも与えた。 (4) A query that uses a primary index as a search condition, a query that uses a secondary index, and a query that uses both a primary index and a secondary index are provided so that a search using an index is performed by a query processor. It was. In addition, a query that does not use both the primary index and the secondary index is given as a selection condition so that a query that does not use an index is processed along with a query that uses an index.

MOB−DBの合成関係演算を利用したスタティックマルチオペレーション・プロセッシングを用いたクエリー処理、ダイナミックマルチオペレーション・プロセッシングを用いたクエリー処理、スタティックマルチオペレーション・プロセッシングを用いたクエリー処理、及びMySQLバージョン3の処理速度を調べるために、データベースサーバーに検索処理を要求するクライアントプログラムを用意し、クライアントプログラムから数多くのSQLで記述されたクエリーをデータベースサーバーに問い合わせて、データベースサーバー上のクエリー・プロセッサによってすべてのクエリーが処理されて、検索結果がクライアントプログラムに返されるまでの時間を測定する方法を用いた。クライアントコンピューターとデータベースサーバーとの間の通信速度の影響を避けるために、直接、データベースサーバー上でクライアントプログラムを起動させて、検索処理結果が得られるようにした。データベースに問い合わせるために作成したクエリーの数は、100件、200件、300件、400件、500件、600件、700件、800件、900件、1000件となるように、徐々に件数を増加させてクエリーの処理速度を測定した。同様に、MySQLバージョン3に対しても、上述した件数と同数のクエリー数を用いて、MySQLのクエリーの処理速度を測定して、MySQLの処理速度とMOB−DBを用いた合成関係演算を利用したスタティックマルチオペレーション・プロセッシング、ダイナミックマルチオペレーション・プロセッシング、スタティックマルチオペレーション・プロセッシングとの処理速度を比較した。   Query processing using static multi-operation processing using MOB-DB composition-related operations, query processing using dynamic multi-operation processing, query processing using static multi-operation processing, and processing speed of MySQL version 3 In order to check the database, a client program that requests the database server to search is prepared, the client program queries the database server for a number of queries written in SQL, and all queries are processed by the query processor on the database server. Then, a method of measuring the time until the search result is returned to the client program is used. In order to avoid the influence of the communication speed between the client computer and the database server, the client program was started directly on the database server to obtain the search processing result. Gradually increase the number of queries created to query the database to 100, 200, 300, 400, 500, 600, 700, 800, 900, 1000 The query processing speed was measured in increments. Similarly, for MySQL version 3, using the same number of queries as the number of cases described above, the processing speed of the MySQL query is measured, and the processing speed of MySQL and the composite relational operation using MOB-DB are used. The processing speed was compared with static multi-operation processing, dynamic multi-operation processing, and static multi-operation processing.

図12は、MOB−DBの合成関係演算を利用したスタティックマルチオペレーション・プロセッシング、ダイナミックマルチオペレーション・プロセッシング、スタティックマルチオペレーション・プロセッシング、及びMySQLのバージョン3に対して、数多くのクエリーを問い合わせたときに、クエリー数とクエリーの処理速度の関係を比較した結果を表(図12(a)参照)とグラフ(図12(b)参照)で表わしたものである。   FIG. 12 shows a case where a large number of queries are made to version 3 of static multi-operation processing, dynamic multi-operation processing, static multi-operation processing, and MySQL using a composition relation operation of MOB-DB. The results of comparing the relationship between the number of queries and the query processing speed are shown in a table (see FIG. 12A) and a graph (see FIG. 12B).

図12(a),(b)に示した処理結果から、クエリー数が100件から1000件までの件数において、全体的に、合成関係演算を利用したスタティックマルチオペレーション・プロセッシングが最も早く、次にダイナミックマルチオペレーション・プロセッシングの処理速度が速く、その次にスタティックオペレーションプロセッシングとなり、MySQLの処理速度が一番遅いことがわかる。   From the processing results shown in FIGS. 12 (a) and 12 (b), static multi-operation processing using synthetic relational operations is the fastest overall in the number of queries from 100 to 1000, It can be seen that the processing speed of dynamic multi-operation processing is fast, followed by static operation processing, and the processing speed of MySQL is the slowest.

合成関係演算を利用したスタティックマルチオペレーション・プロセッシングは、クエリー数が100件から500件までは、ダイナミックマルチオペレーション・プロセッシングよりも平均して1.64倍の処理速度が得られ、スタティックマルチオペレーション・プロセッシングよりも平均して1.76倍の処理速度が得られ、MySQLバージョン3の処理速度よりも平均して6.34倍の処理速度が得られ、クエリー数が600件から1000件まででは、ダイナミックマルチオペレーション・プロセッシングよりも平均して1.65倍の処理速度が得られ、スタティックマルチオペレーション・プロセッシングよりも平均して、1.79倍の処理速度が得られ、MySQLバージョン3の処理速度よりも平均して6.47倍の処理速度が得られた。   In static multi-operation processing using synthetic relational operations, the average number of queries from 100 to 500 is 1.64 times faster than dynamic multi-operation processing, which is higher than static multi-operation processing. 1.76 times faster on average, 6.34 times faster on average than MySQL version 3, with 600 to 1000 queries compared to dynamic multi-operation processing 1.65 times faster on average, 1.79 times faster than static multi-operation processing, and 6.47 times faster on average than MySQL version 3 It was.

以上のように、合成関係演算を利用したスタティックマルチオペレーション・プロセッシングは、これらのクエリー・プロセッサよりも処理速度が改善され、MySQLバージョン3よりも6.34〜6.47倍の処理速度の向上が見られ、クエリー数が増加するにつれて、処理速度が向上していく傾向がある。   As described above, static multi-operation processing using composition-related operations has an improved processing speed compared to these query processors, and an improvement in processing speed of 6.34 to 6.47 times that of MySQL version 3 can be seen. As the number increases, the processing speed tends to improve.

データベースシステムのアーキテクチャの構成例を示す図である。It is a figure which shows the structural example of the architecture of a database system. クエリーを処理するフローチャートである。It is a flowchart which processes a query. 実施形態で使用するデータベースのリレーションDEPARTMENTを示す図である。It is a figure which shows the relation DEPARTMENT of the database used by embodiment. 実施形態で使用するデータベースのリレーションEMPLOYEEを示す図である。It is a figure which shows relation EMPLOYEE of the database used by embodiment. 実施形態で使用するデータベースのリレーションPROJECT,WORKS_ONを示す図である。It is a figure which shows relations PROJECT and WORKS_ON of the database used by embodiment. 処理ツリーPを示す図である。It is a diagram showing a processing tree P 1. 処理ツリーP2,P3,P4を示す図である。Processing tree P 2, P 3, is a diagram illustrating a P 4. 処理ツリーP5,P6を示す図である。It is a diagram showing a processing tree P 5, P 6. タスクのグループ分け及びサブグループ分けを説明する図である。It is a figure explaining grouping and subgrouping of a task. 合成選択演算の最適化を説明する図である。It is a figure explaining the optimization of a synthetic | combination selection calculation. 合成関係演算を利用したスタティックマルチオペレーション・プロセッシングを説明する図である。It is a figure explaining static multi operation processing using composition relational operation. 合成選択演算の処理結果を共有するための手順を説明する図である。It is a figure explaining the procedure for sharing the process result of a synthetic | combination selection calculation. 合成選択演算の処理結果を共有するための手順(続き)を説明する図である。It is a figure explaining the procedure (continuation) for sharing the process result of a synthetic | combination selection calculation. 合成関係演算を利用したスタティックマルチオペレーション・プロセッシングを説明する図である。It is a figure explaining static multi operation processing using composition relational operation. 合成関係演算タスクの処理結果として得られたリレーションに対するスタティックマルチオペレーション・プロセッシングを説明する図である。It is a figure explaining the static multi-operation processing with respect to the relation obtained as a process result of a synthetic | combination relational calculation task. 実際に処理を行ったデータベースのリレーションを示す図である。It is a figure which shows the relation of the database which processed actually. 処理結果を示す図である。It is a figure which shows a processing result.

Claims (7)

合成関係演算を利用したマルチオペレーション・プロセッシングを用いたデータベースのクエリー処理システムであって、
前記クエリーを関係代数による処理ツリーに変換する処理ツリー変換手段と、
前記処理ツリーから、トポロジカル・ソートにより、関係代数を他の関係代数の結果に依存しないで実施できる順番に、タスクとして取り出すタスク取り出し手段と、
前記取り出したタスクを、前記データベースのリレーションごとにグループ分けするクループ分け手段と、
グループ分けされた前記タスクに対して、共通部分式を持つタスクをさらにサブグループに集め、合成関係演算タスクを作成する合成関係演算作成手段と、
前記グループ分けされたタスクごとに、作成された前記合成関係演算タスクとサブグループに集まらないタスクとに対してマルチオペレーション・プロセッシングを行うマルチオペレーション・プロセッシング手段と、
グループ内の前記合成関係演算タスクの処理結果として得られたリレーションに対して、前記合成関係演算に含まれる個々のタスクが、そのリレーションのレコード及び/又は属性を部分的に共有するように、格納位置による仮想リレーションを作成する仮想リレーション作成手段と
を備えることを特徴とするクエリー処理システム。
A database query processing system using multi-operation processing using composition relational operations,
Processing tree conversion means for converting the query into a processing tree based on a relational algebra;
From the processing tree, by means of topological sorting, task retrieval means for retrieving as a task in an order in which relational algebra can be implemented without depending on the result of other relational algebra;
A grouping means for grouping the retrieved tasks for each relation of the database;
For the tasks divided into groups, a task having a common sub-expression is further collected into subgroups, and a composite relational calculation creating means for creating a composite relational calculation task;
Multi-operation processing means for performing multi-operation processing on the created synthetic relational calculation task and a task that does not gather in a subgroup for each grouped task;
Stores relations obtained as a result of processing of the composite relation calculation task in the group so that individual tasks included in the composite relation calculation partially share the relation records and / or attributes. A query processing system comprising: a virtual relation creating means for creating a virtual relation by position.
請求項1記載のクエリー処理システムにおいて、
前記合成関係演算作成手段は、サブグループに集めた複数の選択演算タスクで使用する属性名と属性数が等しいときに、それらの属性の中の1つの属性に関する選択条件だけが異なった条件かまたは同じ条件であり、それ以外の属性に関する選択条件はまったく同じであるならば、それらの選択条件をブール演算のORを使用して接続し、接続した選択条件から選択範囲の重複した部分を取り除くために、簡潔化して最適化した選択条件を作成し、その選択条件を用いて複数の選択演算タスクの合成関係演算を作成することを特徴とするクエリー処理システム。
The query processing system according to claim 1.
The composite relational operation creation means is configured such that when the attribute names and the number of attributes used in the plurality of selection calculation tasks collected in the subgroup are equal, only a selection condition related to one attribute among the attributes is different or If the selection conditions for the other attributes are exactly the same, connect those selection conditions using a Boolean OR and remove the duplicated selection from the connected selection conditions In addition, a query processing system is characterized in that a selection condition that is simplified and optimized is created, and a composite relation operation of a plurality of selection operation tasks is created using the selection condition.
請求項1記載のクエリー処理システムにおいて、
前記合成関係演算作成手段は、サブグループに集めた複数の射影演算タスクが、共通のリレーションに対して射影演算の処理を行うならば、これらの射影演算タスクの属性の和集合を求めて得られた属性を用いて、複数の射影演算タスクの合成関係演算を作成することを特徴とするクエリー処理システム。
The query processing system according to claim 1.
If the plurality of projection calculation tasks collected in the subgroup perform the projection calculation processing on the common relation, the composite relation calculation creation means can obtain the union of the attributes of these projection calculation tasks. A query processing system characterized by creating a composition relation operation of a plurality of projective operation tasks using the determined attributes.
請求項1〜3のいずれかに記載のクエリー処理システムにおいて、
前記仮想リレーション作成手段は、仮想リレーションのレコードに対してタスクが検索処理を行う場合、仮想リレーションが部分的に共有するリレーションの検索に使用する属性に対して、インデックスを作成することを特徴とするクエリー処理システム。
In the query processing system according to any one of claims 1 to 3,
The virtual relation creating means creates an index for an attribute used for searching a relation partially shared by the virtual relation when the task performs a search process on the record of the virtual relation. Query processing system.
請求項1〜4のいずれかに記載のクエリー処理システムにおいて、
前記グループ分け手段は、前記合成関係演算タスクの処理結果として得られたリレーションごとにも、タスクをグループ分けすることを特徴とするクエリー処理システム。
In the query processing system according to any one of claims 1 to 4,
The query processing system according to claim 1, wherein the grouping means groups the tasks for each relation obtained as a result of processing the synthetic relational calculation task.
請求項1〜5のいずれかに記載の合成関係演算を利用したマルチオペレーション・プロセッシングを用いたデータベースのクエリー処理システムの各機能を、コンピュータ・システムに実現させるためのプログラム。   A program for causing a computer system to realize each function of a database query processing system using multi-operation processing using a composition relational operation according to any one of claims 1 to 5. 請求項1〜5のいずれかに記載のマルチオペレーション・プロセッシングを用いたデータベースのクエリー処理システムの各機能を、コンピュータ・システムに実現させるためのプログラムを記録した記録媒体。   A recording medium storing a program for causing a computer system to realize each function of the database query processing system using multi-operation processing according to claim 1.
JP2007075670A 2007-03-22 2007-03-22 Database query processing system using multi-operation processing using synthetic relational operations Expired - Fee Related JP4071816B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2007075670A JP4071816B1 (en) 2007-03-22 2007-03-22 Database query processing system using multi-operation processing using synthetic relational operations

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2007075670A JP4071816B1 (en) 2007-03-22 2007-03-22 Database query processing system using multi-operation processing using synthetic relational operations

Publications (2)

Publication Number Publication Date
JP4071816B1 JP4071816B1 (en) 2008-04-02
JP2008234495A true JP2008234495A (en) 2008-10-02

Family

ID=39356484

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007075670A Expired - Fee Related JP4071816B1 (en) 2007-03-22 2007-03-22 Database query processing system using multi-operation processing using synthetic relational operations

Country Status (1)

Country Link
JP (1) JP4071816B1 (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2010131425A1 (en) * 2009-05-14 2010-11-18 日本電気株式会社 Sequentially generated data analysis device, system, method, and program
JP2011039818A (en) * 2009-08-12 2011-02-24 Hitachi Ltd System, method and program for processing stream data
JP2012505490A (en) * 2009-10-26 2012-03-01 ソニー コンピュータ エンタテインメント アメリカ リミテッド ライアビリテイ カンパニー File I / O scheduling using instant chunking of data
JP2012113706A (en) * 2010-11-19 2012-06-14 Internatl Business Mach Corp <Ibm> Computer-implemented method, computer program, and data processing system for optimizing database query
WO2013175609A1 (en) * 2012-05-24 2013-11-28 株式会社日立製作所 Database management system, computer, and database management method
JP2014228974A (en) * 2013-05-20 2014-12-08 日本電信電話株式会社 Analysis method, analyzer and analysis program
JP2018510413A (en) * 2015-02-26 2018-04-12 インターナショナル・ビジネス・マシーンズ・コーポレーションInternational Business Machines Corporation Database query execution trace and data generation to diagnose execution problems

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4073033B1 (en) 2007-04-27 2008-04-09 透 降矢 A database query processing system using multi-operation processing using composite relational operations that considers improvement of processing functions of join operations
JP4261609B1 (en) 2008-05-02 2009-04-30 透 降矢 Database transaction processing system using multi-operation processing with transaction concurrency control
US7917547B2 (en) * 2008-06-10 2011-03-29 Microsoft Corporation Virtualizing objects within queries

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2010131425A1 (en) * 2009-05-14 2010-11-18 日本電気株式会社 Sequentially generated data analysis device, system, method, and program
JP2011039818A (en) * 2009-08-12 2011-02-24 Hitachi Ltd System, method and program for processing stream data
JP2012505490A (en) * 2009-10-26 2012-03-01 ソニー コンピュータ エンタテインメント アメリカ リミテッド ライアビリテイ カンパニー File I / O scheduling using instant chunking of data
JP2012113706A (en) * 2010-11-19 2012-06-14 Internatl Business Mach Corp <Ibm> Computer-implemented method, computer program, and data processing system for optimizing database query
US9569485B2 (en) 2010-11-19 2017-02-14 International Business Machines Corporation Optimizing database query
WO2013175609A1 (en) * 2012-05-24 2013-11-28 株式会社日立製作所 Database management system, computer, and database management method
JPWO2013175609A1 (en) * 2012-05-24 2016-01-12 株式会社日立製作所 Database management system, computer, database management method
US10747773B2 (en) 2012-05-24 2020-08-18 Hitachi, Ltd. Database management system, computer, and database management method
JP2014228974A (en) * 2013-05-20 2014-12-08 日本電信電話株式会社 Analysis method, analyzer and analysis program
JP2018510413A (en) * 2015-02-26 2018-04-12 インターナショナル・ビジネス・マシーンズ・コーポレーションInternational Business Machines Corporation Database query execution trace and data generation to diagnose execution problems
US10970279B2 (en) 2015-02-26 2021-04-06 International Business Machines Corporation Database query execution tracing and data generation for diagnosing execution issues
US11016970B2 (en) 2015-02-26 2021-05-25 International Business Machines Corporation Database query execution tracing and data generation for diagnosing execution issues

Also Published As

Publication number Publication date
JP4071816B1 (en) 2008-04-02

Similar Documents

Publication Publication Date Title
JP4073033B1 (en) A database query processing system using multi-operation processing using composite relational operations that considers improvement of processing functions of join operations
JP4071816B1 (en) Database query processing system using multi-operation processing using synthetic relational operations
US11860830B2 (en) Combined row and columnar storage for in-memory databases for OLTP and analytics workloads
US7895151B2 (en) Fast bulk loading and incremental loading of data into a database
JP4866495B2 (en) Method and apparatus for executing combined queries in a database system
US8332389B2 (en) Join order for a database query
US7966311B2 (en) Systems and methods for processing queries
Qader et al. A comparative study of secondary indexing techniques in LSM-based NoSQL databases
US8458129B2 (en) Methods and systems for real-time continuous updates
US20090254532A1 (en) Accessing data in a column store database based on hardware compatible data structures
US20090254516A1 (en) Accessing data in a column store database based on hardware compatible indexing and replicated reordered columns
US20100005077A1 (en) Methods and systems for generating query plans that are compatible for execution in hardware
US20080189251A1 (en) Processing elements of a hardware accelerated reconfigurable processor for accelerating database operations and queries
CN108536692B (en) Execution plan generation method and device and database server
JP3914662B2 (en) Database processing method and apparatus, and medium storing the processing program
SG184482A1 (en) Data storage and/or retrieval based on a database model-agnostic, schema-agnostic and workload-agnostic data storage and access models
IL156117A (en) Method and computer program for organising a database and a database organised according to such a method
US20110289112A1 (en) Database system, database management method, database structure, and storage medium
Kim et al. Robust and efficient memory management in Apache AsterixDB
JP4109305B1 (en) Database query processing system using multi-operation processing
Arnold et al. HRDBMS: Combining the best of modern and traditional relational databases
Rupley Jr Introduction to query processing and optimization
JP7495269B2 (en) Data management system and method
JP3538322B2 (en) Database management system and query processing method
CN113688127B (en) Data compression technique

Legal Events

Date Code Title Description
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20071225

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

Free format text: PAYMENT UNTIL: 20120125

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20130125

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20130125

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20140125

Year of fee payment: 6

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees