JP2007065978A - Computer system and database management system program - Google Patents

Computer system and database management system program Download PDF

Info

Publication number
JP2007065978A
JP2007065978A JP2005251111A JP2005251111A JP2007065978A JP 2007065978 A JP2007065978 A JP 2007065978A JP 2005251111 A JP2005251111 A JP 2005251111A JP 2005251111 A JP2005251111 A JP 2005251111A JP 2007065978 A JP2007065978 A JP 2007065978A
Authority
JP
Japan
Prior art keywords
data
prefetch
query
processing
entry
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
JP2005251111A
Other languages
Japanese (ja)
Other versions
JP5261809B2 (en
Inventor
Masaru Kiregawa
優 喜連川
Kazuhiko Mogi
和彦 茂木
Norifumi Nishikawa
記史 西川
Hideomi Idei
英臣 出射
Nobuo Kawamura
信男 河村
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hitachi Ltd
University of Tokyo NUC
Original Assignee
Hitachi Ltd
University of Tokyo NUC
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hitachi Ltd, University of Tokyo NUC filed Critical Hitachi Ltd
Priority to JP2005251111A priority Critical patent/JP5261809B2/en
Publication of JP2007065978A publication Critical patent/JP2007065978A/en
Application granted granted Critical
Publication of JP5261809B2 publication Critical patent/JP5261809B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To reduce necessary memory quantity when operating a look-ahead function on a computer where a DBMS is operating. <P>SOLUTION: This computer system includes a computer for storing a database management system program in a memory, and a storage device for storing data. The computer is provided with: a shared DB data management part for assigning a buffer on the memory, and for managing the buffer, a data processing part for acquiring the requested data; and a look-ahead part for operating the look-ahead of the data by referring to the data stored in the buffer. The shared DB data management part is characterized in that the data in the buffer is locked when the data are acquired by the data processing part. <P>COPYRIGHT: (C)2007,JPO&INPIT

Description

本発明は、データベース管理システムプログラムを有する計算機を含む計算機システムに関し、特に、データベース管理システムで処理されるデータの先読み方法に関する。   The present invention relates to a computer system including a computer having a database management system program, and more particularly to a method for prefetching data processed by a database management system.

近年、計算機システムで扱われるデータ量の増大とともに、これらのデータを管理するためのソフトウェアであるデータベース管理システム(以下、DBMS)は極めて重要なものとなった。DBMSにおける処理性能は記憶装置に格納されたデータへのアクセス性能と密接に関連しており、そのアクセス性能がDBMSの処理性能の決定要因となることは珍しくない。   In recent years, with the increase in the amount of data handled by computer systems, a database management system (hereinafter referred to as DBMS) which is software for managing these data has become extremely important. The processing performance in the DBMS is closely related to the access performance to the data stored in the storage device, and it is not uncommon for the access performance to be a determining factor for the processing performance of the DBMS.

記憶装置へのアクセス性能による影響を軽減しDBMSの処理性能を向上するための手法として、これから利用されるデータを計算機のメモリ等、高速アクセス可能な記憶領域にあらかじめ読み出しておく「先読み」と呼ばれる手法が存在する。先読みにおける課題はこれから利用されるデータを事前に把握する方法である。先読みに関連した技術としては、以下のものが存在する。   As a technique for reducing the impact of access performance to storage devices and improving DBMS processing performance, this is called “read ahead” in which data to be used in the future is read in advance into a storage area such as a computer memory that can be accessed at high speed. There is a method. The problem in prefetching is how to grasp in advance the data to be used. There are the following technologies related to prefetching.

オペレーティングシステム(以下「OS」)が、プログラムから発行されたヒントを用いて計算機上のファイルキャッシュにデータを先読みする機能と、その制御方法について論じている(例えば、非特許文献1参照。)。本技術では、今後アクセスが行われるファイルとアクセス先領域に関するヒントをプログラムが発行するよう、管理者等によってプログラムが修正される。非特許文献1では、本技術をDBMSに対して適用した例として、B−Tree索引による検索処理中で検索キー値に対応するポインタにより示される領域をヒントとして与え、先読みする方法を述べている。   An operating system (hereinafter referred to as “OS”) discusses a function of prefetching data into a file cache on a computer using a hint issued from a program and a control method thereof (for example, see Non-Patent Document 1). In the present technology, the program is modified by an administrator or the like so that the program issues a hint regarding a file to be accessed in the future and an access destination area. Non-Patent Document 1 describes, as an example in which the present technology is applied to a DBMS, a method in which an area indicated by a pointer corresponding to a search key value is given as a hint during a search process using a B-Tree index and prefetched. .

DBMSにおける処理の実行計画である「クエリプラン」を利用した記憶装置における先読み技術を開示している(特許文献1参照。)。本技術では、クエリプランやその他DBMSが有する管理情報を記憶装置内の先読み機能が取得する。先読み機能は、取得情報を基にDBMSが管理するデータの解析を行う。先読み機能は、その結果としてこれからアクセスされるデータを把握し、それらを記憶装置が有する高速アクセス可能な記憶領域であるキャッシュに先読みする。本技術ではDBMSが行う通常の問い合わせ処理(以下「DBMS主処理」)から独立して先読みが実施され、高い先読み効果が期待できる。
特開2003−150419号広報 R. H. Patterson et al, "Informed Prefetching and Caching," In proceeding of the 15th ACM Symposium on Operationg Systems Principles, pp. 79-95, Dec. 1995.
A prefetching technique in a storage device using a “query plan” which is an execution plan of processing in a DBMS is disclosed (see Patent Document 1). In the present technology, the pre-read function in the storage device acquires the query plan and other management information held by the DBMS. The prefetch function analyzes data managed by the DBMS based on the acquired information. As a result, the prefetch function grasps data to be accessed from now on, and prefetches them into a cache which is a storage area of the storage device that can be accessed at high speed. In the present technology, prefetching is performed independently of normal inquiry processing (hereinafter, “DBMS main processing”) performed by the DBMS, and a high prefetching effect can be expected.
Japanese Laid-Open Patent Publication No. 2003-150419 RH Patterson et al, "Informed Prefetching and Caching," In proceeding of the 15th ACM Symposium on Operationg Systems Principles, pp. 79-95, Dec. 1995.

これまで説明した背景技術では、以下の点が課題となる。   In the background art described so far, the following points are problems.

非特許文献1に記載された技術では、DBMSが実行するDBMS主処理の一部としてヒントを発行する。そのため、データの排他ロック等が原因で処理が停止するとヒントの発行も停止される。その結果、先読み処理も停止してしまい、高い先読み効果を得ることができない。   In the technique described in Non-Patent Document 1, a hint is issued as part of the DBMS main process executed by the DBMS. Therefore, when the process is stopped due to an exclusive lock of data or the like, the issuing of hints is also stopped. As a result, the prefetching process is also stopped, and a high prefetching effect cannot be obtained.

特許文献1で開示された技術で非特許文献1の課題は解決する。ただ、特許文献1で開示された技術では先読み機能がDBMSとは独立にデータを保持・管理する。そのため、計算機システム内で同じデータが二重に保持されることになる。通常、DBMSでは「バッファ」と呼ぶ計算機のメモリ上に確保した記憶領域に高頻度で利用されるデータを保持することにより性能を向上する手法を利用する。一般に、バッファ用に確保したメモリ量が多いほどDBMSは高い性能を発揮する。先読み機能とDBMSを同じ計算機で実行した場合、同じデータが計算機上に二重に保持されることになり、その分バッファとして利用できるメモリ量が減りDBMSの性能が低下する可能性が高い。   The technique disclosed in Patent Document 1 solves the problem of Non-Patent Document 1. However, in the technique disclosed in Patent Document 1, the prefetch function holds and manages data independently of the DBMS. Therefore, the same data is held twice in the computer system. Usually, DBMS uses a technique for improving performance by holding frequently used data in a storage area secured on a computer memory called a “buffer”. In general, the larger the amount of memory reserved for the buffer, the higher the performance of the DBMS. When the prefetch function and the DBMS are executed by the same computer, the same data is held twice on the computer, and accordingly, the amount of memory that can be used as a buffer is reduced, and the DBMS performance is likely to deteriorate.

本発明の目的は、DBMSの通常の問い合わせ処理(DBMS主処理)から独立して先読み機能を実施する場合に、必要とされるメモリ量を抑えることである。これによって、DBMSが稼動する計算機上で先読み機能を動作させるときに、計算機が有するメモリ量が少ない場合でも先読み処理によって高い処理性能を得ることができるようにする。   An object of the present invention is to reduce the amount of memory required when the prefetch function is performed independently of the normal inquiry processing (DBMS main processing) of the DBMS. As a result, when the prefetch function is operated on the computer on which the DBMS operates, high processing performance can be obtained by the prefetch processing even when the memory amount of the computer is small.

本発明は、データベース管理システムプログラムをメモリに記憶する計算機と、データを記憶する記憶装置と、を含む計算機システムにおいて、前記計算機は、前記メモリ上にバッファを割り当て、前記バッファを管理する共有DBデータ管理部と、要求されたデータを取得するデータ処理部と、前記バッファに格納されているデータを参照してデータを先読みする先読み部と、を有し、前記共有DBデータ管理部は、前記データ処理部がデータを取得する際に、前記バッファ内のデータをロックすることを特徴とする。   The present invention relates to a computer system including a computer that stores a database management system program in a memory and a storage device that stores data, wherein the computer allocates a buffer on the memory and manages the buffer. A management unit; a data processing unit that obtains requested data; and a prefetching unit that prefetches data with reference to data stored in the buffer, wherein the shared DB data management unit includes the data When the processing unit acquires data, the data in the buffer is locked.

本発明によれば、DBMSが稼動する計算機上で先読み機能を動作させるとき、必要とされるメモリ量を削減できる。そのため、より多くのメモリをDBMSのバッファとして利用できるので、高いシステム性能を得ることができる。   According to the present invention, it is possible to reduce the amount of memory required when operating the prefetch function on a computer on which a DBMS operates. As a result, a larger amount of memory can be used as a buffer for the DBMS, so that high system performance can be obtained.

DBMSが稼動する計算機上で、先読み部を動作させる。当該先読み部は、DBMS主処理を行うデータ処理部と独立して先読み処理を行う。その際、データ処理部が設定するデータへのロックの影響を先読み部が受けないようにする。そして、データ処理部及び先読み部がデータを共有することによって、計算機のメモリの利用量を抑えながら高い先読み効果を得ることができる。また、計算機の動作状況又はDBMS主処理の動作状況等に応じて先読み部を外部から調整することによって、好適な先読み動作を実現する。   The prefetch unit is operated on the computer on which the DBMS operates. The prefetching unit performs prefetching processing independently of the data processing unit that performs DBMS main processing. At this time, the prefetching unit is prevented from being affected by the lock on the data set by the data processing unit. The data processing unit and the prefetching unit share data, so that a high prefetching effect can be obtained while reducing the memory usage of the computer. Further, a suitable prefetching operation is realized by adjusting the prefetching unit from the outside in accordance with the operation state of the computer or the operation state of the DBMS main process.

(第1の実施の形態)
第1の実施の形態では、一台の計算機上でDBMSが動作する。そして、当該計算機のメモリ上に割り当てられたバッファをデータ処理部及び先読み部が共有する。
(First embodiment)
In the first embodiment, the DBMS operates on one computer. The data processing unit and the prefetching unit share the buffer allocated on the memory of the computer.

また、第1の実施の形態では、先読み部は、DBMS中の一つの機能として実現される。   In the first embodiment, the prefetching unit is realized as one function in the DBMS.

図1は、本発明の第1の実施の形態の計算機システムのブロック図である。   FIG. 1 is a block diagram of a computer system according to the first embodiment of this invention.

計算機システムは、DBサーバ42、APサーバ44及び記憶装置46を含む。   The computer system includes a DB server 42, an AP server 44, and a storage device 46.

APサーバ44は、APプログラムを実行することによって、DBMS60に対して処理の要求を発行する計算機である。   The AP server 44 is a computer that issues a processing request to the DBMS 60 by executing an AP program.

DBサーバ42とAPサーバ44とは、ネットワーク24を経由して接続され、相互に通信可能である。また、DBサーバ42は、I/Oパス34を経由して一台以上の記憶装置46に接続される。   The DB server 42 and the AP server 44 are connected via the network 24 and can communicate with each other. The DB server 42 is connected to one or more storage devices 46 via the I / O path 34.

記憶装置46は、DBサーバ42にデータの記憶領域を提供する。記憶装置46は、例えば、複数のディスク装置(HDD)にデータを記憶する。   The storage device 46 provides a data storage area to the DB server 42. For example, the storage device 46 stores data in a plurality of disk devices (HDDs).

DBサーバ42は、DBMS60を実行する計算機である。また、DBサーバ42は、CPU12、メモリ14、HDD16、CD−ROMドライブ18、ネットワークI/F22及びI/OパスI/F32を備える。   The DB server 42 is a computer that executes the DBMS 60. The DB server 42 includes a CPU 12, a memory 14, an HDD 16, a CD-ROM drive 18, a network I / F 22, and an I / O path I / F 32.

CPU12、メモリ14、HDD16、CD−ROMドライブ18、ネットワークI/F22及びI/OパスI/F32は、内部バス20で接続される。   The CPU 12, memory 14, HDD 16, CD-ROM drive 18, network I / F 22 and I / O path I / F 32 are connected by an internal bus 20.

CPU12は、メモリ14上のプログラムを実行することによって各種処理を実行する。なお、なお、DBサーバ42は、本説明図においてCPU12を二つ備えているが、いくつ備えていてもよい。   The CPU 12 executes various processes by executing programs on the memory 14. In addition, although the DB server 42 includes two CPUs 12 in this explanatory diagram, any number may be included.

メモリ14は、DBMS60、共有管理情報62、共有バッファ64及びOS52を記憶する。OS52は、DBサーバ42の全体を制御する。例えば、OS52は、プログラム実行制御、ハードウェア制御、計算機間の通信、HDD16の記憶領域の管理又は記憶装置46の記憶領域の管理等を行う。更に、本実施の形態においては、OS52は、CPU12の利用率を計測し、それを他のプログラムに提供する。また、OS52は、マルチスレッド実行モデルに対応したスレッド機能を有する。なお、本実施の形態は、スレッド機能の代りに、OS52等が提供するマルチプロセス機能を利用してもよい。   The memory 14 stores a DBMS 60, share management information 62, a share buffer 64, and an OS 52. The OS 52 controls the entire DB server 42. For example, the OS 52 performs program execution control, hardware control, communication between computers, management of the storage area of the HDD 16, management of the storage area of the storage device 46, and the like. Furthermore, in the present embodiment, the OS 52 measures the usage rate of the CPU 12 and provides it to other programs. The OS 52 has a thread function corresponding to the multi-thread execution model. In this embodiment, a multi-process function provided by the OS 52 or the like may be used instead of the thread function.

DBMS60は、データベース(DB)に関する処理を実施するプログラムである。なお、DBサーバ42は、複数のDBMS60を実行してもよい。DBMS60が管理するDBのデータは、記憶装置46に格納される。   The DBMS 60 is a program that performs processing related to a database (DB). Note that the DB server 42 may execute a plurality of DBMSs 60. DB data managed by the DBMS 60 is stored in the storage device 46.

共有管理情報62は、図2で詳細を説明するが、DBMS60の処理に関する情報である。   The share management information 62, which will be described in detail with reference to FIG.

共有バッファ64は、高頻度で利用されるデータを記憶する領域である。   The shared buffer 64 is an area for storing data that is frequently used.

なお、OS52及びDBMS60等は、これらを記憶している可搬記憶媒体(CD−ROM等)からCD−ROMドライブ18を用いて読み出され、HDD16又は記憶装置46にインストールされる。   Note that the OS 52 and the DBMS 60 are read from a portable storage medium (such as a CD-ROM) storing these using the CD-ROM drive 18 and installed in the HDD 16 or the storage device 46.

ネットワークI/F22は、ネットワーク24を介して、APサーバ44と接続するインタフェースである。I/OパスI/F32は、I/Oパス34を介して、記憶装置46と接続するインタフェースである。   The network I / F 22 is an interface connected to the AP server 44 via the network 24. The I / O path I / F 32 is an interface connected to the storage device 46 via the I / O path 34.

APサーバ44は、CPU82、メモリ84、HDD86及びネットワークI/F85を備える。   The AP server 44 includes a CPU 82, a memory 84, an HDD 86, and a network I / F 85.

CPU82、メモリ84、HDD86及びネットワークI/F85は、内部バス80で接続される。   The CPU 82, memory 84, HDD 86, and network I / F 85 are connected by an internal bus 80.

CPU82は、メモリ84上のプログラムを実行することによって各種処理を実行する。なお、なお、APサーバ44は、本説明図においてCPU82を二つ備えているが、いくつ備えていてもよい。   The CPU 82 executes various processes by executing programs on the memory 84. The AP server 44 includes two CPUs 82 in this explanatory diagram, but any number of CPUs may be provided.

メモリ84は、APプログラム70及びOS89を記憶する。   The memory 84 stores the AP program 70 and the OS 89.

OD89は、APサーバ44の全体を制御する。   The OD 89 controls the entire AP server 44.

APプログラム70は、業務を実施するプログラムである。APプログラム70は、DBMS60に対してDBに関する処理要求(クエリ)を発行する。   The AP program 70 is a program for performing business. The AP program 70 issues a processing request (query) regarding the DB to the DBMS 60.

なお、本説明図では、APプログラム70は、APサーバ44上で動作しているが、DBサーバ42上で動作してもよい。また、APサーバ44は、複数のAPプログラム70を実行してもよい。   In the explanatory diagram, the AP program 70 operates on the AP server 44, but may operate on the DB server 42. The AP server 44 may execute a plurality of AP programs 70.

また、本説明図では、APサーバ44は、一台を図示しているが、複数台備えられていてもよい。また、その上で複数のAPプログラム70が動作する場合も本実施例を適用可能である。   In this explanatory diagram, one AP server 44 is shown, but a plurality of AP servers 44 may be provided. In addition, this embodiment can also be applied to a case where a plurality of AP programs 70 operate on that.

以下、本発明の実施の形態のDBMS60の処理を説明する。   Hereinafter, processing of the DBMS 60 according to the embodiment of this invention will be described.

図2は、本発明の第1の実施の形態のDBMS60の機能の説明図である。   FIG. 2 is an explanatory diagram of functions of the DBMS 60 according to the first embodiment of this invention.

共有管理情報62は、スキーマ300、処理管理情報400、共有DBデータ管理情報450及び先読み処理情報500を含む。   The share management information 62 includes a schema 300, process management information 400, shared DB data management information 450, and prefetch process information 500.

スキーマ300は、DBMS60が管理するDBの定義等の情報であり、表定義情報、索引定義情報、オブジェクト管理情報及びファイル管理情報を含む。   The schema 300 is information such as a DB definition managed by the DBMS 60, and includes table definition information, index definition information, object management information, and file management information.

表定義情報は、図5Aで後述するが、DBMS60が管理するDBで定義されている表の定義情報である。索引定義情報は、図5Bで後述するが、DBMS60が管理するDBで定義されている索引の定義情報である。オブジェクト管理情報は、図5Cで後述するが、オブジェクトの記憶領域に関する情報である。ファイル管理情報は、図5Dで後述するが、DBMS60が管理するDBのデータを記憶装置46に格納する際に利用するファイルに関する情報である。   The table definition information is table definition information defined in the DB managed by the DBMS 60, which will be described later with reference to FIG. 5A. The index definition information is index definition information defined in the DB managed by the DBMS 60, which will be described later with reference to FIG. 5B. The object management information is information relating to the storage area of the object, which will be described later with reference to FIG. 5C. As will be described later with reference to FIG. 5D, the file management information is information relating to a file used when storing DB data managed by the DBMS 60 in the storage device 46.

処理管理情報400は、クエリ管理情報、トランザクション管理情報及びクエリプランを含む。   The process management information 400 includes query management information, transaction management information, and a query plan.

クエリ管理情報は、図6Aで後述するが、DBMS60が実行するクエリの管理情報である。トランザクション管理情報は、図6Bで後述するが、APプログラム70からのクエリによるトランザクションの状態を管理する情報である。クエリプランは、図7で後述するが、クライアント処理部202が作成したクエリに対応する処理の実行計画に関する情報である。   The query management information is query management information executed by the DBMS 60, which will be described later with reference to FIG. 6A. The transaction management information, which will be described later with reference to FIG. The query plan, which will be described later with reference to FIG. 7, is information related to an execution plan for processing corresponding to the query created by the client processing unit 202.

共有DBデータ管理情報450は、共有バッファ定義情報、バッファブロック管理情報、バッファグループ管理情報、ロック管理情報及びI/O待ち管理情報を含む。   The shared DB data management information 450 includes shared buffer definition information, buffer block management information, buffer group management information, lock management information, and I / O wait management information.

共有バッファ定義情報は、図8Aで後述するが、共有バッファ64の記憶領域に関する情報である。バッファブロック管理情報は、図8Bで後述するが、共有バッファ64内のブロックを管理する情報である。なお、ブロックは、共有バッファ64の記憶領域の管理単位である。バッファグループ管理情報は、図8Cで後述するが、共有バッファ64を分割するためにグループ化されたブロックの各グループを管理する情報である。ロック管理情報は、図8Dで後述するが、ページのロックを管理する情報である。I/O待ち管理情報は、図8Eで後述するが、I/O完了待ちのクエリを管理する情報である。   The shared buffer definition information is information related to the storage area of the shared buffer 64, which will be described later with reference to FIG. 8A. The buffer block management information is information for managing blocks in the shared buffer 64, which will be described later with reference to FIG. 8B. A block is a management unit of the storage area of the shared buffer 64. As will be described later with reference to FIG. 8C, the buffer group management information is information for managing each group of blocks grouped to divide the shared buffer 64. The lock management information is information for managing page lock, as will be described later with reference to FIG. 8D. The I / O waiting management information is information for managing a query waiting for I / O completion, which will be described later with reference to FIG. 8E.

先読み処理情報500は、総先読み数管理情報、先読み管理情報及び先読み要求管理情報を含む。   The prefetch processing information 500 includes total prefetch number management information, prefetch management information, and prefetch request management information.

総先読み数管理情報は、図9Aで後述するが、先読み処理で利用するスレッドの数を管理する情報及び先読み処理によって読み出したページを保持するブロックの数を管理する情報である。先読み管理情報は、図9Bで後述するが、クエリに対応して実行する先読み処理の管理情報である。先読み要求管理情報は、図9Cで後述するが、先読みI/Oを発行する処理を実行するスレッドを管理する情報である。   As will be described later with reference to FIG. 9A, the total prefetching number management information is information for managing the number of threads used in the prefetching process and information for managing the number of blocks holding the page read by the prefetching process. The prefetch management information, which will be described later with reference to FIG. 9B, is management information for prefetch processing executed in response to a query. As will be described later with reference to FIG. 9C, the prefetch request management information is information for managing a thread that executes a process of issuing a prefetch I / O.

DBMS60は、クライアント処理部202、実行管理部204、データ処理部206、先読み部208及び共有DBデータ管理部210を有する。   The DBMS 60 includes a client processing unit 202, an execution management unit 204, a data processing unit 206, a prefetching unit 208, and a shared DB data management unit 210.

また、本説明図には、それぞれの構成部が共有するデータに関するインタフェースの概略が記載されている。なお、すべての構成部は、必要に応じてスキーマ300を参照する。   Also, in this explanatory diagram, an outline of an interface related to data shared by each component is described. Note that all components refer to the schema 300 as necessary.

クライアント処理部202は、APプログラム70からクエリを取得する。次に、取得したクエリに対応するクエリプラン(クエリの実行計画)を作成する。次に、作成したクエリプランを処理管理情報400に保存する。次に、クエリの実行を実行管理部204に要求する。   The client processing unit 202 acquires a query from the AP program 70. Next, a query plan (query execution plan) corresponding to the acquired query is created. Next, the created query plan is stored in the process management information 400. Next, the execution management unit 204 is requested to execute the query.

クエリが実行されると、クライアント処理部202は、データ処理部206から処理結果を受領し、受領した処理結果をAPプログラム70に送る。そして、クライアント処理部202は、実行管理部204にクエリの終了を通知し、当該クエリにクエリプランを処理管理情報400から削除する。   When the query is executed, the client processing unit 202 receives the processing result from the data processing unit 206 and sends the received processing result to the AP program 70. Then, the client processing unit 202 notifies the execution management unit 204 of the end of the query, and deletes the query plan for the query from the processing management information 400.

実行管理部は204は、クライアント処理部202からクエリの実行要求を受ける。実行管理部204は、クエリの実行要求を受けると、先読み処理情報500に必要な情報を設定する。次に、実行管理部204は、データ処理部206にクエリプランに従った処理の実行を要求する。更に、実行管理部204は、先読み管理部208に先読み処理の実行を要求する。そして、実行管理部204は、クライアント処理部202からクエリの処理の完了の通知をクライアント処理部202から受けると、当該クエリに対応する先読み処理の情報を先読み処理情報500から削除する。   The execution management unit 204 receives a query execution request from the client processing unit 202. When the execution management unit 204 receives a query execution request, the execution management unit 204 sets necessary information in the prefetch processing information 500. Next, the execution management unit 204 requests the data processing unit 206 to execute processing according to the query plan. Furthermore, the execution management unit 204 requests the prefetch management unit 208 to execute prefetch processing. When the execution management unit 204 receives a notification of the completion of the query processing from the client processing unit 202 from the client processing unit 202, the execution management unit 204 deletes the prefetch processing information corresponding to the query from the prefetch processing information 500.

また、実行管理部204は、処理の実行状態及び/又はDBサーバ42のCPU利用率等を監視する。そして、実行管理部204は、監視している処理の実行状態及び/又はDBサーバ42のCPU利用率に応じて、実行パラメータを先読み処理情報500に設定することによって、先読み部208の先読み処理を制御する。   Further, the execution management unit 204 monitors the execution state of the process and / or the CPU usage rate of the DB server 42. Then, the execution management unit 204 sets the execution parameter in the prefetch process information 500 according to the execution state of the process being monitored and / or the CPU usage rate of the DB server 42, thereby performing the prefetch process of the prefetch unit 208. Control.

データ処理部206は、処理の要求を実行管理部204から受けると、処理管理情報400に含まれるクエリプランに従って処理を実行する。そして、データ処理部206は、処理を終了すると、処理結果をクライアント処理部202に送る。   When the data processing unit 206 receives a processing request from the execution management unit 204, the data processing unit 206 executes the processing according to the query plan included in the processing management information 400. When the data processing unit 206 finishes the processing, the data processing unit 206 sends the processing result to the client processing unit 202.

データ処理部206は、データ取得要求を共有DBデータ管理部210に送信することによって、処理を実行する際に必要なデータを取得する。このとき、データ処理部206は、要求したデータに対して設定すべきロックに関する情報も、共有DBデータ管理部210に送信する。   The data processing unit 206 acquires data necessary for executing processing by transmitting a data acquisition request to the shared DB data management unit 210. At this time, the data processing unit 206 also transmits to the shared DB data management unit 210 information on the lock to be set for the requested data.

また、データ処理部206は、取得したデータの利用が完了すると、データ利用完了報告を共有DBデータ管理部210に送信する。つまり、データ処理部206は、共有バッファ64から当該データを破棄できることを共有DBデータ管理部210に報告する。   In addition, when the use of the acquired data is completed, the data processing unit 206 transmits a data use completion report to the shared DB data management unit 210. That is, the data processing unit 206 reports to the shared DB data management unit 210 that the data can be discarded from the shared buffer 64.

また、データ処理部206は、処理を完了すると、ロックの解除を共有DBデータ管理部210に指示する。更に、データ処理部206は、先読み処理情報500を適宜参照し、先読みする必要があるか否かを判定する。そして、先読みが必要であれば、先読み部208に先読み要求を送信する。   In addition, when the processing is completed, the data processing unit 206 instructs the shared DB data management unit 210 to release the lock. Further, the data processing unit 206 refers to the prefetch processing information 500 as appropriate, and determines whether or not prefetching is necessary. If prefetching is necessary, a prefetch request is transmitted to the prefetch unit 208.

先読み部208は、実行管理部204又はデータ処理部206から先読み要求を受けると、先読み処理を実行する。なお、先読み部208は、高いI/O並列性を引き出すために、マルチスレッド型の実行モデルを用いて先読み処理を実行する。また、先読み部208は、先読み処理情報500に基づいて、先読み処理を実行する。   When receiving a prefetch request from the execution management unit 204 or the data processing unit 206, the prefetch unit 208 executes prefetch processing. Note that the prefetching unit 208 executes prefetching processing using a multithreaded execution model in order to extract high I / O parallelism. Further, the prefetch unit 208 executes prefetch processing based on the prefetch processing information 500.

先読み部208は、データ処理部206が実行する処理(クエリに対応する処理)から高い独立性を持って、先読み処理を実行する。なぜなら、先読み処理は、データを更新しないからである。また、先読みの効果は、I/O並列性を高めることによって、高めることができる。   The prefetch unit 208 executes the prefetch process with high independence from the process executed by the data processing unit 206 (process corresponding to the query). This is because the prefetch process does not update data. In addition, the effect of prefetching can be enhanced by increasing the I / O parallelism.

先読み部208は、共有DBデータ管理部210にデータ参照要求を送信することによって、必要なデータを取得する。なお、先読み部が送信するデータ参照要求は、データ処理部206が送信するデータ取得要求と異なる。   The prefetch unit 208 acquires necessary data by transmitting a data reference request to the shared DB data management unit 210. The data reference request transmitted by the prefetch unit is different from the data acquisition request transmitted by the data processing unit 206.

先読み部208は、取得したデータの利用を完了すると、データ参照完了報告を共有DBデータ管理部210に送信する。   When the use of the acquired data is completed, the prefetching unit 208 transmits a data reference completion report to the shared DB data management unit 210.

共用DBデータ管理部210は、データ処理部206からデータ取得要求を受けると、共有バッファ64内のデータへロックを設定する。そして、要求データが記憶されている領域の先頭アドレスをデータ処理部206に通知する。なお、要求データが共有バッファ64に記憶されていない場合、共用DBデータ管理部210は、共有バッファ64に当該データを読み出す。   Upon receiving a data acquisition request from the data processing unit 206, the shared DB data management unit 210 sets a lock on the data in the shared buffer 64. Then, the data processor 206 is notified of the start address of the area where the request data is stored. When the request data is not stored in the shared buffer 64, the shared DB data management unit 210 reads the data into the shared buffer 64.

また、共用DBデータ管理部210は、データ利用完了報告をデータ処理部206から受ける。このとき、共用DBデータ管理部210は、データが更新されたか否かに関する情報を取得する。   Further, the shared DB data management unit 210 receives a data use completion report from the data processing unit 206. At this time, the shared DB data management unit 210 acquires information regarding whether or not the data has been updated.

また、共用DBデータ管理部210は、ロックの解除指示をデータ処理部206から受けると、設定していたロックを解放する。そして、ロックの解放待ちをしていた処理に対して、ロックを与える。   When the shared DB data management unit 210 receives a lock release instruction from the data processing unit 206, the shared DB data management unit 210 releases the set lock. Then, a lock is given to the process waiting for the lock release.

共用DBデータ管理部210は、データ参照要求を先読み部208から受けると、要求データが記憶される領域の先頭アドレスを先読み部208に通知する。この場合、共用DBデータ管理部210は、データのロックを確認しない。   When the shared DB data management unit 210 receives a data reference request from the prefetch unit 208, the shared DB data management unit 210 notifies the prefetch unit 208 of the start address of the area where the request data is stored. In this case, the shared DB data management unit 210 does not confirm data lock.

また、共用DBデータ管理部210は、データ参照完了報告を先読み部206から受けつける。また、共用DBデータ管理部210は、共有DBデータ管理情報450を適宜更新する。   In addition, the shared DB data management unit 210 receives a data reference completion report from the prefetch unit 206. Also, the shared DB data management unit 210 updates the shared DB data management information 450 as appropriate.

以下、本実施の形態におけるDBMS60のデータ記憶管理方法を説明する。   Hereinafter, a data storage management method of the DBMS 60 in the present embodiment will be described.

DBMS60は、オブジェクトを「ページ」と呼ぶ単位に分割して記憶領域を管理する。なお、オブジェクトは、表又は索引である。本実施の形態では、ページの大きさは、ページを記憶するファイル毎に一定であるとする。   The DBMS 60 manages the storage area by dividing an object into units called “pages”. The object is a table or an index. In the present embodiment, it is assumed that the page size is constant for each file storing the page.

ファイルは、ページの大きさで分割される。そして、それぞれのページには、ページIDが付加される。なお、ページIDは、ページの一意な識別子であり、そのページが記憶されるファイルの識別子及び当該ファイル中での通番から構成する。つまり、データが記憶されているファイル及びデータの記憶位置は、ページIDによって一意に特定できる。   Files are divided by page size. A page ID is added to each page. The page ID is a unique identifier of a page, and is composed of an identifier of a file in which the page is stored and a serial number in the file. In other words, the file storing the data and the storage location of the data can be uniquely specified by the page ID.

B−Tree形式索引でリーフページ内の表データへのポインタは、同様に、ページID及びページ内のデータ通番で構成されるとする。   Similarly, the pointer to the table data in the leaf page in the B-Tree format index is composed of the page ID and the data sequence number in the page.

データ処理部206及び先読み部208は、共有バッファ64に記憶されているデータを利用する。共用DBデータ管理部210は、共有バッファ64の領域を「ブロック」と呼ぶ固定長の領域に細分化し、ブロックを単位として管理する。各ブロックには、ブロックの一意な識別子であるブロックIDが付加される。なお、ブロックIDは、例えば、ブロックの大きさを単位とし、共有バッファ64の領域の先頭からのオフセットとする。これによって、メモリ14上のアドレスが、ブロックIDによって特定できる。   The data processing unit 206 and the prefetch unit 208 use data stored in the shared buffer 64. The shared DB data management unit 210 subdivides the area of the shared buffer 64 into fixed-length areas called “blocks” and manages them in units of blocks. Each block is added with a block ID which is a unique identifier of the block. The block ID is, for example, an offset from the beginning of the area of the shared buffer 64 with the block size as a unit. Thereby, the address on the memory 14 can be specified by the block ID.

ブロックは、複数のグループに分割される。そして、オブジェクトごとに利用するグループを定める。ブロックのグループには、グループIDが付加される。グループIDは、グループの一意な識別子である。   The block is divided into a plurality of groups. And the group used for every object is defined. A group ID is added to the group of blocks. The group ID is a unique identifier of the group.

各グループでは、以下で説明するように、LRU置換アルゴリズムに基づいて、ブロックを管理する。   Each group manages blocks based on the LRU replacement algorithm as described below.

図3は、本発明の第1の実施の形態のグループにおけるブロック管理に利用するLRU管理リストの説明図である。   FIG. 3 is an explanatory diagram of an LRU management list used for block management in the group according to the first embodiment of this invention.

本実施の形態のLRU管理リストは、上位LRU管理リスト642と、下位LRU管理リスト644とで分割されている。   The LRU management list of this embodiment is divided into an upper LRU management list 642 and a lower LRU management list 644.

上位LRU管理リスト642は、一般的なLRU置換アルゴリズムで利用されるLRU管理リストである。また、上位LRU管理リスト642は、MRU(Most Recently Used)端側の領域を用いる。   The upper LRU management list 642 is an LRU management list used in a general LRU replacement algorithm. The upper LRU management list 642 uses an area on the MRU (Most Recently Used) end side.

下位LRU管理リスト644は、LRU(Least Recently Used)端側の領域を用いる。   The lower LRU management list 644 uses an LRU (Least Recently Used) end area.

データ処理部206からのデータ取得要求又は先読み部208からのデータ参照要求によって要求されたページを記憶するブロックが共有バッファ64に存在する場合には、共用DBデータ管理部210は、当該ブロックを利用する。一方、要求ページを記憶するブロックが共有バッファ64に存在しない場合には、共用DBデータ管理部210は、下位LRU管理リスト644のLRU端に接続されたエントリによって管理されるブロックに、要求ページを新たに記憶する。   When a block for storing a page requested by a data acquisition request from the data processing unit 206 or a data reference request from the prefetch unit 208 exists in the shared buffer 64, the shared DB data management unit 210 uses the block. To do. On the other hand, when the block storing the requested page does not exist in the shared buffer 64, the shared DB data management unit 210 adds the requested page to the block managed by the entry connected to the LRU end of the lower LRU management list 644. Newly memorize.

また、共用DBデータ管理部210は、データ処理部206からデータ取得要求を受けると、要求ページを記憶するブロックの管理情報を上位LRU管理リスト642のMRU端に繋ぎ直す。   When the shared DB data management unit 210 receives a data acquisition request from the data processing unit 206, the shared DB data management unit 210 reconnects the management information of the block storing the requested page to the MRU end of the upper LRU management list 642.

一方、共用DBデータ管理部210は、先読み部208からデータ参照要求を受けると、以下の処理を行う。まず、共用DBデータ管理部210は、要求ページを記憶するブロックの管理情報が上位LRU管理リスト642又は下位LRU管理リスト644のいずれに存在するかを判定する。なお、共用DBデータ管理部210は、要求ページを記憶するブロックの管理情報が上位LRU管理リスト642及び下位LRU管理リスト644のいずれにも存在しない場合、下位LRU管理リスト644に存在したと判定する。   On the other hand, when the shared DB data management unit 210 receives a data reference request from the prefetch unit 208, the shared DB data management unit 210 performs the following processing. First, the shared DB data management unit 210 determines whether the management information of the block storing the request page exists in the upper LRU management list 642 or the lower LRU management list 644. Note that the shared DB data management unit 210 determines that the management information of the block storing the requested page exists in the lower LRU management list 644 when the management information of the block storing the request page does not exist in either the upper LRU management list 642 or the lower LRU management list 644. .

管理情報が上位LRU管理リスト642に存在する場合、共用DBデータ管理部210は、LRU管理リストを変更しない。一方、管理情報が下位LRU管理リスト644に存在する場合、共用DBデータ管理部210は、要求ページを記憶するブロックの管理情報を下位LRU管理リスト644のMRU端に繋ぎ直す。   When the management information exists in the upper LRU management list 642, the shared DB data management unit 210 does not change the LRU management list. On the other hand, when the management information exists in the lower LRU management list 644, the shared DB data management unit 210 reconnects the management information of the block storing the request page to the MRU end of the lower LRU management list 644.

これによって、共用DBデータ管理部210は、先読み部208が参照するデータを共有バッファ64に過度に記憶することを防ぐ。   As a result, the shared DB data management unit 210 prevents the data referenced by the prefetch unit 208 from being excessively stored in the shared buffer 64.

次に、クエリプラン及び先読み処理の概略を説明する。   Next, an outline of the query plan and the prefetch process will be described.

図4は、本発明の第1の実施の形態のDBMS60におけるクエリプランの説明図である。   FIG. 4 is an explanatory diagram of a query plan in the DBMS 60 according to the first embodiment of this invention.

クライアント処理部202は、APプログラム70からクエリ622を受信する。すると、受信したクエリ622から、木構造のクエリプラン624を作成する。   The client processing unit 202 receives the query 622 from the AP program 70. Then, a query plan 624 having a tree structure is created from the received query 622.

クエリプラン624は、ノード626A〜626I及び枝から構成される。ノード626A〜626Iは、クエリプラン624における処理ステップを示す。枝は、処理ステップ及びデータの依存関係を示す。   The query plan 624 includes nodes 626A to 626I and branches. Nodes 626A-626I indicate processing steps in the query plan 624. The branches indicate processing step and data dependency relationships.

それぞれのノード626A〜626Iでは、索引参照、索引による表データアクセス、表データスキャン、フィルタ処理、結合演算、ソート、集計演算又は集合演算等が実行される。なお、フィルタ処理は、取得した表データを、条件で絞り込む処理である。   In each of the nodes 626A to 626I, index reference, table data access by index, table data scan, filter processing, join operation, sort, aggregation operation, set operation, and the like are executed. The filtering process is a process for narrowing the acquired table data by a condition.

データ処理部206は、事前に与えられたルールに従ってクエリプランを解釈し、ノード626A〜626Iに対応する処理ステップを実行する。本実施の形態では、データ処理部206は、それぞれの処理ステップをデータ単位ごとに実行する。なお、データ単位は、実行する処理ステップの内容によって決まる。また、データ処理部206は、必要であれば複数の処理ステップを交互に実施してもよい。   The data processing unit 206 interprets the query plan according to a rule given in advance, and executes processing steps corresponding to the nodes 626A to 626I. In the present embodiment, the data processing unit 206 executes each processing step for each data unit. The data unit is determined by the content of the processing step to be executed. Further, the data processing unit 206 may alternately perform a plurality of processing steps if necessary.

本実施の形態では、B−Tree索引参照処理(ノード622A及びノード626D)及びその処理に続く索引による表データアクセス処理(ノード626B及び626E)を先読みの対象とする。   In the present embodiment, the B-Tree index reference process (node 622A and node 626D) and the table data access process (nodes 626B and 626E) using the index subsequent to that process are prefetched.

このとき、先読み部208は、クエリプランに含まれる検索条件、データ処理部206からの先読み要求で指示されたデータ値及び/又は過去の先読み処理によって把握したデータ値等から、索引の検索キー値を把握する。そして、索引の検索キー値を把握できた場合、把握した検索キー値に対応する索引データや表データを先読みする。   At this time, the prefetching unit 208 uses the search key value of the index based on the search condition included in the query plan, the data value specified by the prefetching request from the data processing unit 206 and / or the data value grasped by the past prefetching process. To figure out. If the search key value of the index can be grasped, the index data and the table data corresponding to the grasped search key value are prefetched.

図5Aは、本発明の第1の実施の形態のスキーマ300に含まれる表定義情報310の構成図である。   FIG. 5A is a configuration diagram of the table definition information 310 included in the schema 300 according to the first embodiment of this invention.

表定義情報310は、オブジェクトID312及び表定義314を含む。   The table definition information 310 includes an object ID 312 and a table definition 314.

オブジェクトID312は、DBMS60が管理するDBで定義されている表の一意な識別子である。表定義314は、当該表の定義情報である。   The object ID 312 is a unique identifier of a table defined in the DB managed by the DBMS 60. The table definition 314 is definition information of the table.

図5Bは、本発明の第1の実施の形態のスキーマ300に含まれる索引定義情報320の構成図である。   FIG. 5B is a configuration diagram of the index definition information 320 included in the schema 300 according to the first embodiment of this invention.

オブジェクト管理情報330は、オブジェクトID322及び索引定義324を含む。   The object management information 330 includes an object ID 322 and an index definition 324.

オブジェクトID322は、DBMS60が管理するDBで定義されている索引の一意な識別子である。索引定義324は、当該索引の定義情報である。   The object ID 322 is a unique identifier of an index defined in the DB managed by the DBMS 60. The index definition 324 is definition information of the index.

図5Cは、本発明の第1の実施の形態のスキーマ300に含まれるオブジェクト管理情報330の構成図である。   FIG. 5C is a configuration diagram of the object management information 330 included in the schema 300 according to the first embodiment of this invention.

オブジェクト管理情報330は、オブジェクトID332、グループID334、対応ページID338及び索引ルートページID342を含む。   The object management information 330 includes an object ID 332, a group ID 334, a corresponding page ID 338, and an index root page ID 342.

オブジェクトID332は、オブジェクトの一意な識別子である。グループID334は、当該オブジェクトを記憶しているブロックが属するグループの一意な識別子である。対応ページID338は、当該オブジェクトを記憶しているページの一意な識別子である。   The object ID 332 is a unique identifier of the object. The group ID 334 is a unique identifier of the group to which the block storing the object belongs. The corresponding page ID 338 is a unique identifier of a page storing the object.

索引ルートページ342は、当該オブジェクトのルートデータを記憶しているページの一意な識別子である。なお、索引ルートページ342は、当該オブジェクトがB−Tree形式索引である場合にのみ値が格納される。   The index root page 342 is a unique identifier of a page that stores the root data of the object. The index route page 342 stores a value only when the object is a B-Tree format index.

図5Dは、本発明の第1の実施の形態のスキーマ300に含まれるファイル管理情報350の構成図である。   FIG. 5D is a configuration diagram of the file management information 350 included in the schema 300 according to the first embodiment of this invention.

ファイル管理情報350は、ファイルID352、ページサイズ354、ページ数356及びファイルパス358を含む。   The file management information 350 includes a file ID 352, a page size 354, a page number 356, and a file path 358.

ファイルID352は、DBMS60がファイルを一意に識別する識別子である。ページサイズ354は、当該ファイルに記憶されるページの大きさである。ページ数356は、当該ファイルに記憶されるページの数である。ファイルパス358は、OS52が当該ファイルを一意に識別する識別子である。   The file ID 352 is an identifier that uniquely identifies the file by the DBMS 60. The page size 354 is the size of a page stored in the file. The page number 356 is the number of pages stored in the file. The file path 358 is an identifier for uniquely identifying the file by the OS 52.

図6Aは、本発明の第1の実施の形態の処理管理情報400に含まれるクエリ管理情報410の構成図である。   FIG. 6A is a configuration diagram of the query management information 410 included in the processing management information 400 according to the first embodiment of this invention.

クエリ管理情報410は、クエリID412、トランザクションID414、処理優先度416、処理ステータス418、対象リソース422及びクエリプラン424を含む。   The query management information 410 includes a query ID 412, a transaction ID 414, a processing priority 416, a processing status 418, a target resource 422, and a query plan 424.

クエリID412は、クエリの一意な識別子である。本説明図では、クエリID412は、クライアントID及びAPプログラムがクエリに付加した通番で構成される。クライアントIDは、DBMS60がAPプログラム70を一意に識別する識別子である。   The query ID 412 is a unique identifier of the query. In this explanatory diagram, the query ID 412 is composed of a client ID and a serial number added to the query by the AP program. The client ID is an identifier that uniquely identifies the AP program 70 by the DBMS 60.

トランザクションID414は、当該クエリが属するトランザクションの識別子である。処理優先度416は、当該クエリを実行する際の処理の優先度を示す。   The transaction ID 414 is an identifier of a transaction to which the query belongs. The processing priority 416 indicates the priority of processing when executing the query.

処理ステータス418は、当該クエリの現在の実行状態を示す。   The processing status 418 indicates the current execution state of the query.

処理ステータス418に「ロック設定待ち」が格納されている場合、対象リソース422には、値が格納される。対象リソース422は、ロック設定待ちの対象となるリソースを示す。   When “waiting for lock setting” is stored in the processing status 418, a value is stored in the target resource 422. The target resource 422 indicates a resource that is a target of waiting for lock setting.

クエリプラン424は、当該クエリに対応するクエリプランを示す。   The query plan 424 indicates a query plan corresponding to the query.

図6Bは、本発明の第1の実施の形態の処理管理情報400に含まれるトランザクション管理情報430の構成図である。   FIG. 6B is a configuration diagram of the transaction management information 430 included in the processing management information 400 according to the first embodiment of this invention.

トランザクション管理情報430は、クライアントID432及びトランザクションID434を含む。   The transaction management information 430 includes a client ID 432 and a transaction ID 434.

クライアントID432は、APプログラム70の一意な識別子である。トランザクションID434は、当該APプログラム70からのクエリによるトランザクションの一意な識別子である。なお、トランザクションが進行中の場合のみ、トランザクションID434には値が格納される。よって、トランザクションが進行中でない場合には、トランザクションID434には値が格納されない。   The client ID 432 is a unique identifier of the AP program 70. The transaction ID 434 is a unique identifier of a transaction based on a query from the AP program 70. Note that a value is stored in the transaction ID 434 only when a transaction is in progress. Therefore, if no transaction is in progress, no value is stored in the transaction ID 434.

図7は、本発明の第1の実施の形態の処理管理情報400に含まれるクエリプラン600の構成図である。   FIG. 7 is a configuration diagram of the query plan 600 included in the processing management information 400 according to the first embodiment of this invention.

クエリプラン600は、処理開始ステップID602、処理終了ステップID604、ステップID606、親ステップID608、子ステップID612、処理種別614及び処理詳細616を含む。   The query plan 600 includes a process start step ID 602, a process end step ID 604, a step ID 606, a parent step ID 608, a child step ID 612, a process type 614, and process details 616.

処理開始ステップID602は、クエリプランにおいて最初に実行される処理ステップの一意な識別子である。処理終了ステップID604は、クエリプランにおいて最後に実行される処理ステップの一意な識別子である。   The process start step ID 602 is a unique identifier of the process step executed first in the query plan. The process end step ID 604 is a unique identifier of the process step executed last in the query plan.

ステップID606は、処理ステップの一意な識別子である。   Step ID 606 is a unique identifier of the processing step.

親ステップID608は、当該処理ステップの親ステップの識別子である。なお、親ステップは、処理ステップ(子ステップ)の処理結果を利用する処理ステップである。子ステップID612は、当該処理ステップの子ステップの識別子である。   The parent step ID 608 is an identifier of the parent step of the processing step. The parent step is a processing step that uses the processing result of the processing step (child step). The child step ID 612 is an identifier of the child step of the processing step.

処理種別614は、当該処理ステップで実行される処理の内容を示す。   The process type 614 indicates the content of the process executed in the process step.

処理詳細616は、当該処理ステップで実行される処理の詳細を示す。なお、処理種別614に「索引参照」が格納されている場合、処理詳細616には、参照する索引のオブジェクトID及び索引の参照条件が格納される。また、処理種別614に「索引による表データアクセス」が格納されている場合、処理詳細616には、アクセス先の表のオブジェクトIDが格納される。また、処理種別614に「ネストループ結合」が格納されている場合、処理詳細616には、結合条件が格納される。   The processing details 616 indicate details of processing executed in the processing step. When “index reference” is stored in the process type 614, the process details 616 stores the object ID of the index to be referenced and the index reference condition. When “table data access by index” is stored in the process type 614, the object ID of the access destination table is stored in the process details 616. When “nested loop join” is stored in the process type 614, the process details 616 stores a join condition.

図8Aは、本発明の第1の実施の形態の共有DBデータ管理情報450に含まれる共有バッファ定義情報451の構成図である。   FIG. 8A is a configuration diagram of the shared buffer definition information 451 included in the shared DB data management information 450 according to the first embodiment of this invention.

共有バッファ定義情報451は、バッファ領域情報452及びバッファブロックサイズ454を含む。   The shared buffer definition information 451 includes buffer area information 452 and a buffer block size 454.

バッファ領域情報452は、メモリ14上の共有バッファ64の記憶領域に関する情報である。バッファ領域情報452は、共有バッファ64の先頭アドレス及び共有バッファ64のサイズを含む。バッファブロックサイズ454は、共有バッファ64内のブロックのサイズである。   The buffer area information 452 is information regarding the storage area of the shared buffer 64 on the memory 14. The buffer area information 452 includes the start address of the shared buffer 64 and the size of the shared buffer 64. The buffer block size 454 is the size of the block in the shared buffer 64.

図8Bは、本発明の第1の実施の形態の共有DBデータ管理情報450に含まれるバッファブロック管理情報460の構成図である。   FIG. 8B is a configuration diagram of the buffer block management information 460 included in the shared DB data management information 450 according to the first embodiment of this invention.

バッファブロック管理情報460は、ブロックID462、ページID463、状態464、リンク情報466、利用数468及び先読み対応クエリID469を含む。   The buffer block management information 460 includes a block ID 462, a page ID 463, a state 464, link information 466, a usage count 468, and a prefetching correspondence query ID 469.

ブロックID462は、ブロックの一意な識別子である。ページID463は、当該ブロックに現在記憶されているページの一意な識別子である。   The block ID 462 is a unique identifier of the block. The page ID 463 is a unique identifier of the page currently stored in the block.

状態464は、当該ブロックに記憶されているデータの状態である。例えば、当該ブロックに記憶されているデータと記憶装置46に記憶されているデータとが一致している場合、状態464には「Clean」が格納される。また、当該ブロックに記憶されているデータと記憶装置46に記憶されているデータとが一致していない場合、状態464には「Dirty」が格納される。また、当該ブロックに記憶装置46からデータを読み出し中である場合、状態464には「Reading」が格納される。また、当該ブロックに有効データが記憶されていない場合、状態464には「Invalid」が格納される。   A state 464 is a state of data stored in the block. For example, when the data stored in the block matches the data stored in the storage device 46, “Clean” is stored in the state 464. If the data stored in the block does not match the data stored in the storage device 46, “Dirty” is stored in the state 464. When data is being read from the storage device 46 to the block, “Reading” is stored in the state 464. If no valid data is stored in the block, “Invalid” is stored in the state 464.

リンク情報466は、管理リスト及びポインタを含む。管理リストは、当該ブロックが属する管理リストの一意な識別子である。ポインタは、当該ブロックの管理リスト中での位置を示す。例えば、ポインタは、管理リストにおいて当該ブロックの直前及び直後に位置するブロックの一意な識別子である。   The link information 466 includes a management list and a pointer. The management list is a unique identifier of the management list to which the block belongs. The pointer indicates the position of the block in the management list. For example, the pointer is a unique identifier of a block located immediately before and after the block in the management list.

利用数468は、当該ブロックに記憶されているページを利用している処理の数である。   The usage number 468 is the number of processes using the page stored in the block.

先読み対応クエリID469は、当該ブロックに記憶されているデータに関する先読み処理に対応するクエリの一意な識別子である。なお、先読み対応クエリID469には、当該ブロックに記憶されているデータが先読み処理によって読み出された場合にのみ値が格納される。   The prefetch correspondence query ID 469 is a unique identifier of a query corresponding to the prefetch processing regarding the data stored in the block. Note that the pre-read query ID 469 stores a value only when the data stored in the block is read by the pre-read process.

図8Cは、本発明の第1の実施の形態の共有DBデータ管理情報450に含まれるバッファグループ管理情報470の構成図である。   FIG. 8C is a configuration diagram of the buffer group management information 470 included in the shared DB data management information 450 according to the first embodiment of this invention.

バッファグループ管理情報470は、グループID472、上位LRU管理リスト情報474及び下位LRU管理リスト情報476を含む。   The buffer group management information 470 includes a group ID 472, upper LRU management list information 474, and lower LRU management list information 476.

グループID472は、ブロックが属するグループの一意な識別子である。   The group ID 472 is a unique identifier of the group to which the block belongs.

上位LRU管理リスト情報474は、当該グループに対応する上位LRU管理リスト642を管理する情報である。上位LRU管理リスト情報474は、ブロック数、先頭ブロックID及び終端ブロックIDを含む。ブロック数は、当該グループに対応する上位LRU管理リスト642に属するブロックの数である。先頭ブロックIDは、当該グループに属するブロックの中で、上位LRU管理管理リスト642の先頭に位置するブロックの一意な識別子である。終端ブロックIDは、当該グループに属するブロックの中で、上位LRU管理管理リスト642の終端に位置するブロックの一意な識別子である。   The upper LRU management list information 474 is information for managing the upper LRU management list 642 corresponding to the group. The upper LRU management list information 474 includes the number of blocks, a head block ID, and a terminal block ID. The number of blocks is the number of blocks belonging to the upper LRU management list 642 corresponding to the group. The head block ID is a unique identifier of a block located at the head of the upper LRU management management list 642 among the blocks belonging to the group. The terminal block ID is a unique identifier of a block located at the terminal of the upper LRU management management list 642 among the blocks belonging to the group.

下位LRU管理リスト情報476は、当該グループに対応する下位LRU管理リスト644を管理する情報である。下位LRU管理リスト情報476は、ブロック数、先頭ブロックID及び終端ブロックIDを含む。ブロック数は、当該グループに対応する下位LRU管理リスト644に属するブロックの数である。先頭ブロックIDは、当該グループに属するブロックの中で、下位LRU管理管理リスト644の先頭に位置するブロックの一意な識別子である。終端ブロックIDは、当該グループに属するブロックの中で、下位LRU管理管理リスト644の終端に位置するブロックの一意な識別子である。   The lower LRU management list information 476 is information for managing the lower LRU management list 644 corresponding to the group. The lower LRU management list information 476 includes the number of blocks, a head block ID, and a terminal block ID. The number of blocks is the number of blocks belonging to the lower LRU management list 644 corresponding to the group. The head block ID is a unique identifier of a block located at the head of the lower LRU management management list 644 among the blocks belonging to the group. The terminal block ID is a unique identifier of a block located at the terminal of the lower LRU management management list 644 among the blocks belonging to the group.

図8Dは、本発明の第1の実施の形態の共有DBデータ管理情報450に含まれるロック管理情報480の構成図である。   FIG. 8D is a configuration diagram of the lock management information 480 included in the shared DB data management information 450 according to the first embodiment of this invention.

ロック管理情報480は、ページID482、ロック種別484、ロック取得トランザクションID486及びロック待ちリスト488を含む。   The lock management information 480 includes a page ID 482, a lock type 484, a lock acquisition transaction ID 486, and a lock wait list 488.

ページID482は、ロックの対象となるページの一意な識別子である。ロック種別484は、当該ページに設定するロックの種別である。具体的には、ロック種別484には、共有ロックを示す「共有」又は排他ロックを示す「排他」等が格納される。   The page ID 482 is a unique identifier of a page to be locked. The lock type 484 is a type of lock set for the page. Specifically, the lock type 484 stores “shared” indicating a shared lock, “exclusive” indicating an exclusive lock, and the like.

ロック取得トランザクションID486は、当該ページに対してロックを取得しているトランザクションの一意な識別子である。   The lock acquisition transaction ID 486 is a unique identifier of a transaction that acquires a lock for the page.

ロック待ちリスト488には、クエリID及びロック種別が格納される。当該クエリIDは、ロックの解放を待つクエリの一意な識別子である。ロック種別は、当該クエリが設定するロックの種別である。なお、当該クエリがロックを設定しない場合、ロック種別には「ロックなし」が格納される。また、複数のクエリがロックの解放を待っている場合、ロック待ちリスト488には、ロックの解放を待つクエリの数と同数のクエリID及びロック種別が格納される。   The lock waiting list 488 stores a query ID and a lock type. The query ID is a unique identifier of a query waiting for lock release. The lock type is a lock type set by the query. When the query does not set a lock, “no lock” is stored as the lock type. When a plurality of queries are waiting for lock release, the lock wait list 488 stores the same number of query IDs and lock types as the number of queries waiting for lock release.

なお、本実施の形態では、ロックをページ単位で管理しているが、他の粒度で管理してもよい。   In this embodiment, locks are managed in units of pages, but may be managed in other granularities.

図8Eは、本発明の第1の実施の形態の共有DBデータ管理情報450に含まれるI/O待ち管理情報490の構成図である。   FIG. 8E is a configuration diagram of I / O wait management information 490 included in the shared DB data management information 450 according to the first embodiment of this invention.

I/O待ち管理情報490は、ブロックID492及びI/O待ちリスト494を含む。   The I / O wait management information 490 includes a block ID 492 and an I / O wait list 494.

ブロックID492は、I/O中のブロックの一意な識別子である。   The block ID 492 is a unique identifier of the block in the I / O.

I/O待ちリスト494は、当該ブロックのI/Oの完了を待っている処理の識別子である。具体的には、I/O待ちリスト494には、クエリID又は先読み処理の識別子が格納される。なお、当該ブロックのI/Oの完了を待っている処理が複数ある場合、I/O待ちリスト494には、当該完了待ちの処理の数と同数の識別子が格納される。   The I / O waiting list 494 is an identifier of a process waiting for completion of I / O of the block. Specifically, the I / O waiting list 494 stores a query ID or an identifier for prefetch processing. When there are a plurality of processes waiting for I / O completion of the block, the same number of identifiers as the number of processes waiting for completion are stored in the I / O wait list 494.

図9Aは、本発明の第1の実施の形態の先読み処理情報500に含まれる総先読み数管理情報501の構成図である。   FIG. 9A is a configuration diagram of the total prefetch number management information 501 included in the prefetch processing information 500 according to the first embodiment of this invention.

総先読み数管理情報501は、総先読みスレッド数502及び総先読みブロック数504を含む。   The total prefetch number management information 501 includes a total prefetch thread number 502 and a total prefetch block number 504.

総先読みスレッド数502は、先読み処理で利用するスレッドの総数を管理する情報である。総先読みスレッド数502は、最大値及び割当値を含む。最大値は、先読み処理で利用可能なスレッドの総数の上限である。割当数は、先読み処理に現時点で割り当てられているスレッドの総数である。   The total prefetch thread number 502 is information for managing the total number of threads used in the prefetch process. The total prefetch thread number 502 includes a maximum value and an assigned value. The maximum value is the upper limit of the total number of threads that can be used in the prefetch process. The number of allocations is the total number of threads currently allocated to the prefetch process.

総先読みブロック数504は、先読み処理によって読み出されたページを保持するブロックの数を管理する情報である。総読みブロック数504は、最大値及び割当値を含む。最大値は、先読み処理によって読み出されたページを保持するブロックの数の上限である。割当値は、先読み処理に現時点で割り当てられているブロックの総数である。   The total prefetch block number 504 is information for managing the number of blocks that hold the page read by the prefetch process. The total number of read blocks 504 includes a maximum value and an assigned value. The maximum value is the upper limit of the number of blocks that hold a page read by the prefetch process. The assigned value is the total number of blocks currently assigned to the prefetch process.

図9Bは、本発明の第1の実施の形態の先読み処理情報500に含まれる先読み管理情報510の構成図である。   FIG. 9B is a configuration diagram of prefetch management information 510 included in the prefetch processing information 500 according to the first embodiment of this invention.

先読み管理情報510は、クエリID512、先読みスレッド数514、先読みブロック数516、実行確認値518、I/O発行間隔管理情報522、データ処理先読み要求作成設定526及びページ数統計528を含む。   The prefetch management information 510 includes a query ID 512, a prefetch thread number 514, a prefetch block number 516, an execution confirmation value 518, I / O issue interval management information 522, a data processing prefetch request creation setting 526, and a page number statistic 528.

クエリID512は、先読み処理の対象となるクエリの一意な識別子である。   The query ID 512 is a unique identifier of a query that is a target of the prefetch process.

先読みスレッド数514は、最大スレッド数及び現利用スレッド数を含む。最大スレッド数は、当該クエリに対応する先読み処理に対して割り当てられたスレッドの総数である。現利用スレッド数は、当該クエリに対応する先読み処理で現在利用されているスレッドの総数である。   The prefetch thread number 514 includes the maximum thread number and the current use thread number. The maximum number of threads is the total number of threads assigned to the prefetch process corresponding to the query. The number of currently used threads is the total number of threads currently used in the prefetch process corresponding to the query.

先読みブロック数516は、最大ブロック数及び先読み済ブロック数を含む。最大ブロック数は、当該クエリに対応する先読み処理に対して割当てられたブロックの総数である。先読み済ブロック数は、当該クエリに対応する先読み処理で実際に先読みされたページを保持するブロックの総数である。   The number of prefetch blocks 516 includes the maximum number of blocks and the number of prefetched blocks. The maximum number of blocks is the total number of blocks allocated to the prefetch process corresponding to the query. The number of prefetched blocks is the total number of blocks that hold pages actually prefetched in the prefetch processing corresponding to the query.

実行確認値518は、当該クエリに対応する先読み処理の実行制御に利用する値である。なお、実行確認値518については後述する。   The execution confirmation value 518 is a value used for execution control of the prefetch process corresponding to the query. The execution confirmation value 518 will be described later.

I/O発行間隔管理情報522は、優先度が低い処理における先読み処理向けのI/O発行間隔を一定値以上にする制御で利用する管理情報である。I/O発行間隔管理情報522は、設定下限値及びタイムスタンを含む。設定下限値は、設定されるI/O発行間隔の下限値である。タイムスタンプは、当該クエリに対応する先読み処理によって最新のI/Oが発行された時刻である。   The I / O issuance interval management information 522 is management information used in control for setting the I / O issuance interval for prefetch processing in processing with low priority to a certain value or more. The I / O issue interval management information 522 includes a set lower limit value and a time stamp. The set lower limit value is a lower limit value of the set I / O issue interval. The time stamp is the time when the latest I / O is issued by the prefetch process corresponding to the query.

データ処理先読み要求設定526は、データ処理部206が当該クエリを処理している最中に作成する先読み要求に関する情報である。データ処理先読み要求設定526は、作成要否情報、ステップID及び参照条件を含む。   The data processing prefetch request setting 526 is information relating to a prefetch request created while the data processing unit 206 is processing the query. The data processing prefetch request setting 526 includes creation necessity information, a step ID, and a reference condition.

作成要否情報は、データ処理部206が先読み要求を作成するか否かを示す。具体的には、データ処理部206が先読み要求を作成する場合、作成要否情報には「Yes」が格納される。また、データ処理部206が先読み要求を作成しない場合、作成要否情報には「No」が格納される。また、データ処理部206が先読み要求の作成を現在中断している場合、作成要否情報には「Stop」が格納される。   The creation necessity information indicates whether the data processing unit 206 creates a prefetch request. Specifically, when the data processing unit 206 creates a prefetch request, “Yes” is stored in the creation necessity information. When the data processing unit 206 does not create a prefetch request, “No” is stored in the creation necessity information. In addition, when the data processing unit 206 is currently interrupting creation of the prefetch request, “Stop” is stored in the creation necessity information.

ステップIDは、データ処理部206が先読み要求を作成する処理ステップの一意な識別子である。なお、作成要否情報が「Yes」又は「Stop」の場合のみ、ステップID及び参照条件に値が格納される。   The step ID is a unique identifier of a processing step in which the data processing unit 206 creates a prefetch request. Only when the creation necessity information is “Yes” or “Stop”, values are stored in the step ID and the reference condition.

ページ数統計528は、当該クエリに対応する先読みの効果を判断するための統計値である。ページ数統計528は、処理利用数及び先読みヒット数を含む。処理利用数は、当該クエリに対応して出されたデータ取得要求の総数である。ヒット数は、当該クエリに対応して出されたデータ取得要求で要求されたデータが、先読みされたデータにヒットした回数である。   The page number statistic 528 is a statistic value for determining the effect of prefetching corresponding to the query. The page number statistic 528 includes the number of processing uses and the number of prefetch hits. The number of processing uses is the total number of data acquisition requests issued in response to the query. The number of hits is the number of times the data requested by the data acquisition request issued corresponding to the query hits the prefetched data.

図9Cは、本発明の第1の実施の形態の先読み処理情報500に含まれる先読み要求管理情報540の構成図である。   FIG. 9C is a configuration diagram of the prefetch request management information 540 included in the prefetch processing information 500 according to the first embodiment of this invention.

先読み要求管理情報540は、クエリID541、ステップID543、実行確認値545、ページID549、ページ内オフセット542、参照条件544、リスト用ポインタ548及び待ちリスト管理情報552を含む。   The prefetch request management information 540 includes a query ID 541, a step ID 543, an execution confirmation value 545, a page ID 549, an in-page offset 542, a reference condition 544, a list pointer 548, and waiting list management information 552.

先読み要求管理情報540は、先読みI/Oを発行する処理を実行するスレッドに対応するクエリの一意な識別子である。ステップID543は、当該クエリに対応する処理ステップの一意な識別子である。   The prefetch request management information 540 is a unique identifier of a query corresponding to a thread that executes processing for issuing prefetch I / O. The step ID 543 is a unique identifier of the processing step corresponding to the query.

実行確認値545は、当該クエリに対応する先読み処理の実行制御に利用する値である。   The execution confirmation value 545 is a value used for execution control of the prefetch process corresponding to the query.

ページID549は、ページの一意な識別子である。当該ページに表のデータが記憶されている場合、ページ内データID549には値が格納される。ページ内データID549は、当該ページ内における先読み対象となるデータの一意な識別子である。   The page ID 549 is a page unique identifier. When table data is stored in the page, a value is stored in the in-page data ID 549. The in-page data ID 549 is a unique identifier of data to be prefetched in the page.

参照条件544には、当該先読み処理及びその結果取得した表データから更に実行される先読み処理における索引の既知の検索条件が格納される。   The reference condition 544 stores a known index search condition in the prefetch process further executed from the prefetch process and the table data acquired as a result.

リスト用ポインタ548には、当該エントリの直前及び直後に位置するエントリへのポインタが格納される。   The list pointer 548 stores a pointer to an entry located immediately before and after the entry.

待ちリスト管理情報552には、処理実行待ち状態にある先頭エントリ及び終端エントリへのポインタが格納される。   The waiting list management information 552 stores pointers to the first entry and the last entry that are in a process execution waiting state.

なお、先読み要求管理情報540に新規エントリを追加する場合、当該エントリは、待ちリストの終端に接続される。   When a new entry is added to the prefetch request management information 540, the entry is connected to the end of the waiting list.

以下、本実施の形態の処理について説明する。   Hereinafter, the processing of the present embodiment will be described.

図10は、本発明の第1の実施の形態のDBMS60のクエリ処理のフローチャートである。   FIG. 10 is a flow chart for query processing of the DBMS 60 according to the first embodiment of this invention.

DBMS60は、APプログラム70からクエリを受信すると、クエリ処理を開始する(1101)。   When the DBMS 60 receives a query from the AP program 70, the DBMS 60 starts query processing (1101).

クライアント処理部202は、クエリの受信時に、当該クエリの送信元のAPプログラム70のクライアントIDを把握する。また、クライアント処理部202は、クエリの受信と同時に、当該クエリの処理優先度をAPプログラム70から取得する。なお、処理優先度が取得できない場合、クライアント処理部202は、予め設定された処理優先度として扱う。なお、処理優先度は、クエリ中にヒントとして与えられてもよい。   When receiving the query, the client processing unit 202 grasps the client ID of the AP program 70 that is the transmission source of the query. Further, the client processing unit 202 acquires the processing priority of the query from the AP program 70 simultaneously with the reception of the query. If the processing priority cannot be acquired, the client processing unit 202 treats the processing priority as a preset processing priority. The processing priority may be given as a hint during the query.

次に、クライアント処理部202は、受信したクエリに基づいて、クエリプラン600を作成する(1102)。また、トランザクション管理情報430を参照することによって、取得したクライアントIDに対応するトランザクションID434が設定されているか否かを確認する。   Next, the client processing unit 202 creates a query plan 600 based on the received query (1102). Also, by referring to the transaction management information 430, it is confirmed whether or not a transaction ID 434 corresponding to the acquired client ID is set.

そして、トランザクションID434が設定されていない場合、トランザクションIDを新規に設定する。   If the transaction ID 434 is not set, a new transaction ID is set.

次に、クライアント処理部202は、クエリ管理情報410に新規エントリを作成する。その際、把握したクライアントID及び受信したクエリに付加されている通番を、クエリIDとする。次に、当該クエリIDを、新規エントリのクエリID412に格納する。次に、把握したクライアントIDとトランザクション管理情報430のクライアントID434とが一致するエントリを、トランザクション管理情報430から選択する。次に、選択したエントリから、トランザクションID434を抽出する。次に、抽出したトランザクションID434を、新規エントリのトランザクションID414に格納する。   Next, the client processing unit 202 creates a new entry in the query management information 410. At this time, the grasped client ID and the serial number added to the received query are set as the query ID. Next, the query ID is stored in the query ID 412 of the new entry. Next, an entry in which the grasped client ID matches the client ID 434 of the transaction management information 430 is selected from the transaction management information 430. Next, the transaction ID 434 is extracted from the selected entry. Next, the extracted transaction ID 434 is stored in the transaction ID 414 of the new entry.

次に、APプログラム70から取得した処理優先度を、新規エントリの処理優先度416に格納する。次に、新規エントリの処理実行ステータス418に「実行中」を格納する。次に、新規エントリの対象リソース422に無効値を格納する。   Next, the processing priority acquired from the AP program 70 is stored in the processing priority 416 of the new entry. Next, “being executed” is stored in the process execution status 418 of the new entry. Next, an invalid value is stored in the target resource 422 of the new entry.

次に、クライアント処理部202は、クエリ処理実行要求を実行管理部204に送信する。クエリ処理実行要求は、新規エントリに格納したクエリIDを含む。   Next, the client processing unit 202 transmits a query processing execution request to the execution management unit 204. The query process execution request includes the query ID stored in the new entry.

実行管理部204は、クエリ処理実行要求を受信すると、先読み管理情報設定処理を行う(1103)。なお、先読み管理情報設定処理は、図11で詳細を説明する。   When receiving the query processing execution request, the execution management unit 204 performs prefetch management information setting processing (1103). Details of the prefetch management information setting process will be described with reference to FIG.

また、実行管理部204は、先読み管理情報設定処理において先読み要求管理情報540に新規エントリを追加したとき、先読み処理管理ループ処理がスリープ状態にあるか否かを判定する。そして、スリープ状態にある場合、先読み処理管理ループ処理を起こす。なお、先読み処理管理ループ処理は、図15で詳細を説明する。   The execution management unit 204 determines whether or not the prefetch process management loop process is in a sleep state when a new entry is added to the prefetch request management information 540 in the prefetch management information setting process. If it is in the sleep state, a prefetch processing management loop process is caused. Details of the prefetch processing management loop processing will be described with reference to FIG.

次に、実行管理部204は、受信したクエリ処理実行要求に含まれるクエリIDをデータ処理部206に通知し、当該クエリIDに対応するクエリの実行を要求する。   Next, the execution management unit 204 notifies the data processing unit 206 of the query ID included in the received query processing execution request, and requests execution of the query corresponding to the query ID.

データ処理部206は、クエリの実行を要求されると、データ処理を実行する(1104)。なお、データ処理は、図12で詳細を説明する。   When requested to execute the query, the data processing unit 206 executes data processing (1104). Details of the data processing will be described with reference to FIG.

データ処理部206は、データ処理を完了すると、トランザクションの状態を確認する。具体的には、コミット及びロールバックを実行したか否かを確認する。   When the data processing unit 206 completes the data processing, it checks the state of the transaction. Specifically, it is confirmed whether or not commit and rollback have been executed.

コミット及びロールバックを実行した場合、データ処理部206は、トランザクションが完了したと判断して以下の処理を実行する。   When the commit and rollback are executed, the data processing unit 206 determines that the transaction is completed and executes the following processing.

まず、データ処理部206は、クエリ管理情報410を参照することによって、トランザクションID414を把握する。次に、データ処理部206は、把握したトランザクションID414に対応するトランザクションが取得したロックの解放要求を共用DBデータ管理部210に送信する。なお、ロック解放要求には、データ処理部206が把握したトランザクションID414を含む。   First, the data processing unit 206 grasps the transaction ID 414 by referring to the query management information 410. Next, the data processing unit 206 transmits a lock release request acquired by the transaction corresponding to the grasped transaction ID 414 to the shared DB data management unit 210. Note that the lock release request includes the transaction ID 414 recognized by the data processing unit 206.

共用DBデータ管理部210は、ロック解放要求を受信すると、ロックを解放する(1105)。具体的には、ロック解放要求に含まれるトランザクションIDとロック管理情報480のロック取得トランザクションID486とが一致するすべてのエントリ(対象エントリ)を、ロック管理情報480から把握する。   When the shared DB data management unit 210 receives the lock release request, it releases the lock (1105). Specifically, all entries (target entries) in which the transaction ID included in the lock release request matches the lock acquisition transaction ID 486 of the lock management information 480 are grasped from the lock management information 480.

次に、それぞれの対象エントリのロック待ちリスト488から、先頭の値を抽出する。次に、抽出した値に含まれるクエリIDに対応するクエリを、次にロックを取得するクエリとする。そして、抽出した値に基いて、対象エントリのロック種別484及びロック取得トランザクションID486を設定する。   Next, the first value is extracted from the lock wait list 488 of each target entry. Next, a query corresponding to the query ID included in the extracted value is set as a query for acquiring a lock next. Based on the extracted value, the lock type 484 and the lock acquisition transaction ID 486 of the target entry are set.

その後、次にロックを取得するクエリを再開させる。このとき、再開されたクエリに対応するエントリを、クエリ管理情報410から選択する。次に、選択したエントリの処理ステータス418に「実行中」を格納する。次にに、選択した対象リソース422に、無効値を格納する。   Thereafter, the next query for acquiring the lock is resumed. At this time, an entry corresponding to the resumed query is selected from the query management information 410. Next, “executing” is stored in the processing status 418 of the selected entry. Next, an invalid value is stored in the selected target resource 422.

なお、対象エントリのロック待ちリスト488に値が格納されていない場合、当該エントリを、ロック管理情報480から削除する。   If no value is stored in the lock waiting list 488 of the target entry, the entry is deleted from the lock management information 480.

データ処理部206は、処理対象のクエリのクエリID及び処理結果をクライアント処理部202に送る。   The data processing unit 206 sends the query ID and processing result of the query to be processed to the client processing unit 202.

すると、クライアント処理部202は、受け取った処理結果をAPプログラム70に送信する(1106)。   Then, the client processing unit 202 transmits the received processing result to the AP program 70 (1106).

次に、クライアント処理部202は、処理が完了したクエリのクエリIDとクエリ管理情報410のクエリID412とが一致するエントリを、クエリ管理情報410から削除する。   Next, the client processing unit 202 deletes, from the query management information 410, an entry in which the query ID of the query that has been processed matches the query ID 412 of the query management information 410.

また、クエリの処理完了によってトランザクションが完了した場合、当該APプログラム70のクライアントIDとトランザクション管理情報430のクライアントID432とが一致するエントリを、トランザクション管理情報430から選択する。次に、選択したエントリのトランザクションID434に、無効値を格納する。   When the transaction is completed due to the completion of the query processing, an entry in which the client ID of the AP program 70 matches the client ID 432 of the transaction management information 430 is selected from the transaction management information 430. Next, an invalid value is stored in the transaction ID 434 of the selected entry.

次に、クライアント処理部202は、クエリの終了報告を実行管理部204に送信する。クエリの終了報告は、処理が終了したクエリのクエリIDを含む。   Next, the client processing unit 202 transmits a query completion report to the execution management unit 204. The query completion report includes the query ID of the query that has been processed.

すると、実行管理部204は、受信した終了報告に含まれるクエリIDと先読み管理情報510のクエリID512とが一致するエントリを、先読み管理情報510から削除する(1107)。   Then, the execution management unit 204 deletes an entry in which the query ID included in the received end report and the query ID 512 of the prefetch management information 510 match from the prefetch management information 510 (1107).

そして、クエリ処理を終了する(1108)。   Then, the query process ends (1108).

図11は、本発明の第1の実施の形態の実行管理部204の先読み管理情報設定処理のフローチャートである。   FIG. 11 is a flowchart of the prefetch management information setting process of the execution management unit 204 according to the first embodiment of this invention.

なお、先読み管理情報設定処理は、クエリ処理(図10)のステップ1103で実行される。   The prefetch management information setting process is executed in step 1103 of the query process (FIG. 10).

実行管理部204は、クエリ処理実行要求を受信すると、先読み管理情報設定処理を開始する(2101)。なお、クエリ処理実行要求は、新規エントリに格納したクエリIDを含む。   When receiving the query process execution request, the execution management unit 204 starts a prefetch management information setting process (2101). The query process execution request includes the query ID stored in the new entry.

まず、先読み管理情報の初期化を行う(2102)。受信したクエリ処理実行要求に含まれるクエリIDとクエリ管理情報410のクエリID412とが一致するエントリを、クエリ管理情報410から選択する。次に、選択したエントリから、処理優先度416を抽出することによって、指定されたクエリの処理優先度416を把握する。   First, prefetch management information is initialized (2102). An entry in which the query ID included in the received query processing execution request matches the query ID 412 of the query management information 410 is selected from the query management information 410. Next, the processing priority 416 of the designated query is grasped by extracting the processing priority 416 from the selected entry.

次に、先読み管理情報510に、新規エントリを追加する。次に、受信したクエリ処理実行要求に含まれるクエリIDを、新規エントリのクエリID512に格納する。   Next, a new entry is added to the prefetch management information 510. Next, the query ID included in the received query processing execution request is stored in the query ID 512 of the new entry.

次に、抽出した処理優先度416から定まる規定値を、先読みスレッド数514の最大スレッド数に格納する。次に、先読みスレッド数514の現利用スレッド数に、初期値を格納する。   Next, a specified value determined from the extracted processing priority 416 is stored in the maximum number of threads of the prefetch thread number 514. Next, an initial value is stored in the number of currently used threads of the number of prefetch threads 514.

次に、抽出した処理優先度416から定まる規定値を、先読みブロック数516の最大ブロック数に格納する。次に、先読みブロック数516の現利用ブロック数に、初期値を格納する。   Next, a specified value determined from the extracted processing priority 416 is stored in the maximum number of blocks of the number of prefetch blocks 516. Next, the initial value is stored in the number of currently used blocks of the number 516 of prefetch blocks.

次に、ランダム値を、新規エントリの実行確認値518に格納する。次に、抽出した処理優先度416から定まる規定値を、I/O発行間隔管理情報522の設定下限値に格納する。また、I/O発行間隔管理情報522のタイムスタンプには無効値を格納する。   Next, the random value is stored in the execution confirmation value 518 of the new entry. Next, the specified value determined from the extracted processing priority 416 is stored in the set lower limit value of the I / O issue interval management information 522. In addition, an invalid value is stored in the time stamp of the I / O issue interval management information 522.

次に、ページ数統計528に初期値を格納する。   Next, the initial value is stored in the page number statistics 528.

そして、新規割当てに対応して、総先読みスレッド数502の割当値及び総先読みブロック数504の割当て値を更新する。このとき、更新した割当値が最大値を超えると、補正処理を実行する(2103)。   Then, in response to the new allocation, the allocation value of the total prefetch thread number 502 and the allocation value of the total prefetch block number 504 are updated. At this time, if the updated allocation value exceeds the maximum value, correction processing is executed (2103).

具体的には、クエリ管理情報410の処理優先度416を参照し、処理対象のクエリより処理優先度416が低いクエリのクエリID412を把握する。次に、把握したクエリID412と先読み管理情報510のクエリID512とが一致するエントリを、先読み管理情報510から選択する。次に、選択したエントリの先読みスレッド数514の最大値及び先読みブロック数516の最大値から、所定の値を減ずる。   Specifically, the processing priority 416 of the query management information 410 is referred to, and the query ID 412 of a query having a processing priority 416 lower than the processing target query is grasped. Next, an entry in which the grasped query ID 412 matches the query ID 512 of the prefetch management information 510 is selected from the prefetch management information 510. Next, a predetermined value is subtracted from the maximum value of the prefetch thread number 514 and the maximum value of the prefetch block number 516 of the selected entry.

次に、総先読みスレッド数502の割当値及び総先読みブロック数504の割当値を更新する。そして、更新した割当値が最大値を下回るまでこの補正処理を繰り返す。   Next, the allocation value of the total prefetch thread number 502 and the allocation value of the total prefetch block number 504 are updated. Then, this correction process is repeated until the updated assigned value falls below the maximum value.

次に、クエリ管理情報410を参照することによって、クエリプランを把握する。次に、クエリプランの処理ステップから、索引参照処理を行う処理ステップを選択する。次に、選択した処理ステップから、索引の参照条件の値が全て既知の処理ステップを把握する(2104)。そして、このような処理ステップを一つでも把握した場合には、ステップ2105に進む。一方、一つも把握できない場合には、そのままステップ2107に進む。   Next, the query plan is grasped by referring to the query management information 410. Next, a processing step for performing an index reference process is selected from the query plan processing steps. Next, from the selected processing step, a processing step whose index reference condition values are all known is grasped (2104). If even one such processing step is grasped, the process proceeds to step 2105. On the other hand, if none can be grasped, the process proceeds to step 2107 as it is.

次に、把握した処理ステップを起点として、連続して先読み処理が可能な処理ステップを把握し、グループ化する(2105)。   Next, using the grasped process steps as starting points, the process steps that can be continuously read ahead are grasped and grouped (2105).

ここで、連続して先読み処理が可能な処理ステップとは、ここで把握した処理ステップ以降で取得する表、索引のデータ又はクエリプラン中の設定値に基いて、実行可能な処理ステップである。また、当該処理ステップは、索引参照処理、表データアクセス処理、フィルタ処理又はネストループ結合演算処理を実行する。   Here, the processing steps that can be prefetched continuously are processing steps that can be executed based on the table, index data, or setting values in the query plan acquired after the processing step grasped here. In the processing step, an index reference process, a table data access process, a filter process, or a nested loop join operation process is executed.

次に、先読み処理を起動するため、それぞれのグループごとに、先読み要求管理情報540にエントリを確保する。そして、確保したエントリに、値を設定する(2106)。   Next, in order to start the prefetch process, an entry is secured in the prefetch request management information 540 for each group. Then, a value is set in the secured entry (2106).

具体的には、受信したクエリ処理実行要求に含まれるクエリIDを、確保したエントリのクエリID541に格納する。次に、当該グループで一番最初に実施される処理ステップのステップIDを、確保したエントリのステップID543に格納する。次に、ステップ2102で先読み管理情報510の実行確認値518に格納した値を、確保したエントリの実行確認値545に格納する。   Specifically, the query ID included in the received query processing execution request is stored in the query ID 541 of the secured entry. Next, the step ID of the processing step executed first in the group is stored in the step ID 543 of the secured entry. Next, the value stored in the execution confirmation value 518 of the prefetch management information 510 in step 2102 is stored in the execution confirmation value 545 of the secured entry.

次に、当該グループで実行される索引参照処理の参照条件値に関する情報を、確保したエントリの参照条件544に格納する。なお、参照条件値が既知の場合には、既知の値を参照条件544に格納し、参照条件値が未知の場合には、どの表のどの属性から値を取得するかに関する情報を、参照条件544に格納する。   Next, information regarding the reference condition value of the index reference process executed in the group is stored in the reference condition 544 of the secured entry. When the reference condition value is known, the known value is stored in the reference condition 544, and when the reference condition value is unknown, information regarding which attribute of which table the value is acquired from is referred to as the reference condition. Stored in 544.

次に、ステップ2105で設定したグループに属さない索引参照処理を実行する処理ステップを把握する(2107)。なお、ステップ2104において索引の参照条件の値が全て既知の処理ステップを一つも把握できなかった場合には、すべての処理ステップがグループに属さないものとする。   Next, a processing step for executing an index reference process that does not belong to the group set in step 2105 is grasped (2107). In step 2104, if no processing steps with known index reference condition values are known, all the processing steps do not belong to the group.

そして、グループに属さない索引参照処理を実行する処理ステップが存在するか否かを判定する。そして、当該処理ステップが存在する場合には、ステップ2108に進む。一方、当該処理ステップが存在しない場合には、ステップ2121に進む。   Then, it is determined whether or not there is a processing step for executing an index reference process that does not belong to the group. If the processing step exists, the process proceeds to step 2108. On the other hand, if the processing step does not exist, the process proceeds to step 2121.

次に、先読み管理情報510のデータ処理作成要求作成設定526の作成要否に「Yes」を格納する(2108)。   Next, “Yes” is stored in the necessity of creation of the data processing creation request creation setting 526 of the prefetch management information 510 (2108).

次に、ステップ2105と同様に、把握した処理ステップを起点として連続して先読み処理が可能な処理ステップを把握し、グループ化する(2109)。なお、ステップ2105で作成したグループに既に属する処理ステップは、ここでは先読み処理が不可能な処理ステップとして扱う。   Next, as in step 2105, the process steps that can be prefetched continuously from the grasped process steps are grasped and grouped (2109). Note that the processing steps that already belong to the group created in step 2105 are treated as processing steps that cannot be prefetched here.

次に、それぞれのグループごとに、一番最初に実行される処理ステップを特定する。次に、特定した処理ステップのステップIDを、先読み管理情報510のデータ処理先読み要求作成設定526のステップIDに格納する。   Next, for each group, the processing step to be executed first is specified. Next, the step ID of the identified processing step is stored in the step ID of the data processing prefetch request creation setting 526 of the prefetch management information 510.

次に、ステップ2106と同様に、そのグループで実施される索引参照処理の参照条件値に関する情報を、先読み管理情報510のデータ処理先読み要求作成設定526の参照条件に格納する(2110)。なお、参照条件値が既知の場合には、既知の値をデータ処理先読み要求作成設定526の参照条件に格納し、参照条件値が未知の場合には、どの表のどの属性から値を取得するかに関する情報を、データ処理先読み要求作成設定526の参照条件に格納する。そして、先読み管理情報設定処理を終了する(2111)。   Next, similarly to step 2106, information related to the reference condition value of the index reference process executed in the group is stored in the reference condition of the data processing prefetch request creation setting 526 of the prefetch management information 510 (2110). If the reference condition value is known, the known value is stored in the reference condition of the data processing prefetch request creation setting 526. If the reference condition value is unknown, the value is acquired from which attribute of which table. Is stored in the reference condition of the data processing prefetch request creation setting 526. Then, the prefetch management information setting process ends (2111).

一方、グループに属さない索引参照処理を実行する処理ステップが存在しないと判定すると、先読み管理情報510のデータ処理作成要求作成設定526の作成要否に、「No」を格納する(2121)。そして、実行管理部204は、先読み管理情報設定処理を終了する(2111)。   On the other hand, if it is determined that there is no processing step for executing the index reference processing that does not belong to the group, “No” is stored in the necessity of creation of the data processing creation request creation setting 526 of the prefetch management information 510 (2121). Then, the execution management unit 204 ends the prefetch management information setting process (2111).

図12は、本発明の第1の実施の形態のデータ処理部206のデータ処理のフローチャートである。   FIG. 12 is a flowchart of data processing of the data processing unit 206 according to the first embodiment of this invention.

なお、データ処理は、クエリ処理(図10)のステップ1104で実行される。   The data processing is executed in step 1104 of the query processing (FIG. 10).

まず、データ処理部206は、クエリの実行要求を受けると、データ処理を開始する(2401)。なお、クエリの実行要求には、実行を要求するクエリのクエリIDを含む。   First, when receiving a query execution request, the data processing unit 206 starts data processing (2401). The query execution request includes the query ID of the query that requests execution.

次に、受信した実行要求に含まれるクエリIDとクエリ管理情報410のクエリID412とが一致するエントリを、クエリ管理情報410から選択する。次に、選択したエントリから、クエリプラン424を抽出することによって、実行するクエリに対応するクエリプラン600を把握する(2402)。   Next, an entry in which the query ID included in the received execution request matches the query ID 412 of the query management information 410 is selected from the query management information 410. Next, by extracting the query plan 424 from the selected entry, the query plan 600 corresponding to the query to be executed is grasped (2402).

次に、把握したクエリプラン600から、処理開始ステップID602を抽出する。これによって、最初に処理する処理ステップを確認する(2403)。なお、最初の処理では、その処理ステップで扱うデータの先頭部分を処理する。   Next, the process start step ID 602 is extracted from the grasped query plan 600. Thereby, the processing step to be processed first is confirmed (2403). In the first process, the head portion of the data handled in the processing step is processed.

次に、確認した処理ステップで処理するデータを取得する。なお、処理ステップで表又は索引のデータを直接利用する場合、データ取得要求を共用DBデータ管理部210に送信する。なお、データ取得要求は、ページID、ロック種別、クエリID及びトランザクションIDを含む。ページIDは、取得を要求するデータを有するページの一意な識別子である。ロック種別は、当該ページに設定するロックの種別である。クエリIDは、取得を要求するデータを必要とするクエリの一意な識別子である。トランザクションIDは、当該クエリが属するトランザクションの一意な識別子である。   Next, data to be processed in the confirmed processing step is acquired. When the table or index data is directly used in the processing step, a data acquisition request is transmitted to the shared DB data management unit 210. The data acquisition request includes a page ID, a lock type, a query ID, and a transaction ID. The page ID is a unique identifier of a page having data for which acquisition is requested. The lock type is a type of lock set for the page. The query ID is a unique identifier of a query that requires data for which acquisition is requested. The transaction ID is a unique identifier of the transaction to which the query belongs.

共用DBデータ管理部210は、データ取得要求を受信すると、データ取得要求時処理を実行する(2404)。なお、データ取得要求時処理は、図14で詳細を説明する。   When the shared DB data management unit 210 receives the data acquisition request, the shared DB data management unit 210 executes data acquisition request processing (2404). Details of the data acquisition request processing will be described with reference to FIG.

データ処理部206は、共用DBデータ管理部210からデータを取得する。次に、取得したデータに対して、処理ステップを実行する(2405)。   The data processing unit 206 acquires data from the shared DB data management unit 210. Next, a processing step is executed on the acquired data (2405).

そして、データ利用完了報告を共用DBデータ管理部210に送信する。データ利用完了報告は、ページID及び更新情報を含む。ページIDは、ステップ2404で取得した表又は索引のデータを有するページの識別子である。更新情報は、当該ページIDに対応するページに対する更新の有無を示す。   Then, the data use completion report is transmitted to the shared DB data management unit 210. The data use completion report includes a page ID and update information. The page ID is an identifier of a page having the table or index data acquired in step 2404. The update information indicates whether or not the page corresponding to the page ID has been updated.

共用DBデータ管理部210は、データ利用完了報告を受信すると、データ利用完了処理を実行する(2406)。   When the shared DB data management unit 210 receives the data use completion report, the shared DB data management unit 210 executes data use completion processing (2406).

具体的には、受信したデータ利用完了報告に含まれるページIDとバッファブロック管理情報460のページID463とが一致するエントリを、バッファブロック管理情報460から選択する。次に、選択したエントリの利用数468を、減少させる。次に、ページの更新があった場合、選択したエントリの状態464に「Dirty」を格納する(2406)。   Specifically, an entry in which the page ID included in the received data use completion report matches the page ID 463 of the buffer block management information 460 is selected from the buffer block management information 460. Next, the usage number 468 of the selected entry is decreased. Next, when the page is updated, “Dirty” is stored in the state 464 of the selected entry (2406).

そして、データ処理部206は、次に実行する処理ステップを確認する(2407)。具体的には、事前に与えられるルールに従ったクエリプランの解釈及びステップ2405の処理結果によって、次に実行する処理ステップを判断する。   The data processing unit 206 confirms the next processing step to be executed (2407). Specifically, the processing step to be executed next is determined based on the interpretation of the query plan according to the rule given in advance and the processing result of step 2405.

次に実行する処理ステップがない場合、すべての処理ステップを完了したと判定し、データ処理を終了する(2409)。   If there is no processing step to be executed next, it is determined that all the processing steps have been completed, and the data processing is terminated (2409).

一方、後続のデータに対して同一の処理ステップを実行する場合、ステップ2404に戻る。   On the other hand, when the same processing step is executed for subsequent data, the process returns to step 2404.

また、後続のデータに対して異なる処理ステップを実行する場合、先読み要求設定処理を実行する(2408)。なお、先読み要求設定処理は、図13で詳細を説明する。そして、ステップ2404に戻る。   When different processing steps are executed for subsequent data, a prefetch request setting process is executed (2408). Details of the prefetch request setting process will be described with reference to FIG. Then, the process returns to step 2404.

図13は、本発明の第1の実施の形態のデータ処理部206の先読み要求設定処理のフローチャートである。   FIG. 13 is a flowchart of the prefetch request setting process of the data processing unit 206 according to the first embodiment of this invention.

なお、先読み要求設定処理は、データ処理(図12)のステップ2408で実行される。   The prefetch request setting process is executed in step 2408 of the data process (FIG. 12).

まず、データ処理部206は、実行中のクエリのクエリIDとクエリプラン600中で次に実行する処理ステップのステップIDが与えられ、先読み要求設定処理を開始する(2201)。   First, the data processing unit 206 is given a query ID of a query being executed and a step ID of a processing step to be executed next in the query plan 600, and starts a prefetch request setting process (2201).

すると、与えられたクエリIDと先読み管理情報510のクエリID512とが一致するエントリが、先読み管理情報510に存在するか否かを判定する。   Then, it is determined whether or not an entry in which the given query ID matches the query ID 512 of the prefetch management information 510 exists in the prefetch management information 510.

当該エントリが先読み管理情報510に存在すると、当該エントリからデータ処理先読み要求作成設定526を抽出する。次に、抽出したデータ処理先読み要求作成設定526の作成要否に「Yes」が格納されているか否かを判定する。そして、「Yes」が格納されていると、処理開始時に与えられたステップIDが、抽出したデータ処理先読み要求作成設定526のステップIDに格納されているか否かを判定する。これによって、先読み要求の設定が必要であるか否かを判定する(2202)。   If the entry exists in the prefetch management information 510, the data processing prefetch request creation setting 526 is extracted from the entry. Next, it is determined whether “Yes” is stored in the necessity of creation of the extracted data processing prefetch request creation setting 526. If “Yes” is stored, it is determined whether or not the step ID given at the start of the process is stored in the step ID of the extracted data processing prefetch request creation setting 526. Thus, it is determined whether or not setting of a prefetch request is necessary (2202).

抽出したデータ処理先読み要求作成設定526の作成要否に「Yes」が格納されていない場合、又は、処理開始時に与えられたステップIDがデータ処理先読み要求作成設定526に格納されていない場合、先読み要求の設定が不要であると判定し、そのまま先読み要求設定処理を終了する(2207)。   If “Yes” is not stored in the necessity of creation of the extracted data processing prefetch request creation setting 526, or if the step ID given at the start of processing is not stored in the data processing prefetch request creation setting 526, prefetching is performed. It is determined that the request setting is unnecessary, and the prefetch request setting process is terminated as it is (2207).

処理開始時に与えられたステップIDがデータ処理先読み要求作成設定526に格納されている場合、先読み要求の設定が必要であると判定する。   When the step ID given at the start of processing is stored in the data processing prefetch request creation setting 526, it is determined that the prefetch request needs to be set.

そこで、先読み要求管理情報540に新規エントリを追加する。次に、処理開始時に与えられたクエリIDを、新規エントリのクエリID541に格納する。次に、処理開始時に与えられたステップIDを、新規エントリのステップID543に格納する。   Therefore, a new entry is added to the prefetch request management information 540. Next, the query ID given at the start of processing is stored in the query ID 541 of the new entry. Next, the step ID given at the start of processing is stored in the step ID 543 of the new entry.

次に、処理開始時に与えられたクエリIDと先読み管理情報510のクエリID512とが一致するエントリを、先読み管理情報510から選択する。次に、選択したエントリから、実行確認値518を抽出する。次に抽出した実行確認値518を、先読み要求540の実行確認値545に格納する(2203)。   Next, an entry in which the query ID given at the start of processing matches the query ID 512 of the prefetch management information 510 is selected from the prefetch management information 510. Next, an execution confirmation value 518 is extracted from the selected entry. Next, the extracted execution confirmation value 518 is stored in the execution confirmation value 545 of the prefetch request 540 (2203).

次に、処理開始時に与えられたクエリIDと先読み管理情報510のクエリID512とが一致するエントリを、先読み管理情報510から選択する。次に、選択したエントリから、データ処理先読み要求作成設定526の参照条件を抽出する。次に、抽出した参照条件を、新規エントリの参照条件544を格納する。格納した参照条件544の中で値が未知の部分に関し、これまでの処理で対応する表の属性の値が既知になったものに関してその値を設定する。これによって、参照条件544を設定する(2204)。   Next, an entry in which the query ID given at the start of processing matches the query ID 512 of the prefetch management information 510 is selected from the prefetch management information 510. Next, the reference condition of the data processing prefetch request creation setting 526 is extracted from the selected entry. Next, the reference condition 544 of the new entry is stored as the extracted reference condition. In the stored reference condition 544, regarding the part whose value is unknown, the value is set for the part in which the value of the attribute of the corresponding table becomes known in the processing so far. Thereby, the reference condition 544 is set (2204).

次に、処理開始時に与えられたクエリIDとクエリ管理情報410のクエリID412とが一致するエントリを、クエリ管理情報410から選択する。次に選択したエントリから、クエリプラン424を抽出することによって、クエリプラン600を特定する。次に、処理開始時に与えられたステップIDと特定したクエリプラン600のステップID606とが一致するエントリを、クエリプラン600から選択する。   Next, an entry in which the query ID given at the start of processing matches the query ID 412 of the query management information 410 is selected from the query management information 410. Next, the query plan 600 is specified by extracting the query plan 424 from the selected entry. Next, an entry in which the step ID given at the start of the process and the step ID 606 of the identified query plan 600 match is selected from the query plan 600.

次に、選択したエントリの処理詳細616から、索引参照処理が参照する索引のオブジェクトIDを抽出する。次に、抽出したオブジェクトIDとオブジェクト管理情報330のオブジェクトID332とが一致するエントリを、オブジェクト管理情報330から選択する。次に、選択したエントリから、索引ルートページID342を抽出する。そして、抽出した索引ルートページID342を、新規エントリのページID549に格納する(2205)。なお、索引ルートページID342に複数のページIDが含まれる場合、当該ページIDに対応する数の新規エントリを、先読み要求管理情報540に作成する。   Next, the object ID of the index referred to by the index reference process is extracted from the process details 616 of the selected entry. Next, an entry in which the extracted object ID matches the object ID 332 of the object management information 330 is selected from the object management information 330. Next, the index route page ID 342 is extracted from the selected entry. The extracted index root page ID 342 is stored in the page ID 549 of the new entry (2205). When the index root page ID 342 includes a plurality of page IDs, the number of new entries corresponding to the page ID is created in the prefetch request management information 540.

次に、先読み処理管理ループ処理(図15)がスリープ状態にある場図合、先読み処理管理ループ処理を起こす(2206)。   Next, when the prefetch process management loop process (FIG. 15) is in the sleep state, the prefetch process management loop process is generated (2206).

そして、データ処理部206は、先読み要求設定処理処理を終了する(2207)。   Then, the data processing unit 206 ends the prefetch request setting process (2207).

図14は、本発明の第1の実施の形態の共有DBデータ管理部210のデータ取得要求時処理のフローチャートである。   FIG. 14 is a flow chart for data acquisition request processing of the shared DB data management module 210 according to the first embodiment of this invention.

共有DBデータ管理部210は、データ処理(図14)のステップ2404において、データ処理部206からデータ取得要求を受けると、本処理を開始する(1201)。なお、データ取得要求は、ページID、ロック種別、クエリID及びトランザクションIDを含む。ページIDは、必要とされるデータを有するページの一意な識別子である。ロック種別は、当該ページに対して設定すべきロックの種別である。なお、ロックの設定が不要な場合、データ取得要求は、ロック種別を含まない。クエリIDは、データを必要とするクエリの一意な識別子である。トランザクションIDは、当該クエリが属するトランザクションの一意な識別子である。   When the shared DB data management unit 210 receives a data acquisition request from the data processing unit 206 in step 2404 of the data processing (FIG. 14), the shared DB data management unit 210 starts this processing (1201). The data acquisition request includes a page ID, a lock type, a query ID, and a transaction ID. The page ID is a unique identifier of the page having the required data. The lock type is a lock type to be set for the page. Note that when the lock setting is unnecessary, the data acquisition request does not include the lock type. The query ID is a unique identifier of a query that requires data. The transaction ID is a unique identifier of the transaction to which the query belongs.

共有DBデータ管理部210は、受け取ったデータ取得要求に含まれるページIDに対応するページに、当該データ取得要求に含まれるロック種別のロックを設定する(1202)。なお、データ取得要求にロック種別が含まれない場合、本ステップは実行されない。   The shared DB data management unit 210 sets the lock of the lock type included in the data acquisition request to the page corresponding to the page ID included in the received data acquisition request (1202). If the lock type is not included in the data acquisition request, this step is not executed.

具体的には、受け取ったデータ取得要求に含まれるページIDとロック管理情報480のページID482とが一致するエントリを、ロック管理情報480から選択する。次に、選択したエントリを対象エントリとして把握する。   Specifically, an entry in which the page ID included in the received data acquisition request matches the page ID 482 of the lock management information 480 is selected from the lock management information 480. Next, the selected entry is grasped as a target entry.

なお、対象エントリを把握できない場合には、当該ページに対してロックは設定されていない。そこで、ロック管理情報480に新規エントリを作成する。次に、データ取得要求に含まれるページIDを、新規エントリのページID482に格納する。次に、データ取得要求に含まれるロック種別を、新規エントリのロック種別484に格納する。次に、データ取得要求に含まれるトランザクションIDを、新規エントリのロック取得トランザクションID486に格納する。次に、ロック待ちリスト488に初期値を格納する。   When the target entry cannot be grasped, no lock is set for the page. Therefore, a new entry is created in the lock management information 480. Next, the page ID included in the data acquisition request is stored in the page ID 482 of the new entry. Next, the lock type included in the data acquisition request is stored in the lock type 484 of the new entry. Next, the transaction ID included in the data acquisition request is stored in the lock acquisition transaction ID 486 of the new entry. Next, the initial value is stored in the lock wait list 488.

一方、対象エントリを把握できた場合には、対象エントリのロック種別484及びロック取得トランザクションID486を参照することによって、当該クエリに関する処理を続行可能であるか否かを判定する。   On the other hand, when the target entry can be grasped, it is determined by referring to the lock type 484 and the lock acquisition transaction ID 486 of the target entry whether or not the processing related to the query can be continued.

続行可能であると、処理を続行する。このとき、必要であれば、ロック種別484の更新及びロック取得トランザクションID486への値の追加を行う。   If it can continue, processing continues. At this time, if necessary, the lock type 484 is updated and a value is added to the lock acquisition transaction ID 486.

一方、続行不可能であると、データ取得要求に含まれるページID及びロック種別を、対象エントリのロック待ちリスト488の終端に格納する。そして、ロックを取得するまで当該クエリを中断する。   On the other hand, if it is impossible to continue, the page ID and the lock type included in the data acquisition request are stored at the end of the lock waiting list 488 of the target entry. Then, the query is suspended until the lock is acquired.

なお、クエリの中断中には、クエリ管理情報410の処理ステータス418に「ロック設定待ち」を格納する。更に、ロックを取得するページのページIDを、クエリ管理情報410の対象リソース422に格納する。   During query interruption, “waiting for lock setting” is stored in the processing status 418 of the query management information 410. Further, the page ID of the page from which the lock is acquired is stored in the target resource 422 of the query management information 410.

次に、共有DBデータ管理部210は、受け取ったデータ取得要求に含まれるページIDとバッファブロック管理情報460のページID463とが一致するエントリを、バッファブロック管理情報460から選択する。そして、選択したエントリを、対象ブロックエントリとしてとして把握する。次に、対象ブロックエントリが存在するかどうかを判定する。   Next, the shared DB data management unit 210 selects, from the buffer block management information 460, an entry in which the page ID included in the received data acquisition request matches the page ID 463 of the buffer block management information 460. Then, the selected entry is grasped as the target block entry. Next, it is determined whether or not the target block entry exists.

対象ブロックエントリが存在しない場合、ステップ1211に進む。   If there is no target block entry, the process proceeds to step 1211.

一方、対象ブロックエントリが存在する場合、対象ブロックエントリの状態464が「Reading」であるかどうかを判定する(1203)。   On the other hand, if the target block entry exists, it is determined whether or not the status 464 of the target block entry is “Reading” (1203).

対象ブロックエントリの状態464が「Reading」でないと、そのままステップ1205に進む。一方、対象ブロックエントリの状態464が「Reading」であると、ステップ1204に進む。   If the state 464 of the target block entry is not “Reading”, the process proceeds to step 1205 as it is. On the other hand, if the state 464 of the target block entry is “Reading”, the process proceeds to step 1204.

まず、対象ブロックエントリのブロックID462とI/O待ち管理情報490のブロックID492とが一致するエントリを、I/O待ち管理情報490から選択する。次に、受け取ったデータ取得要求に含まれるクエリIDを、選択したエントリI/O待ちリスト494に格納する。そして、I/O処理が完了するまで当該クエリを中断する(1204)。   First, an entry in which the block ID 462 of the target block entry matches the block ID 492 of the I / O waiting management information 490 is selected from the I / O waiting management information 490. Next, the query ID included in the received data acquisition request is stored in the selected entry I / O waiting list 494. Then, the query is suspended until the I / O processing is completed (1204).

次に、対象ブロックエントリから、先読み対応クエリID469を把握する。次に、把握した先読みクエリID469に、値が格納されているか否かを判定する。   Next, the prefetch correspondence query ID 469 is grasped from the target block entry. Next, it is determined whether or not a value is stored in the grasped prefetch query ID 469.

先読みクエリID469に値が格納されていると、対象ブロック内のデータは先読みされたものであるので、以下の処理を実施する。   If a value is stored in the prefetch query ID 469, the data in the target block has been prefetched, so the following processing is performed.

まず、把握した先読み対応クエリID469と先読み管理情報510のクエリID512とが一致するエントリを、先読み管理情報510から選択する。そして、選択するエントリが存在すると、選択したエントリの先読みブロック数516を減ずる(1205)。   First, an entry in which the grasped prefetch correspondence query ID 469 matches the query ID 512 of the prefetch management information 510 is selected from the prefetch management information 510. If there is an entry to be selected, the number of prefetch blocks 516 of the selected entry is reduced (1205).

次に、対応ブロックエントリの先読み対応クエリID469に、無効値を格納する。また、先読み処理管理ループ処理(図15)がスリープ状態にある場合、先読み処理管理ループ処理を起こす。   Next, an invalid value is stored in the prefetch correspondence query ID 469 of the corresponding block entry. Further, when the prefetch process management loop process (FIG. 15) is in the sleep state, the prefetch process management loop process is caused.

次に、対象ブロックエントリの管理情報を更新する(1206)。具体的には、対象ブロックエントリから、リンク情報466の管理リストを抽出することによって、当該ブロックが属する管理リストを把握する。次に、把握した管理リストが、上位LRU管理リスト又は下位LRU管理リストのいずれであるかを判定する。   Next, the management information of the target block entry is updated (1206). Specifically, by extracting the management list of the link information 466 from the target block entry, the management list to which the block belongs is grasped. Next, it is determined whether the grasped management list is an upper LRU management list or a lower LRU management list.

把握した管理リストが上位LRU管理リストであると、当該上位LRU管理リストのMRU端に対象ブロックエントリを挿入する。   If the grasped management list is the upper LRU management list, the target block entry is inserted at the MRU end of the upper LRU management list.

一方、把握した管理リストが下位LRU管理リストであると、上記と同様の対象ブロックエントリの挿入とともに、挿入先の上位LRU管理リストのLRU端(終端)に存在するエントリを、当該管理リストのMRU端に繋ぎ直す。なお、バッファブロック管理情報460及びバッファグループ管理情報470を参照・更新することによって、この処理を実現する。次に、対象ブロックエントリの利用数468を増加させる。   On the other hand, if the grasped management list is the lower LRU management list, the entry existing at the LRU end (end) of the insertion destination upper LRU management list is inserted together with the insertion of the target block entry similar to the above, and the MRU of the management list Reconnect to the edge. This process is realized by referring to and updating the buffer block management information 460 and the buffer group management information 470. Next, the usage number 468 of the target block entry is increased.

次に、先読み管理情報510のページ数統計528を更新する(1207)。具体的には、受け取ったデータ取得要求に含まれるクエリIDと管理情報510のクエリID512とが一致するエントリを、先読み管理情報510から選択する。次に、選択したエントリのページ数統計528の処理利用数を増加させる。また、ステップ1205で「先読みされた」データであると判定した場合には、選択したエントリのページ数統計528の先読みヒット数を増加させる。   Next, the page number statistics 528 of the prefetch management information 510 is updated (1207). Specifically, an entry in which the query ID included in the received data acquisition request matches the query ID 512 of the management information 510 is selected from the prefetch management information 510. Next, the processing usage number of the page number statistics 528 of the selected entry is increased. If it is determined in step 1205 that the data is “prefetched”, the number of prefetch hits in the page number statistics 528 of the selected entry is increased.

次に、対象ブロックエントリのブロックID462、バッファ領域情報452及びバッファブロックサイズ454に基づいて、対象データを保持するブロックの先頭アドレスを計算する。そして、計算した先頭アドレスをデータ処理部206に送信する。そして、データ取得要求時処理を終了する(1208)。   Next, based on the block ID 462, the buffer area information 452, and the buffer block size 454 of the target block entry, the head address of the block holding the target data is calculated. Then, the calculated head address is transmitted to the data processing unit 206. Then, the data acquisition request processing is terminated (1208).

一方、ステップ1203で対象ブロックエントリが存在しないと判定すると、受け取ったデータ取得要求に含まれるページIDをオブジェクト管理情報330の対応ページID338に含むエントリを、オブジェクト管理情報330から選択する。次に、選択したエントリから、グループID334を抽出する。   On the other hand, if it is determined in step 1203 that the target block entry does not exist, an entry including the page ID included in the received data acquisition request in the corresponding page ID 338 of the object management information 330 is selected from the object management information 330. Next, the group ID 334 is extracted from the selected entry.

次に、抽出したグループID334とバッファグループ管理情報470のグループID472とが一致するエントリを、バッファグループ管理情報470から選択する。次に、選択したエントリから、下位LRU管理リスト情報476を抽出する。次に、抽出した下位LRU管理リスト情報476を参照することによって、下位LRU管理リストのLRU端に存在するエントリによって管理されるブロックを把握する。次に、把握したブロックを置換対象となるブロック(置換ブロック)とする(1211)。そして、置換ブロックに、対象データを保持させる。   Next, an entry in which the extracted group ID 334 matches the group ID 472 of the buffer group management information 470 is selected from the buffer group management information 470. Next, the lower LRU management list information 476 is extracted from the selected entry. Next, by referring to the extracted lower LRU management list information 476, the block managed by the entry existing at the LRU end of the lower LRU management list is grasped. Next, the grasped block is set as a replacement target block (replacement block) (1211). Then, the target data is held in the replacement block.

次に、置換ブロックのブロックIDとバッファブロック管理情報460のブロックID462とが一致するエントリを、バッファブロック管理情報460から選択する。次に、選択したエントリをを対象ブロックエントリとする。   Next, an entry in which the block ID of the replacement block matches the block ID 462 of the buffer block management information 460 is selected from the buffer block management information 460. Next, the selected entry is set as a target block entry.

次に、対象ブロックエントリの利用数468が「0」であるか否かを判定する。対象ブロックエントリの利用数468が「0」でない場合、当該利用数468が「0」になるまで待機する。そして、対象ブロックエントリを、下位LRU管理リストから外す。   Next, it is determined whether or not the usage number 468 of the target block entry is “0”. When the usage number 468 of the target block entry is not “0”, the process waits until the usage number 468 becomes “0”. Then, the target block entry is removed from the lower LRU management list.

次に、対象ブロックエントリの状態464が「Dirty」であるか否かを判定する。対象ブロックエントリの状態464が「Dirty」であると、置換ブロックに記憶されているデータをファイルに書き込む(1212)。なお、ファイル上での記憶位置は、ページID及びファイル管理情報350から把握できる記憶位置に、データを書き込む。   Next, it is determined whether or not the state 464 of the target block entry is “Dirty”. If the state 464 of the target block entry is “Dirty”, the data stored in the replacement block is written to the file (1212). Note that the storage location on the file is written in a storage location that can be grasped from the page ID and the file management information 350.

なお、ファイルへの書き込み処理を開始すると、I/O待ち管理情報490に新規エントリを追加する。次に、対象ブロックエントリのブロックID462を、新規エントリのブロックID492に格納する。次に、受け取ったデータ取得要求に含まれるクエリIDを、新規エントリのI/O待ちリスト494に追加する。そして、ファイルへの書き込み処理を終了すると、I/O待ち管理情報490に追加した新規エントリを削除する。   When the file writing process is started, a new entry is added to the I / O waiting management information 490. Next, the block ID 462 of the target block entry is stored in the block ID 492 of the new entry. Next, the query ID included in the received data acquisition request is added to the I / O waiting list 494 of the new entry. When the file writing process is completed, the new entry added to the I / O waiting management information 490 is deleted.

次に、共有DBデータ管理部210は、ステップ1205及びステップ1206と同一の処理を実行する。   Next, the shared DB data management unit 210 executes the same processing as in step 1205 and step 1206.

次に、受け取ったデータ取得要求に含まれるページIDを、対象ブロックエントリのページID463に格納する。次に、対象ブロックエントリの先読み対応クエリID469に無効値を格納する。   Next, the page ID included in the received data acquisition request is stored in the page ID 463 of the target block entry. Next, an invalid value is stored in the prefetch correspondence query ID 469 of the target block entry.

次に、対象ブロックエントリの状態464に「Reading」を格納する。   Next, “Reading” is stored in the state 464 of the target block entry.

次に、I/O待ち管理情報490に新規エントリを追加する。次に、対象ブロックエントリのブロックID462を、新規エントリのブロックID492に格納する。次に、受け取ったデータ取得要求に含まれるクエリIDを、新規エントリのI/O待ちリスト494に追加する。   Next, a new entry is added to the I / O waiting management information 490. Next, the block ID 462 of the target block entry is stored in the block ID 492 of the new entry. Next, the query ID included in the received data acquisition request is added to the I / O waiting list 494 of the new entry.

そして、受け取ったデータ取得要求に含まれるページIDに対応するページのデータをファイルから読み出す(1215)。なお、ファイル上の記憶位置はページID及びファイル管理情報350から把握できる記憶位置から、データを読み出す。   Then, the page data corresponding to the page ID included in the received data acquisition request is read from the file (1215). The storage location on the file is read from the storage location that can be grasped from the page ID and the file management information 350.

読み出しを完了すると、I/O待ち管理情報490の対応エントリを参照する。もし、参照したエントリのI/O待ちリスト494にデータ取得要求に含まれるクエリID以外にも値が格納されている場合、クエリの処理再開を指示する。   When the reading is completed, the corresponding entry of the I / O waiting management information 490 is referred to. If a value other than the query ID included in the data acquisition request is stored in the I / O waiting list 494 of the referenced entry, a query processing resumption is instructed.

そして、I/O待ち管理情報490から対応エントリを削除する。そして、ステップ1207に進む。   Then, the corresponding entry is deleted from the I / O waiting management information 490. Then, the process proceeds to Step 1207.

図15は、本発明の第1の実施の形態の先読み部208の先読み処理管理ループ処理のフローチャートである。   FIG. 15 is a flowchart of the prefetch processing management loop process of the prefetch unit 208 according to the first embodiment of this invention.

DBMS60が起動した際の初期化処理等において、先読み部208は、本処理を開始する(1401)。また、DBMS60の実行中にも、先読み部208は、本処理を独立して実行する。   In the initialization process or the like when the DBMS 60 is activated, the prefetch unit 208 starts this process (1401). Further, the prefetch unit 208 executes this processing independently even while the DBMS 60 is being executed.

先読み部208は、一定時間処理を中断(スリープ)する。一定時間は、例えば、十ミリ秒程度である。なお、イベント発生時には、先読み処理管理ループ処理が起こされる。イベント発生は、例えば、先読み要求管理情報540に新たなエントリが追加された場合、先読み実処理スレッドが終了した場合又は先読みしたデータが利用された場合等である。   The prefetch unit 208 interrupts (sleeps) the processing for a certain period of time. The certain time is, for example, about 10 milliseconds. When an event occurs, a prefetch processing management loop process is triggered. The occurrence of an event is, for example, when a new entry is added to the prefetch request management information 540, when the prefetch real processing thread is terminated, or when prefetched data is used.

次に、先読み要求管理情報540の待ちリスト管理情報552を参照することによって、先読み要求管理情報540の待ちリストで先頭に位置するエントリを把握する。把握したエントリを、処理対象エントリとして設定する(1403)。   Next, by referring to the waiting list management information 552 of the prefetch request management information 540, the entry located at the head in the wait list of the prefetch request management information 540 is grasped. The grasped entry is set as a processing target entry (1403).

次に、処理対象エントリを設定できたか否かを判定する(1404)。処理対象エントリを設定できない場合には、ステップ1402に戻る。   Next, it is determined whether or not the processing target entry has been set (1404). If the process target entry cannot be set, the process returns to step 1402.

一方、処理対象エントリを設定できた場合、当該処理対象エントリの次に位置するエントリを把握する(1405)。   On the other hand, when the processing target entry can be set, the entry positioned next to the processing target entry is grasped (1405).

次に、処理対象エントリから、クエリID541を抽出する。次に、抽出したクエリID541と先読み管理情報510のクエリID512とが一致するエントリを、先読み管理情報510から選択する。次に、選択したエントリを処理管理エントリとして把握する。   Next, the query ID 541 is extracted from the processing target entry. Next, an entry in which the extracted query ID 541 matches the query ID 512 of the prefetch management information 510 is selected from the prefetch management information 510. Next, the selected entry is grasped as a process management entry.

処理対象エントリの実行確認値545と処理管理エントリ中の実行確認値518とが一致するかどうかを判定する(1406)。実行確認値が一致しない場合、ステップ1421に進む。   It is determined whether the execution confirmation value 545 of the processing target entry matches the execution confirmation value 518 in the process management entry (1406). If the execution confirmation values do not match, the process proceeds to step 1421.

一方、実行確認値が一致すると、処理管理エントリの先読みスレッド数514を参照する。そして、参照した先読みスレッド数514の現利用スレッド数が、先読みスレッド数514の最大スレッド数未満であるか否かを判定する(1407)。現利用スレッド数が最大スレッド数以上であると、そのままステップ1411に進む。   On the other hand, when the execution confirmation values match, the number of prefetch threads 514 in the process management entry is referred to. Then, it is determined whether or not the currently used thread number of the referenced prefetch thread number 514 is less than the maximum thread number of the prefetch thread number 514 (1407). If the number of currently used threads is equal to or greater than the maximum number of threads, the process proceeds directly to step 1411.

一方、現利用スレッド数が最大スレッド数未満であると、処理管理エントリの先読みブロック数516を参照する。そして、参照した先読みブロック数516の先読み済みブロック数が、先読みブロック数516の最大ブロック数未満であるか否かを判定する(1408)。先読み済みブロック数が最大ブロック数以上であると、そのままステップ1411に進む。   On the other hand, if the number of currently used threads is less than the maximum number of threads, the number of prefetch blocks 516 in the process management entry is referred to. Then, it is determined whether or not the number of prefetched blocks of the referenced prefetch block number 516 is less than the maximum number of prefetched block numbers 516 (1408). If the number of pre-read blocks is equal to or greater than the maximum number of blocks, the process proceeds directly to step 1411.

一方、先読み済みブロック数が最大ブロック数未満であると、処理管理エントリの先読みスレッド数514の現利用を増加させる。そして、処理対象エントリを指定して先読み実処理スレッドを起動する(1409)。なお、先読み実処理スレッドは、図16で詳細を説明する。また、先読み部208は、複数の先読み実処理スレッドを同時に実行できる。   On the other hand, if the number of prefetched blocks is less than the maximum number of blocks, the current use of the prefetch thread number 514 of the process management entry is increased. Then, the prefetch real processing thread is activated by designating the processing target entry (1409). Details of the prefetch actual processing thread will be described with reference to FIG. Further, the prefetch unit 208 can simultaneously execute a plurality of prefetch real processing threads.

次に、処理対象エントリを、先読み要求管理情報540の待ちリスト管理情報552から外す(1410)。   Next, the processing target entry is removed from the waiting list management information 552 of the prefetch request management information 540 (1410).

次に、ステップ1405で把握したエントリを、処理対象エントリとして設定する(1411)。そして、ステップ1404に戻る。   Next, the entry grasped in step 1405 is set as a processing target entry (1411). Then, the process returns to step 1404.

一方、ステップ1406において実行確認値が一致しない場合、処理対象エントリを先読み要求管理情報540の待ちリスト管理情報552から外す。次に、処理対象エントリを、先読み要求管理情報540から削除する(1421)。そして、ステップ1411に進む。   On the other hand, if the execution confirmation values do not match in step 1406, the processing target entry is removed from the waiting list management information 552 of the prefetch request management information 540. Next, the processing target entry is deleted from the prefetch request management information 540 (1421). Then, the process proceeds to Step 1411.

図16は、本発明の第1の実施の形態の先読み部208の先読み実処理スレッドのフローチャートである。   FIG. 16 is a flowchart of the prefetching real processing thread of the prefetching unit 208 according to the first embodiment of this invention.

先読み実処理スレッドは、先読み処理管理ループ処理(図15)のステップ1409で実行される。   The prefetch actual processing thread is executed in step 1409 of the prefetch processing management loop processing (FIG. 15).

先読み部208は、先読み処理管理ループ処理を開始する際に(2301)、実行する先読み処理に関する情報を含む処理エントリ(先読み要求管理情報540のエントリ)を指定されている。   When the prefetching unit 208 starts the prefetching process management loop process (2301), a process entry (an entry of the prefetching request management information 540) including information related to the prefetching process to be executed is designated.

まず、先読み部208は、処理エントリのページID549を含むデータ参照要求を、共有DBデータ管理部210に送信する。   First, the prefetch unit 208 transmits a data reference request including the page ID 549 of the process entry to the shared DB data management unit 210.

共有DBデータ管理部210は、データ参照要求を受信すると、データ参照要求時処理を実行する(2302)。なお、データ参照要求時処理は、図17で詳細を後述する。   When the shared DB data management unit 210 receives the data reference request, the shared DB data management unit 210 executes a data reference request process (2302). Details of the data reference request processing will be described later with reference to FIG.

先読み部208は、共有DBデータ管理部210のデータ参照要求時処理の完了を待つ。そして、処理エントリのクエリID541と先読み管理情報510のクエリID512とが一致するエントリを、先読み管理情報510から選択する。次に、選択したエントリを、管理エントリとして把握する。   The prefetch unit 208 waits for completion of the data reference request processing of the shared DB data management unit 210. Then, an entry in which the query ID 541 of the process entry matches the query ID 512 of the prefetch management information 510 is selected from the prefetch management information 510. Next, the selected entry is grasped as a management entry.

次に、処理エントリの実行確認値545と管理エントリの実行確認値518とが一致するか否かを判定する(2303)。実行確認値が一致しない場合、ステップ2321に進む。   Next, it is determined whether or not the execution confirmation value 545 of the processing entry matches the execution confirmation value 518 of the management entry (2303). If the execution confirmation values do not match, the process proceeds to step 2321.

一方、実行確認値が一致した場合、指定ページに記憶されているデータが索引であるか否かを判定する。データが索引でないと、ステップ2311に進む。   On the other hand, if the execution confirmation values match, it is determined whether or not the data stored in the designated page is an index. If the data is not an index, the process proceeds to step 2311.

一方、データが索引であると、処理エントリから、クエリID541及びステップID543を抽出する。次に、抽出したクエリID541とクエリ管理情報410のクエリID412とが一致するエントリを、クエリ管理情報410から選択する。次に、選択したエントリのクエリプラン424を参照することによって、当該索引の参照条件を把握する(2305)。   On the other hand, if the data is an index, the query ID 541 and the step ID 543 are extracted from the processing entry. Next, an entry in which the extracted query ID 541 matches the query ID 412 of the query management information 410 is selected from the query management information 410. Next, the reference condition of the index is grasped by referring to the query plan 424 of the selected entry (2305).

次に、把握した参照条件に表データへのポインタを有するか否かを判定する。これによって、指定ページが索引のリーフページであるか否かを判定する(2306)。   Next, it is determined whether or not the grasped reference condition has a pointer to the table data. As a result, it is determined whether or not the designated page is an index leaf page (2306).

指定ページが索引のリーフページでないと、ステップ2308に進む。   If the designated page is not an index leaf page, the process advances to step 2308.

一方、指定ページが索引のリーフページであると、参照条件に対応する表ページへの先読み要求を作成する(2307)。具体的には、指定ページを解析する。これによって、ステップ2305で把握した索引の参照条件に対応する表データへのポインタを把握する。   On the other hand, if the designated page is an index leaf page, a prefetch request to the table page corresponding to the reference condition is created (2307). Specifically, the specified page is analyzed. Thus, the pointer to the table data corresponding to the index reference condition grasped in step 2305 is grasped.

次に、当該データを記憶しているページを取得するために、先読み要求管理情報540に新規エントリを追加する。次に、処理エントリのクエリID512を、新規エントリのクエリID541に格納する。次に、処理エントリの実行確認値518を、新規エントリの実行確認値545に格納する。次に、解析によって取得した表データへのポインタから把握される値を、新規エントリのページID549及びページ内データID542に格納する。   Next, a new entry is added to the prefetch request management information 540 in order to acquire a page storing the data. Next, the query ID 512 of the process entry is stored in the query ID 541 of the new entry. Next, the execution confirmation value 518 of the process entry is stored in the execution confirmation value 545 of the new entry. Next, the value grasped from the pointer to the table data acquired by the analysis is stored in the page ID 549 and the in-page data ID 542 of the new entry.

次に、処理エントリから、データ処理先読み要求作成処理526のステップIDを抽出する。次に、クエリプランを参照することによって、抽出したステップIDの処理ステップに対応して実施される表データの取得処理に対応する処理ステップのステップIDを特定する。次に、特定したステップIDを、新規エントリのステップID543に格納する。   Next, the step ID of the data processing prefetch request creation processing 526 is extracted from the processing entry. Next, by referring to the query plan, the step ID of the processing step corresponding to the table data acquisition processing executed corresponding to the processing step of the extracted step ID is specified. Next, the identified step ID is stored in the step ID 543 of the new entry.

次に、処理エントリから参照要求544を抽出する。次に、処理エントリからステップID543を抽出する。次に、抽出した参照条件544から、抽出したステップID543に対応する処理ステップにおける検索条件を除いた値を求める。そして、求めた値を、新規エントリの参照要求544に格納する。   Next, the reference request 544 is extracted from the processing entry. Next, the step ID 543 is extracted from the process entry. Next, a value obtained by removing the search condition in the processing step corresponding to the extracted step ID 543 from the extracted reference condition 544 is obtained. The obtained value is stored in the new entry reference request 544.

なお、対応するデータが複数ある場合には、それぞれのデータに対応する新規エントリを先読み要求管理情報540に追加する。   When there are a plurality of corresponding data, a new entry corresponding to each data is added to the prefetch request management information 540.

次に、データ参照要求で指定されたデータの参照完了を、共有DBデータ管理部210に報告する。   Next, the completion of reference to the data designated by the data reference request is reported to the shared DB data management unit 210.

次に、処理エントリを先読み管理情報510から削除する(2321)。そして、先読み実処理スレッドを終了する(2322)。   Next, the process entry is deleted from the prefetch management information 510 (2321). Then, the prefetch actual processing thread is terminated (2322).

一方、ステップ2306において指定ページが索引のリーフページでないと、参照条件に対応する下位の索引ページの先読み要求を作成する(2308)。具体的には、指定ページを解析する。   On the other hand, if the designated page is not an index leaf page in step 2306, a prefetch request for a lower index page corresponding to the reference condition is created (2308). Specifically, the specified page is analyzed.

次に、ステップ2305で把握した参照条件に対応し、且つ、リーフ側に存在する索引データを保持するページへのポインタを把握する。次に、当該索引データを保持するページを取得するために、先読み要求管理情報540に新規エントリを追加する。   Next, a pointer to a page corresponding to the reference condition grasped in step 2305 and holding index data existing on the leaf side is grasped. Next, a new entry is added to the prefetch request management information 540 in order to acquire a page holding the index data.

次に、処理エントリのクエリID512を、新規エントリのクエリID541に格納する。次に、処理エントリのデータ処理先読み要求作成設定526のステップIDを、新規エントリのステップID543に格納する。次に、処理エントリの実行確認値518を、新規エントリの実行確認値545に格納する。次に、処理エントリのデータ処理先読み要求作成設定526の参照条件を、新規エントリの参照条件544に格納する。   Next, the query ID 512 of the process entry is stored in the query ID 541 of the new entry. Next, the step ID of the data processing prefetch request creation setting 526 of the processing entry is stored in the step ID 543 of the new entry. Next, the execution confirmation value 518 of the process entry is stored in the execution confirmation value 545 of the new entry. Next, the reference condition of the data processing prefetch request creation setting 526 of the processing entry is stored in the reference condition 544 of the new entry.

次に、解析によって把握した索引データを保持するページのページIDを、新規エントリのページID549に設定する。なお、対応する索引データを保持するページが複数ある場合には、それぞれに対応する新規エントリを先読み要求管理情報540に追加する。。そして、ステップ2321に進む。   Next, the page ID of the page holding the index data grasped by the analysis is set to the page ID 549 of the new entry. If there are a plurality of pages holding corresponding index data, new entries corresponding to the pages are added to the prefetch request management information 540. . Then, the process proceeds to Step 2321.

一方、ステップ2304において指定ページに記憶されているデータが索引でないと、処理エントリの参照条件544に値が格納されているか否かを判定する。   On the other hand, if the data stored in the designated page in step 2304 is not an index, it is determined whether or not a value is stored in the reference condition 544 of the process entry.

参照条件に値が格納されていない場合、そのままステップ2321に進む。   If no value is stored in the reference condition, the process proceeds to step 2321 as it is.

一方、参照条件に値が格納されている場合、ステップ2302で取得したページを解析することによって、処理エントリのページ内データID542に対応するデータを把握する。   On the other hand, if a value is stored in the reference condition, the data corresponding to the in-page data ID 542 of the processing entry is grasped by analyzing the page acquired in step 2302.

次に、把握したデータに基づいて、処理エントリの参照条件544に設定する対応値を求める。そして、求めた対応値を、処理エントリの参照条件544に格納する(2312)。   Next, a corresponding value to be set in the reference condition 544 of the process entry is obtained based on the grasped data. Then, the obtained corresponding value is stored in the reference condition 544 of the process entry (2312).

次に、処理エントリの参照条件544に対応する処理の次に実行する索引参照処理における検索条件を把握する。そして、把握した検索条件が揃っているか否かを判定する。   Next, the search condition in the index reference process executed next to the process corresponding to the process entry reference condition 544 is grasped. Then, it is determined whether the grasped search conditions are met.

検索条件が揃っていなければ、そのままステップ2321に進む。   If the search conditions are not met, the process proceeds to step 2321 as it is.

一方、索引ステップ2314が揃っていれば、次の索引参照処理における索引ルートページのデータを取得するため、先読み要求管理情報540へ新規エントリを追加する(2314)。   On the other hand, if the index step 2314 is prepared, a new entry is added to the prefetch request management information 540 in order to acquire the data of the index root page in the next index reference process (2314).

次に、処理エントリのクエリID512を、新規エントリのクエリID541に格納する。次に、処理エントリの実行確認値518を、新規エントリの実行確認値545に格納する。次に、処理エントリのデータ処理先読み要求作成設定526の参照条件を、新規エントリの参照条件544に格納する。   Next, the query ID 512 of the process entry is stored in the query ID 541 of the new entry. Next, the execution confirmation value 518 of the process entry is stored in the execution confirmation value 545 of the new entry. Next, the reference condition of the data processing prefetch request creation setting 526 of the processing entry is stored in the reference condition 544 of the new entry.

次に、処理エントリのクエリID512とクエリ管理情報410のクエリID412とが一致するエントリを、クエリ管理情報410から選択する。次に、選択したエントリから、クエリプラン424を抽出する。次に、抽出したクエリプラン424及び処理エントリのデータ処理先読み要求作成設定526のステップIDを参照することによって、次の索引参照処理で参照する索引のオブジェクトID及び当該処理ステップに対応するステップIDを把握する。   Next, an entry in which the query ID 512 of the process entry matches the query ID 412 of the query management information 410 is selected from the query management information 410. Next, the query plan 424 is extracted from the selected entry. Next, by referring to the extracted query plan 424 and the step ID of the processing entry data processing prefetch request creation setting 526, the object ID of the index to be referred to in the next index reference processing and the step ID corresponding to the processing step are obtained. To grasp.

次に、把握したステップIDを、新規エントリのステップID543に格納する。次に、把握したオブジェクトIDとオブジェクト管理情報330のオブジェクトID330とが一致するエントリを、オブジェクト管理情報330から選択する。次に、選択したエントリから、索引ルートページID342を抽出する。次に、抽出した索引ルートページID342を、新規エントリのページID549に格納する。そして、ステップ2321に進む。   Next, the grasped step ID is stored in the step ID 543 of the new entry. Next, an entry in which the grasped object ID matches the object ID 330 of the object management information 330 is selected from the object management information 330. Next, the index route page ID 342 is extracted from the selected entry. Next, the extracted index route page ID 342 is stored in the page ID 549 of the new entry. Then, the process proceeds to Step 2321.

図17は、本発明の第1の実施の形態の共有DBデータ管理部210のデータ参照要求時処理のフローチャートである。   FIG. 17 is a flowchart of the data reference request processing of the shared DB data management unit 210 according to the first embodiment of this invention.

データ参照要求時処理は、先読み実処理スレッド(図16)のステップ2302で実行される。   The data reference request processing is executed in step 2302 of the prefetch actual processing thread (FIG. 16).

共有DBデータ管理部210は、データ参照要求を先読み部208から受けると、データ参照要求時処理を開始する(1301)。なお、データ参照要求は、必要とされるデータを有するページのページID及びデータを必要とする先読み処理に対応するクエリのクエリIDを含む。   When the shared DB data management unit 210 receives a data reference request from the prefetch unit 208, the shared DB data management unit 210 starts a data reference request process (1301). The data reference request includes the page ID of the page having the required data and the query ID of the query corresponding to the prefetch process that requires the data.

共有DBデータ管理部210は、受け取ったデータ参照要求に含まれるページIDとバッファブロック管理情報460のページID462とが一致するエントリを、バッファブロック管理情報460から選択する。次に、選択したエントリを対象ブロックエントリとして把握する。次に、把握する対象ブロックエントリが存在するか否かを判定する。   The shared DB data management unit 210 selects, from the buffer block management information 460, an entry in which the page ID included in the received data reference request matches the page ID 462 of the buffer block management information 460. Next, the selected entry is grasped as a target block entry. Next, it is determined whether or not the target block entry to be grasped exists.

対象ブロックエントリが存在しない場合、ステップ1211に進む。   If there is no target block entry, the process proceeds to step 1211.

一方、対象ブロックエントリが存在する場合、対象ブロックエントリの状態464が「Reading」であるかどうかを判定する(1303)。   On the other hand, if the target block entry exists, it is determined whether or not the status 464 of the target block entry is “Reading” (1303).

対象ブロックエントリの状態464が「Reading」でないと、そのままステップ1305に進む。一方、対象ブロックエントリの状態464が「Reading」であると、ステップ1304に進む。   If the state 464 of the target block entry is not “Reading”, the process proceeds to step 1305 as it is. On the other hand, if the state 464 of the target block entry is “Reading”, the process proceeds to step 1304.

まず、対象ブロックエントリのブロックID462とI/O待ち管理情報490のブロックID492とが一致するエントリを、I/O待ち管理情報490から選択する。次に、受け取ったデータ参照要求に含まれるクエリIDを、選択したエントリI/O待ちリスト494に格納する。そして、I/O処理が完了するまで当該クエリを中断する(1304)。   First, an entry in which the block ID 462 of the target block entry matches the block ID 492 of the I / O waiting management information 490 is selected from the I / O waiting management information 490. Next, the query ID included in the received data reference request is stored in the selected entry I / O waiting list 494. Then, the query is suspended until the I / O processing is completed (1304).

次に、対象ブロックエントリのリンク情報466の管理リストを抽出することによって、対象ブロックエントリが属している管理リストを把握する。そして、対象ブロックが上位LRU管理リスト又は下位LRU管理リストのいずれに属するかを判定する(1305)。   Next, the management list to which the target block entry belongs is grasped by extracting the management list of the link information 466 of the target block entry. Then, it is determined whether the target block belongs to the upper LRU management list or the lower LRU management list (1305).

対象ブロックが上位LRU管理リストに属すると、対象ブロックエントリの利用数468を増加させる(1322)。そして、データ参照要求時処理を終了する(1309)。   When the target block belongs to the upper LRU management list, the usage number 468 of the target block entry is increased (1322). Then, the data reference request processing is terminated (1309).

一方、対象ブロックが下位LRU管理リストに属すると、ステップ1205を実行する。なお、ステップ1205は、データ取得要求時処理(図14)で説明した処理と同一なので、説明を省略する。   On the other hand, if the target block belongs to the lower LRU management list, step 1205 is executed. Note that step 1205 is the same as the processing described in the data acquisition request processing (FIG. 14), and a description thereof will be omitted.

次に、対象ブロックエントリからリンク情報466の管理リストを抽出することによって、対象ブロックエントリが現在属している下位LRU管理リストを把握する。次に、把握した下位LRU管理リストのMRU端に、対象ブロックエントリを繋ぎ直す。なお、バッファブロック管理情報460及びバッファグループ管理情報470を参照・更新することによって、この処理を実行する。次に、対応ブロックエントリの利用数468を増加させる(1307)。   Next, the management list of the link information 466 is extracted from the target block entry, thereby grasping the lower LRU management list to which the target block entry currently belongs. Next, the target block entry is reconnected to the MRU end of the grasped lower LRU management list. This process is executed by referring to and updating the buffer block management information 460 and the buffer group management information 470. Next, the usage number 468 of the corresponding block entry is increased (1307).

次に、受け取ったデータ参照要求に含まれるクエリIDと先読み管理情報510のクエリID512とが一致するエントリを、先読み管理情報510から選択する。次に、選択したエントリの先読みブロック数516の先読み済みブロック数を増加させる。次に、受け取ったデータ参照要求に含まれるクエリIDを、対象ブロックエントリの先読み対応クエリID469に格納する(1308)。   Next, an entry in which the query ID included in the received data reference request matches the query ID 512 of the prefetch management information 510 is selected from the prefetch management information 510. Next, the number of prefetched blocks in the number of prefetched blocks 516 of the selected entry is increased. Next, the query ID included in the received data reference request is stored in the prefetch correspondence query ID 469 of the target block entry (1308).

次に、対象ブロックエントリのブロックID462、バッファ領域情報452及びバッファブロックサイズ454に基づいて、対象データを保持するブロックの先頭アドレスを求める。そして、求めたその先頭アドレスを先読み部208に送信する。そして、データ参照要求時処理を終了する(1309)。   Next, based on the block ID 462, buffer area information 452, and buffer block size 454 of the target block entry, the head address of the block holding the target data is obtained. Then, the obtained start address is transmitted to the prefetch unit 208. Then, the data reference request processing is terminated (1309).

一方、ステップ1303において対象ブロックエントリが存在しないと判定すると、ステップ1211、ステップ1212、ステップ1205及びステップ1314を実行する。なお、ステップ1211、ステップ1212及びステップ1205は、データ取得要求時処理(図14)で説明した処理と同一なので、説明を省略する。   On the other hand, if it is determined in step 1303 that the target block entry does not exist, step 1211, step 1212, step 1205 and step 1314 are executed. Steps 1211, 1212 and 1205 are the same as the processing described in the data acquisition request processing (FIG. 14), and thus description thereof is omitted.

次に、バッファブロック管理情報を更新する(1314)。具体的には、受け取ったデータ参照要求に含まれるページIDを、対象ブロックエントリのページID463に格納する。次に、対象ブロックエントリの先読み対応クエリID469に無効値を格納する。   Next, the buffer block management information is updated (1314). Specifically, the page ID included in the received data reference request is stored in the page ID 463 of the target block entry. Next, an invalid value is stored in the prefetch correspondence query ID 469 of the target block entry.

次に、I/O発行間隔を調整する(1315)。具体的には、受け取ったデータ参照要求に含まれるクエリIDと先読み管理情報510のクエリID512とが一致するエントリを、先読み管理情報510から選択する。次に、選択したエントリのI/O発行間隔管理情報522のタイムスタンプを抽出する。次に、抽出したタイムスタンプが有効である場合、抽出したタイムスタンプと現在の時刻との差分を求める。次に、求めた差分が、選択したエントリのI/O発行間隔管理情報522の設定下限値より小さいか否かを判定する。   Next, the I / O issue interval is adjusted (1315). Specifically, an entry in which the query ID included in the received data reference request matches the query ID 512 of the prefetch management information 510 is selected from the prefetch management information 510. Next, the time stamp of the I / O issue interval management information 522 of the selected entry is extracted. Next, when the extracted time stamp is valid, the difference between the extracted time stamp and the current time is obtained. Next, it is determined whether or not the obtained difference is smaller than a set lower limit value of the I / O issue interval management information 522 of the selected entry.

差分が設定下限値より小さいと、当該差分が設定下限値以上になるまで処理を中断する。そして、差分が設定下限値以上になると、選択したエントリのI/O発行間隔管理情報522のタイムスタンプに現在の時刻を格納する。   If the difference is smaller than the set lower limit value, the process is suspended until the difference becomes equal to or greater than the set lower limit value. When the difference becomes equal to or greater than the set lower limit value, the current time is stored in the time stamp of the I / O issue interval management information 522 of the selected entry.

次に、ステップ1215と同様に、データを読み出す(1316)。なお、ステップ1215は、データ取得要求時処理(図14)で説明した処理と同一なので、説明を省略する。そして、ステップ1308に進む。   Next, as in step 1215, data is read (1316). Note that step 1215 is the same as the processing described in the data acquisition request processing (FIG. 14), and a description thereof will be omitted. Then, the process proceeds to Step 1308.

図18は、本発明の第1の実施の形態の実行管理部204の実行管理部ループ処理のフローチャートである。   FIG. 18 is a flowchart of the execution management unit loop process of the execution management unit 204 according to the first embodiment of this invention.

DBMS60が起動した際の初期化処理等において、実行管理部204は、本処理を開始する(1501)。また、DBMS60の実行中にも、実行管理部204は、本処理を独立して実行する。   In an initialization process or the like when the DBMS 60 is activated, the execution management unit 204 starts this process (1501). Further, even during execution of the DBMS 60, the execution management unit 204 executes this process independently.

まず、実行管理部204は、DBサーバ42のCPU利用率を把握する(1502)。具体的には、CPU利用率はOS52が計測したCPU利用率を取得する。   First, the execution management unit 204 grasps the CPU usage rate of the DB server 42 (1502). Specifically, the CPU usage rate is obtained by the CPU usage rate measured by the OS 52.

次に、把握したCPU利用率が過負荷閾値以上である状態が一定時間継続しているかどうかを判定する(1503)。なお、当該過負荷閾値は、ユーザ等によって事前に与えられる。   Next, it is determined whether or not a state where the grasped CPU usage rate is equal to or higher than the overload threshold continues for a certain time (1503). The overload threshold is given in advance by a user or the like.

CPU利用率が過負荷閾値以上である状態が一定時間継続していると、ステップ1521に進む。   If the state where the CPU utilization rate is equal to or higher than the overload threshold continues for a certain period of time, the process proceeds to step 1521.

一方、CPU利用率が過負荷閾値以上である状態が一定時間継続していない場合、把握したCPU利用率が低負荷閾値以下である状態が一定時間継続しているかどうかを判定する(1504)。なお、当該低負荷閾値は、ユーザ等によって事前に与えられる。   On the other hand, if the state where the CPU utilization is equal to or higher than the overload threshold has not continued for a certain period of time, it is determined whether or not the state where the grasped CPU utilization is equal to or less than the low load threshold continues for a certain period of time (1504). The low load threshold is given in advance by a user or the like.

CPU利用率が低負荷閾値以下である状態が一定時間継続していない場合、そのままステップ1507に進む。   If the state where the CPU usage rate is equal to or lower than the low load threshold has not continued for a certain period of time, the process proceeds directly to step 1507.

一方、CPU利用率が低負荷閾値以下である状態が一定時間継続していると、現在中断中の先読み処理を再開する(1506)。   On the other hand, if the state where the CPU usage rate is equal to or lower than the low load threshold continues for a certain period of time, the prefetching process that is currently suspended is resumed (1506).

具体的には、先読み管理情報510のデータ処理先読み要求作成設定526の作成要否情報が「Stop」のエントリを選択する。次に、選択したエントリのデータ処理先読み要求作成設定526の作成要否情報を「Yes」に変更する。なお、クエリ管理情報410の処理優先度416に基づいて、当該処理の対象を制御してもよい。   Specifically, an entry having “Stop” as the creation necessity information in the data processing prefetch request creation setting 526 of the prefetch management information 510 is selected. Next, the creation necessity information of the data processing prefetch request creation setting 526 of the selected entry is changed to “Yes”. Note that the processing target may be controlled based on the processing priority 416 of the query management information 410.

次に、ロック管理情報480のロック待ちリスト488に、閾値以上の個数のクエリIDが格納されているエントリを選択する。そして、選択したエントリを、待ち数過多ページに対応するエントリとして把握する。ここで、待ち数過多ページとは、ロックの解放を待つクエリが多数存在するページである。   Next, an entry in which a number of query IDs equal to or greater than the threshold is stored in the lock waiting list 488 of the lock management information 480 is selected. Then, the selected entry is grasped as an entry corresponding to the excessive waiting number page. Here, an excessively waiting page is a page in which there are many queries waiting for the release of a lock.

そして、待ち数過多ページが存在するか否かを判定する(1507)。   Then, it is determined whether or not there is an excessive number of waiting pages (1507).

待ち数過多ページが存在しない場合、そのままステップ1509に進む。   If there is no excessive waiting page, the process proceeds to step 1509 as it is.

一方、待ち数過多ページが存在する場合、待ち過多数ページに対応してクエリの先読みデータ量を増加させる(1508)。当該待ち数過多ページに対応するエントリのロック取得トランザクションID486を抽出する。次に、抽出したトランザクションID486とクエリ管理情報410のトランザクションID414とが一致するエントリを、クエリ管理情報410から選択する。次に、選択したエントリの処理ステータス418に「ロック設定待ち」が格納されているか否かを判定する。   On the other hand, if there is an excessive waiting number page, the prefetch data amount of the query is increased corresponding to the waiting large number page (1508). The lock acquisition transaction ID 486 of the entry corresponding to the excessive waiting number page is extracted. Next, an entry in which the extracted transaction ID 486 matches the transaction ID 414 of the query management information 410 is selected from the query management information 410. Next, it is determined whether or not “wait for lock setting” is stored in the processing status 418 of the selected entry.

処理ステータス418に「ロック設定待ち」が格納されていない場合には、選択したエントリのクエリID412を把握する。   When “waiting for lock setting” is not stored in the processing status 418, the query ID 412 of the selected entry is grasped.

一方、処理ステータス418に「ロック設定待ち」が格納されている場合には、選択したエントリから対象リソース422を抽出する。次に、抽出した対象リソース422とロック管理情報480のページID482とが一致するエントリを、ロック管理情報480から選択する。次に、選択したエントリから、ロック取得トランザクションID486を抽出する。次に、抽出したロック取得トランザクションID486とクエリ管理情報410のトランザクションID414とが一致するエントリを、クエリ管理情報410から再度選択する。次に、選択したエントリの処理ステータス418に「ロック設定待ち」が格納されているか否かを判定する。   On the other hand, when “waiting for lock setting” is stored in the processing status 418, the target resource 422 is extracted from the selected entry. Next, an entry in which the extracted target resource 422 matches the page ID 482 of the lock management information 480 is selected from the lock management information 480. Next, the lock acquisition transaction ID 486 is extracted from the selected entry. Next, an entry in which the extracted lock acquisition transaction ID 486 matches the transaction ID 414 of the query management information 410 is selected again from the query management information 410. Next, it is determined whether or not “wait for lock setting” is stored in the processing status 418 of the selected entry.

処理ステータス418に「ロック設定待ち」が格納されていない場合になるまで、当該処理を繰り返す。そして、処理ステータス418に「ロック設定待ち」が格納されていない場合になると、当該エントリのクエリID412を把握する。   This process is repeated until “waiting for lock setting” is not stored in the process status 418. When “waiting for lock setting” is not stored in the processing status 418, the query ID 412 of the entry is grasped.

次に、把握したクエリID412と先読み管理情報510のクエリID512とが一致するエントリを、先読み管理情報510から選択する。次に、選択したエントリの先読みブロック数516の最大ブロック数を一定割合増加させる。   Next, an entry in which the grasped query ID 412 matches the query ID 512 of the prefetch management information 510 is selected from the prefetch management information 510. Next, the maximum number of prefetch blocks 516 of the selected entry is increased by a certain percentage.

次に、最大ブロック数の増加に合わせて、総先読み数管理情報501の総先読みブロック数504の割当値を更新する。なお、総先読みブロック数504の割当値が総先読みブロック数504の最大値を超える場合には、本ステップを実行しない。   Next, the allocation value of the total prefetch block number 504 in the total prefetch number management information 501 is updated in accordance with the increase in the maximum block number. If the assigned value of the total prefetch block number 504 exceeds the maximum value of the total prefetch block number 504, this step is not executed.

次に、総先読みブロック数504中の割当値と総先読みブロック数504の最大値との比を求める。次に、求めた比が閾値以下であるか否かを判定する。   Next, a ratio between the assigned value in the total prefetch block number 504 and the maximum value of the total prefetch block number 504 is obtained. Next, it is determined whether or not the obtained ratio is equal to or less than a threshold value.

そして、比が閾値以下であると、先読み管理情報510の先読みブロック数516の最大ブロック数を見直す(1509)。   If the ratio is less than or equal to the threshold, the maximum number of blocks of the number of prefetch blocks 516 in the prefetch management information 510 is reviewed (1509).

具体的には、先読み管理情報510の各エントリから、クエリID512を抽出する。次に、抽出したクエリIDとクエリ管理情報410のクエリID412とが一致するエントリを、クエリ管理情報410から選択する。次に、選択したエントリから、処理優先度416を抽出する。次に、抽出した処理優先度416によって規定されている割当ブロック数(規定割当ブロック数)を把握する。   Specifically, the query ID 512 is extracted from each entry of the prefetch management information 510. Next, an entry in which the extracted query ID matches the query ID 412 of the query management information 410 is selected from the query management information 410. Next, the processing priority 416 is extracted from the selected entry. Next, the number of allocation blocks defined by the extracted processing priority 416 (specified allocation block count) is grasped.

次に、先読み管理情報510の先読みブロック数516の割当て済みブロック数が規定割当ブロック数より小さい場合、当該先読みブロック数516の割当て済みブロック数を規定割当ブロック数に変更する。   Next, when the allocated block number of the prefetch block number 516 of the prefetch management information 510 is smaller than the specified allocation block number, the allocated block number of the prefetch block number 516 is changed to the specified allocation block number.

次に、ステップ1508と同様に、総先読みブロック数504の割当値を更新する。   Next, as in step 1508, the assigned value of the total number of prefetched blocks 504 is updated.

なお、総先読みブロック数504の割当値が、総先読みブロック数504の最大値を超える場合には、本ステップを実行しない。   If the assigned value of the total prefetch block number 504 exceeds the maximum value of the total prefetch block number 504, this step is not executed.

そして、一定時間スリープし(1510)、ステップ1502に戻る。   Then, it sleeps for a certain time (1510) and returns to step 1502.

一方、ステップ1503においてCPU利用率が過負荷閾値以上である状態が一定時間継続していると、処理優先度が低い処理の先読み処理を停止する(1521)。   On the other hand, if the state where the CPU usage rate is equal to or higher than the overload threshold value continues for a certain period of time in step 1503, the prefetch processing of the processing with low processing priority is stopped (1521).

具体的には、先読み管理情報510中の各エントリから、クエリID512を抽出する。次に、抽出したクエリID512とクエリ管理情報410のクエリID412とが一致するエントリを、クエリ管理情報410から選択する。次に、選択したエントリから、処理優先度416を抽出する。   Specifically, the query ID 512 is extracted from each entry in the prefetch management information 510. Next, an entry in which the extracted query ID 512 matches the query ID 412 of the query management information 410 is selected from the query management information 410. Next, the processing priority 416 is extracted from the selected entry.

次に、抽出した処理優先度416が事前に定められた優先度以下であるか否かを判定する。なお、CPU利用率に応じて、事前に定められた優先度を変化させてもよい。   Next, it is determined whether or not the extracted processing priority 416 is equal to or lower than a predetermined priority. Note that the priority set in advance may be changed according to the CPU usage rate.

抽出した処理優先度416が事前に定められた優先度以下であると、以下の処理を実施する。   If the extracted processing priority 416 is equal to or lower than a predetermined priority, the following processing is performed.

選択したエントリの実行確認値518に、新たなランダム値を格納する。次に、データ処理先読み要求作成設定528の作成要否情報に「Yes」が格納されているかどうかを確認する。作成要否情報に「Yes」が格納されている場合、当該作成要否情報を「Stop」に変更する。この確認処理を、すべての選択したエントリに対して行い、ステップ1507に進む。   A new random value is stored in the execution confirmation value 518 of the selected entry. Next, it is confirmed whether “Yes” is stored in the creation necessity information of the data processing prefetch request creation setting 528. When “Yes” is stored in the creation necessity information, the creation necessity information is changed to “Stop”. This confirmation process is performed for all selected entries, and the process proceeds to step 1507.

以上のように、本実施の形態では、計算機等の動作状態に応じて先読み処理を外部から制御する処理を設ける。これによって、先読み処理によるDBMS主処理への影響を軽減できるので、先読み動作を好適化できる。   As described above, in the present embodiment, a process for controlling the prefetching process from the outside according to the operating state of the computer or the like is provided. Thereby, the influence on the DBMS main process by the prefetch process can be reduced, so that the prefetch operation can be optimized.

(第2の実施の形態)
本発明の第2の実施の形態では、計算機システムにDBサーバ42が複数存在する。そして、それぞれのDBサーバ42で動作するDBMS60が協調することによって、一つの並列DBMSとして動作する。
(Second Embodiment)
In the second embodiment of the present invention, a plurality of DB servers 42 exist in the computer system. The DBMSs 60 operating on the respective DB servers 42 cooperate to operate as one parallel DBMS.

図19は、本発明の第2の実施の形態の計算機システムのブロック図である。   FIG. 19 is a block diagram of a computer system according to the second embodiment of this invention.

第2の実施の形態の計算機システムは、複数のDBサーバを備える。第2の実施の形態の計算機システムのそれ以外の構成は、第1の実施の形態の計算機システム(図1)と同一である。よって、同一の構成には同一の番号を付し、説明を省略する。   The computer system according to the second embodiment includes a plurality of DB servers. The other configuration of the computer system of the second embodiment is the same as that of the computer system (FIG. 1) of the first embodiment. Therefore, the same number is attached | subjected to the same structure and description is abbreviate | omitted.

APプログラム70は、事前に定められたDBサーバ42上で動作するDBMS60にクエリを発行する。なお、APプログラム70は、任意のDBサーバ42上で動作してもよい。   The AP program 70 issues a query to the DBMS 60 operating on the predetermined DB server 42. The AP program 70 may operate on any DB server 42.

異なるDBサーバ42で動作するDBMS60は、それぞれ異なるデータを管理する「Shared Nothing」型の並列DBMSである。そのため、スキーマ300のファイル管理情報350の構成が異なる。   The DBMSs 60 operating on different DB servers 42 are “Shared Noting” type parallel DBMSs that manage different data. Therefore, the configuration of the file management information 350 of the schema 300 is different.

図20は、本発明の第2の実施の形態のスキーマ300に含まれるファイル管理情報350の構成図である。   FIG. 20 is a configuration diagram of the file management information 350 included in the schema 300 according to the second embodiment of this invention.

ファイル管理情報350は、ファイルID352、ページサイズ354、ページ数356、ファイルパス358及びサーバID362を含む。   The file management information 350 includes a file ID 352, a page size 354, a page number 356, a file path 358, and a server ID 362.

なお、ファイルID352、ページサイズ354、ページ数356及びファイルパス358は、第1の実施の形態のファイル管理情報(図5D)の構成と同一である。よって、説明を省略する。   The file ID 352, the page size 354, the page number 356, and the file path 358 are the same as the configuration of the file management information (FIG. 5D) of the first embodiment. Therefore, the description is omitted.

サーバID362は、当該ファイルに記憶されているデータを管理するDBMS60が動作しているDBサーバ42の識別子である。   The server ID 362 is an identifier of the DB server 42 on which the DBMS 60 that manages data stored in the file is operating.

それぞれのDBサーバ42で動作しているDBMS60は、ネットワーク24を経由して相互に通信可能である。よって、複数のDBMS60は、同じクエリプラン600のコピーをそれぞれ保持する。そして、一つのクエリに対応する処理を分担して処理する。また、複数のDBMS60は、同一のスキーマ300及び同一の処理管理情報400を保持する。その一方で、各DBMS60は、それぞれ独立に共有バッファ64を管理する。   The DBMSs 60 operating on the respective DB servers 42 can communicate with each other via the network 24. Therefore, the plurality of DBMSs 60 each hold a copy of the same query plan 600. Then, the processing corresponding to one query is shared and processed. The plurality of DBMSs 60 hold the same schema 300 and the same process management information 400. On the other hand, each DBMS 60 manages the shared buffer 64 independently.

まず、APプログラム70は、一つのDBMS60にクエリを送信する。クエリを受信したDBMS60は、APプログラム70との通信処理及びクエリプランの作成処理を行う。そして、すべてのDBMSは、APプログラム70との通信処理及びクエリプランの作成処理以外の処理を、分担して実行する。   First, the AP program 70 transmits a query to one DBMS 60. The DBMS 60 that has received the query performs communication processing with the AP program 70 and query plan creation processing. All DBMSs share and execute processes other than the communication process with the AP program 70 and the query plan creation process.

本実施の形態では、ファイルごとにデータを管理するDBMS60が決定される。また、ページIDにはファイルに関する識別子を含む。そのため、ページIDに基づいて、処理すべきDBMS60が稼動するDBサーバ42を把握できる。   In the present embodiment, a DBMS 60 that manages data is determined for each file. The page ID includes an identifier related to the file. Therefore, the DB server 42 on which the DBMS 60 to be processed operates can be grasped based on the page ID.

データ処理部206及び先読み部208は、利用するデータを含むページのページIDとファイル管理情報350に基づいて、当該ページに関する処理を実行するDBMS60が稼動しているDBサーバ42を把握する。そして、把握したDBサーバ42に処理の実行を依頼する。   Based on the page ID of the page including the data to be used and the file management information 350, the data processing unit 206 and the prefetching unit 208 grasp the DB server 42 on which the DBMS 60 that executes processing related to the page is operating. Then, it requests the grasped DB server 42 to execute the process.

例えば、先読み要求管理情報540に新規エントリを追加する場合、追加する新規エントリのページID549に値を格納する必要がある。このとき、ページIDに基づいて把握したDBサーバ42に対して、先読み要求管理情報540の新規エントリの追加を依頼する。   For example, when a new entry is added to the prefetch request management information 540, it is necessary to store a value in the page ID 549 of the new entry to be added. At this time, the DB server 42 grasped based on the page ID is requested to add a new entry of the prefetch request management information 540.

なお、集計処理等のように、一台のDBサーバ42で実行すべき処理もある。これらの処理に関しては、処理を実行するDBサーバ42のサーバIDをクエリプラン600の処理詳細616に格納する。これによって、一台のDBサーバ42で実行すべき処理を適切に行うことができる
(第3の実施の形態)
本発明の第3の実施の形態では、第2の実施の形態と同様に、計算機システム内にDBサーバ42が複数存在する。そして、それぞれのDBサーバ42で動作するDBMS60が協調することによって、一つの並列DBMSとして動作する。
Note that there are processes that should be executed by a single DB server 42, such as a totaling process. Regarding these processes, the server ID of the DB server 42 that executes the process is stored in the process details 616 of the query plan 600. As a result, the processing to be executed by one DB server 42 can be appropriately performed (third embodiment).
In the third embodiment of the present invention, as in the second embodiment, a plurality of DB servers 42 exist in the computer system. The DBMSs 60 operating on the respective DB servers 42 cooperate to operate as one parallel DBMS.

ただし、第3の実施の形態では、第2の実施の形態と異なり、異なるDBサーバ42で動作しているDBMS60が、同じデータを処理可能な「Shared Disk」型の並列DBMSである。   However, in the third embodiment, unlike the second embodiment, the DBMS 60 operating on a different DB server 42 is a “Shared Disk” type parallel DBMS capable of processing the same data.

第3の実施の形態の計算機システムの構成は、第2の実施の形態の計算機システム(図19)と同一の構成であり、説明を省略する。   The configuration of the computer system according to the third embodiment is the same as the configuration of the computer system according to the second embodiment (FIG. 19), and a description thereof will be omitted.

また、第3の実施の形態では、異なるDBサーバ42上で動作するDBMS60が同じデータを処理できる。そのため、最新データを含むページを保有するDBサーバ42が時間に応じて変化する。   In the third embodiment, the DBMS 60 operating on different DB servers 42 can process the same data. Therefore, the DB server 42 that holds a page including the latest data changes according to time.

そこで、DBMS60は、最新ページ保有サーバ情報650を含む共有DBデータ管理情報450によって、データを管理する。   Therefore, the DBMS 60 manages data using the shared DB data management information 450 including the latest page possession server information 650.

図21は、本発明の第3の実施の形態の共有DBデータ管理情報450に含まれる最新ページ保有サーバ情報650の構成図である。   FIG. 21 is a configuration diagram of the latest page possession server information 650 included in the shared DB data management information 450 according to the third embodiment of this invention.

最新ページ保有サーバ情報650は、ページID651及びサーバID652を含む。   The latest page possession server information 650 includes a page ID 651 and a server ID 652.

ページID651は、管理対象となるページの一意な識別子である。サーバID652は、当該ページの最新データを保有するDBサーバ42の一意な識別子である。   The page ID 651 is a unique identifier of a page to be managed. The server ID 652 is a unique identifier of the DB server 42 that holds the latest data of the page.

最新ページ保有サーバ情報650は、最新ページを保有するDBサーバ42が変化する度に、更新される。   The latest page possession server information 650 is updated every time the DB server 42 that possesses the latest page changes.

DBMS60は、クエリプランを作成する際に、どのDBMS60がどのデータを処理すべきか決定する。そして、決定した内容を、処理管理情報400に含まれる処理分担情報660に格納する。   The DBMS 60 determines which data should be processed by which DBMS 60 when creating a query plan. Then, the determined content is stored in the process sharing information 660 included in the process management information 400.

図22は、本発明の第3の実施の形態の処理管理情報400に含まれる処理分担情報660の構成図である。   FIG. 22 is a configuration diagram of the process sharing information 660 included in the process management information 400 according to the third embodiment of this invention.

処理分担管理情報660は、ステップID661、分割条件662及びサーバID663を含む。   The process sharing management information 660 includes a step ID 661, a division condition 662, and a server ID 663.

ステップID661は、処理ステップの一意な識別子である。なお、一台のDBサーバ42がある処理ステップの結果を元に次の処理ステップを実行する場合には、次の処理ステップに対応するエントリは存在しない。   The step ID 661 is a unique identifier of the processing step. Note that when the next processing step is executed based on the result of a certain processing step, there is no entry corresponding to the next processing step.

分割条件662は、当該処理ステップにおける処理の分割方法を示す。なお、一台のDBサーバ42上で実行すべき動作に関しては、分割条件662には「全データ」が格納される。   The division condition 662 indicates a process division method in the processing step. Regarding the operation to be executed on one DB server 42, “all data” is stored in the division condition 662.

サーバID663は、当該処理ステップが実行されるDBサーバ42の一意な識別子である。   The server ID 663 is a unique identifier of the DB server 42 on which the processing step is executed.

データ処理部206が次の処理ステップにデータを展開する場合、又は、先読み部208が先読み要求管理情報540に次の処理ステップに関する新規エントリを割り当てる場合には、クエリプラン600の処理分担情報660に基づいて、処理を行うDBサーバ42を把握する。そして、把握したDBサーバ42に処理の実施を依頼する。   When the data processing unit 206 expands data to the next processing step, or when the prefetching unit 208 assigns a new entry related to the next processing step to the prefetching request management information 540, the processing sharing information 660 of the query plan 600 is assigned. Based on this, the DB server 42 that performs processing is grasped. Then, the grasped DB server 42 is requested to execute the processing.

本実施の形態では、APプログラム70は、一つのDBMS60にクエリを送信する。クエリを受信したDBMS60は、APプログラム70との通信処理及びクエリプランの作成処理を行う。そして、すべてのDBMSは、APプログラム70との通信処理及びクエリプランの作成処理以外の処理を、分担して実行する。   In the present embodiment, the AP program 70 transmits a query to one DBMS 60. The DBMS 60 that has received the query performs communication processing with the AP program 70 and query plan creation processing. All DBMSs share and execute processes other than the communication process with the AP program 70 and the query plan creation process.

共有DBデータ管理部210は、データ取得要求時処理(図14)のステップ1215において、最新ページ保有サーバ情報650を参照することによって、要求されたページの最新データを他のDBサーバ42が保有しているか否かを判定する。   In step 1215 of the data acquisition request processing (FIG. 14), the shared DB data management unit 210 refers to the latest page holding server information 650 so that the other DB server 42 holds the latest data of the requested page. It is determined whether or not.

他のDBサーバ42が保有している場合には、当該他のDBサーバ42上で動作するDBMS60の共有DBデータ管理部210に対して、当該ページの転送を要求する。   When the other DB server 42 holds, it requests the shared DB data management unit 210 of the DBMS 60 operating on the other DB server 42 to transfer the page.

すると、転送要求を受け取った共有DBデータ管理部210は、ロック管理情報480を参照することによって、転送を要求されたページにロックが設定されているかどうかを判定する。   Then, the shared DB data management unit 210 that has received the transfer request refers to the lock management information 480 to determine whether or not a lock is set on the page requested to be transferred.

ロックが設定されていない場合には、当該ページを要求先の共有DBデータ管理部210に送信する。一方、ロックが設定されている場合には、ロック管理情報480ロック待ちリスト488に当該処理に対応するクエリIDを追加する。   If the lock is not set, the page is transmitted to the shared DB data management unit 210 of the request destination. On the other hand, if a lock is set, a query ID corresponding to the process is added to the lock management information 480 lock wait list 488.

そして、ロックの取得が可能になると、要求されたページ及び当該ページに対応するロック待ちリスト488を要求先の共有DBデータ管理部210に送信する。   When the lock can be acquired, the requested page and the lock wait list 488 corresponding to the page are transmitted to the requested shared DB data management unit 210.

次に、当該ページを保持するブロックに対応するエントリを、バッファブロック管理情報460から削除する。   Next, the entry corresponding to the block holding the page is deleted from the buffer block management information 460.

ページの転送を要求した共有DBデータ管理部210は、ページを受信する。このとき、ページと共にロック待ちリストを受け取った場合、受け取ったロック待ちリストを、ロック管理情報480のロック待ちリスト488に格納する。その後、有DBデータ管理部210は、第一の実施の形態と同一の処理を行う。   The shared DB data management unit 210 that has requested the transfer of the page receives the page. At this time, when the lock wait list is received together with the page, the received lock wait list is stored in the lock wait list 488 of the lock management information 480. Thereafter, the DB data management unit 210 performs the same processing as in the first embodiment.

共有DBデータ管理部210は、データ参照要求時処理(図17)のステップ1316において、最新ページ保有サーバ情報650を参照することによって、要求されたページの最新データを他のDBサーバ42が保有しているか否かを判定する。   The shared DB data management unit 210 refers to the latest page holding server information 650 in step 1316 of the data reference request processing (FIG. 17), so that the other DB server 42 holds the latest data of the requested page. It is determined whether or not.

他のDBサーバ42が保有している場合には、当該他のDBサーバ42上で動作するDBMS60の共有DBデータ管理部210に対して、当該ページの転送を要求する。   When the other DB server 42 holds, it requests the shared DB data management unit 210 of the DBMS 60 operating on the other DB server 42 to transfer the page.

すると、転送要求を受け取った共有DBデータ管理部210は、要求されたページのデータ及び当該ページのロック状態を、要求元の共有DBデータ管理部210に即時に送信する。   Then, the shared DB data management unit 210 that has received the transfer request immediately transmits the requested page data and the lock state of the page to the requesting shared DB data management unit 210.

要求元の共有DBデータ管理部210は、受け取ったページにロックが設定されいるかいないかを判定する。   The requesting shared DB data management unit 210 determines whether a lock is set on the received page.

ロックが設定されていない場合、記憶装置46から読み出したページと同様に管理する。   When the lock is not set, management is performed in the same manner as the page read from the storage device 46.

一方、ロックが設定されている場合、当該ページを記憶装置46から読み出したページから分離して保持する。そして、先読み部208からデータの参照完了報告を受けると、当該データを即時に破棄する。つまり、ロックが設定されていない場合には、最新ページを保有するDBサーバ42が変化する。一方、ロックが設定されている場合には、最新ページを保有するDBサーバ42が変化しない。   On the other hand, when the lock is set, the page is held separately from the page read from the storage device 46. When the data reference completion report is received from the prefetch unit 208, the data is immediately discarded. That is, when the lock is not set, the DB server 42 that holds the latest page changes. On the other hand, when the lock is set, the DB server 42 that holds the latest page does not change.

本発明によると、計算機が有するメモリ量が少ない条件下でもDBMSが動作する計算機上で先読み部を効果的に動作させることができるようになる。そのため、DBMSによる問い合わせ処理の処理時間を短縮できる。特に、B−Tree形式の索引を利用した検索処理の処理時間を大幅に短縮できる。本発明は、一般的な計算機システムで利用されている構成を用いるため、広範囲な計算機システムに適用できる。計算機システムに適用することによって、データの先読みによる性能向上効果を得ることができる。   According to the present invention, the prefetch unit can be effectively operated on a computer on which a DBMS operates even under a condition where the computer has a small amount of memory. Therefore, it is possible to shorten the processing time of inquiry processing by the DBMS. In particular, the processing time of search processing using an index in the B-Tree format can be greatly shortened. Since the present invention uses a configuration used in a general computer system, it can be applied to a wide range of computer systems. By applying it to a computer system, it is possible to obtain a performance improvement effect by prefetching data.

本発明の第1の実施の形態の計算機システムのブロック図である。1 is a block diagram of a computer system according to a first embodiment of this invention. 本発明の第1の実施の形態のDBMSの機能の説明図である。It is explanatory drawing of the function of DBMS of the 1st Embodiment of this invention. 本発明の第1の実施の形態のグループにおけるブロック管理に利用するLRU管理リストの説明図である。It is explanatory drawing of the LRU management list utilized for the block management in the group of the 1st Embodiment of this invention. 本発明の第1の実施の形態のDBMSにおけるクエリプランの説明図である。It is explanatory drawing of the query plan in DBMS of the 1st Embodiment of this invention. 本発明の第1の実施の形態のスキーマに含まれる表定義情報の構成図である。It is a block diagram of the table definition information contained in the schema of the 1st Embodiment of this invention. 本発明の第1の実施の形態のスキーマに含まれる索引定義情報の構成図である。It is a block diagram of the index definition information contained in the schema of the 1st Embodiment of this invention. 本発明の第1の実施の形態のスキーマに含まれるオブジェクト管理情報の構成図である。It is a block diagram of the object management information contained in the schema of the 1st Embodiment of this invention. 本発明の第1の実施の形態のスキーマに含まれるファイル管理情報の構成図である。It is a block diagram of the file management information contained in the schema of the 1st Embodiment of this invention. 本発明の第1の実施の形態の処理管理情報に含まれるクエリ管理情報の構成図である。It is a block diagram of the query management information contained in the process management information of the 1st Embodiment of this invention. 本発明の第1の実施の形態の処理管理情報に含まれるトランザクション管理情報の構成図である。It is a block diagram of the transaction management information contained in the process management information of the 1st Embodiment of this invention. 本発明の第1の実施の形態の処理管理情報に含まれるクエリプランの構成図である。It is a block diagram of the query plan contained in the process management information of the 1st Embodiment of this invention. 本発明の第1の実施の形態の共有DBデータ管理情報に含まれる共有バッファ定義情報の構成図である。FIG. 3 is a configuration diagram of shared buffer definition information included in shared DB data management information according to the first embodiment of this invention. 本発明の第1の実施の形態の共有DBデータ管理情報に含まれるバッファブロック管理情報の構成図である。FIG. 3 is a configuration diagram of buffer block management information included in shared DB data management information according to the first embodiment of this invention. 本発明の第1の実施の形態の共有DBデータ管理情報に含まれるバッファグループ管理情報の構成図である。It is a block diagram of the buffer group management information included in the shared DB data management information according to the first embodiment of this invention. 本発明の第1の実施の形態の共有DBデータ管理情報に含まれるロック管理情報の構成図である。It is a block diagram of the lock management information included in the shared DB data management information according to the first embodiment of this invention. 本発明の第1の実施の形態の共有DBデータ管理情報に含まれるI/O待ち管理情報の構成図である。It is a block diagram of the I / O waiting management information included in the shared DB data management information according to the first embodiment of this invention. 本発明の第1の実施の形態の先読み処理情報に含まれる総先読み数管理情報の構成図である。It is a block diagram of the total prefetch number management information contained in the prefetch process information of the 1st Embodiment of this invention. 本発明の第1の実施の形態の先読み処理情報に含まれる先読み管理情報の構成図である。It is a block diagram of the prefetch management information contained in the prefetch process information of the 1st Embodiment of this invention. 本発明の第1の実施の形態の先読み処理情報に含まれる先読み要求管理情報の構成図である。It is a block diagram of the prefetch request management information contained in the prefetch process information of the 1st Embodiment of this invention. 本発明の第1の実施の形態のDBMSのクエリ処理のフローチャートである。It is a flowchart of DBMS query processing according to the first embodiment of this invention. 本発明の第1の実施の形態の実行管理部の先読み管理情報設定処理のフローチャートである。It is a flowchart of the prefetch management information setting process of the execution management part of the 1st Embodiment of this invention. 本発明の第1の実施の形態のデータ処理部のデータ処理のフローチャートである。It is a flowchart of the data processing of the data processing part of the 1st Embodiment of this invention. 本発明の第1の実施の形態のデータ処理部の先読み要求設定処理のフローチャートである。It is a flowchart of the prefetch request | requirement setting process of the data processing part of the 1st Embodiment of this invention. 本発明の第1の実施の形態の共有DBデータ管理部のデータ取得要求時処理のフローチャートである。It is a flowchart of the data acquisition request processing of the shared DB data management unit according to the first embodiment of this invention. 本発明の第1の実施の形態の先読み部の先読み処理管理ループ処理のフローチャートである。It is a flowchart of the prefetch process management loop process of the prefetch part of the 1st Embodiment of this invention. 本発明の第1の実施の形態の先読み部の先読み実処理スレッドのフローチャートである。It is a flowchart of the prefetch real process thread of the prefetch part of the 1st Embodiment of this invention. 本発明の第1の実施の形態の共有DBデータ管理部のデータ参照要求時処理のフローチャートである。It is a flowchart of the process at the time of a data reference request | requirement of the shared DB data management part of the 1st Embodiment of this invention. 本発明の第1の実施の形態の実行管理部の実行管理部ループ処理のフローチャートである。It is a flowchart of the execution management part loop process of the execution management part of the 1st Embodiment of this invention. 本発明の第2の実施の形態の計算機システムのブロック図である。It is a block diagram of a computer system according to a second embodiment of this invention. 本発明の第2の実施の形態のスキーマに含まれるファイル管理情報の構成図である。It is a block diagram of the file management information contained in the schema of the 2nd Embodiment of this invention. 本発明の第3の実施の形態の共有DBデータ管理情報に含まれる最新ページ保有サーバ情報の構成図である。It is a block diagram of the newest page possession server information contained in the shared DB data management information of the 3rd Embodiment of this invention. 本発明の第3の実施の形態の処理管理情報に含まれる処理分担情報の構成図である。It is a block diagram of the process share information contained in the process management information of the 3rd Embodiment of this invention.

符号の説明Explanation of symbols

12 CPU
14 メモリ
16 HDD
18 CD−ROMドライブ
20 内部バス
22 ネットワークI/F
24 ネットワーク
32 I/OパスI/F
34 I/Oパス
42 DBサーバ
44 APサーバ
46 記憶装置
52 OS
60 DBMS
62 共有管理情報
64 共有バッファ
70 APプログラム
80 内部バス
82 CPU
84 メモリ
86 HDD
85 ネットワークI/F
202 クライアント処理部
204 実行管理部
206 データ処理部
208 先読み部
210 共有DBデータ管理部
12 CPU
14 Memory 16 HDD
18 CD-ROM drive 20 Internal bus 22 Network I / F
24 Network 32 I / O path I / F
34 I / O path 42 DB server 44 AP server 46 Storage device 52 OS
60 DBMS
62 Shared management information 64 Shared buffer 70 AP program 80 Internal bus 82 CPU
84 Memory 86 HDD
85 Network I / F
202 Client processing unit 204 Execution management unit 206 Data processing unit 208 Prefetch unit 210 Shared DB data management unit

Claims (13)

データベース管理システムプログラムをメモリに記憶する計算機と、データを記憶する記憶装置と、を含む計算機システムにおいて、
前記計算機は、
前記メモリ上にバッファを割り当て、
前記バッファを管理する共有DBデータ管理部と、要求されたデータを取得するデータ処理部と、前記バッファに格納されているデータを参照してデータを先読みする先読み部と、を有し、
前記共有DBデータ管理部は、前記データ処理部がデータを取得する際に、前記バッファ内のデータをロックすることを特徴とする計算機システム。
In a computer system including a computer that stores a database management system program in a memory and a storage device that stores data,
The calculator is
Allocate a buffer on the memory,
A shared DB data management unit that manages the buffer; a data processing unit that acquires requested data; and a prefetch unit that prefetches data with reference to data stored in the buffer;
The shared DB data management unit locks data in the buffer when the data processing unit acquires data.
前記共有DBデータ管理部は、前記先読み部が先読みする際に、前記バッファ内のすべてのデータを当該先読み部が参照できるようにすることを特徴とする請求項1に記載の計算機システム。   The computer system according to claim 1, wherein the shared DB data management unit enables the prefetching unit to refer to all data in the buffer when the prefetching unit prefetches. 前記計算機を複数含むことを特徴とする請求項1に記載の計算機システム。   The computer system according to claim 1, comprising a plurality of the computers. 前記計算機は、前記先読み部を制御する実行管理部を有し、
前記実行管理部は、実行パラメータを前記先読み部に設定し、
前記先読み部は、前記設定された実行パラメータに基づいて、先読みすることを特徴とする請求項1に記載の計算機システム。
The computer has an execution management unit that controls the prefetching unit,
The execution management unit sets an execution parameter in the prefetch unit,
The computer system according to claim 1, wherein the prefetching unit prefetches based on the set execution parameter.
前記実行管理部は、
前記計算機のCPUの利用率を取得し、
取得したCPUの利用率に応じた実行パラメータを前記先読み部に設定することを特徴とする請求項4に記載の計算機システム。
The execution management unit
Obtain the CPU usage rate of the computer,
The computer system according to claim 4, wherein an execution parameter corresponding to the acquired usage rate of the CPU is set in the prefetching unit.
前記実行管理部は、
前記バッファ内のデータのロック状態を取得し、
取得したロック状態に応じた実行パラメータを前記先読み部に設定することを特徴とする請求項4に記載の計算機システム。
The execution management unit
Get the lock status of the data in the buffer;
The computer system according to claim 4, wherein execution parameters corresponding to the acquired lock state are set in the prefetch unit.
前記先読み部は、複数のデータを並列して先読みすることを特徴とする請求項1に記載の計算機システム。   The computer system according to claim 1, wherein the prefetch unit prefetches a plurality of data in parallel. 計算機で実行されることによって、記憶装置に格納されているデータを管理するデータベース管理システムプログラムであって、
前記計算機のメモリ上にバッファを割当てる処理と、
前記バッファを管理する処理と、
前記バッファに格納されているデータを参照してデータを先読みする処理と、
データを要求されると、前記バッファ内のデータをロックしながら、要求されたデータを取得する処理と、を含むことを特徴とするデータベース管理システムプログラム。
A database management system program for managing data stored in a storage device by being executed by a computer,
A process of allocating a buffer on the memory of the computer;
A process for managing the buffer;
A process of prefetching data with reference to the data stored in the buffer;
And a process of acquiring the requested data while locking the data in the buffer when the data is requested.
さらに、前記先読みの処理の際に、前記バッファ内のすべてのデータを参照できるようにする処理を含むことを特徴とする請求項8に記載のデータベース管理システムプログラム。   The database management system program according to claim 8, further comprising a process for making it possible to refer to all data in the buffer during the prefetching process. さらに、実行パラメータを設定する処理と、
前記設定された実行パラメータに基づいて、データを先読みする処理と、を含むことを特徴とする請求項8に記載のデータベース管理システムプログラム。
Furthermore, a process for setting execution parameters,
The database management system program according to claim 8, further comprising: prefetching data based on the set execution parameter.
さらに、前記計算機のCPUの利用率を取得する処理と、
前記取得したCPUの利用率に応じた実行パラメータを設定する処理と、を含むことを特徴とする請求項10に記載のデータベース管理システムプログラム。
Further, a process for acquiring the utilization rate of the CPU of the computer;
The database management system program according to claim 10, further comprising a process of setting an execution parameter in accordance with the acquired CPU usage rate.
さらに、前記バッファ内のデータのロック状態を取得する処理と、
前記取得したロック状態に応じた実行パラメータを設定する処理と、を含むことを特徴とする請求項10に記載のデータベース管理システムプログラム。
A process of acquiring a lock state of the data in the buffer;
The database management system program according to claim 10, further comprising: setting an execution parameter according to the acquired lock state.
さらに、複数のデータを並列して先読みする処理を含むことを特徴とする請求項8に記載のデータベース管理システムプログラム。   The database management system program according to claim 8, further comprising a process of prefetching a plurality of data in parallel.
JP2005251111A 2005-08-31 2005-08-31 Computer system and database management system program Expired - Fee Related JP5261809B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2005251111A JP5261809B2 (en) 2005-08-31 2005-08-31 Computer system and database management system program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2005251111A JP5261809B2 (en) 2005-08-31 2005-08-31 Computer system and database management system program

Related Child Applications (1)

Application Number Title Priority Date Filing Date
JP2011224911A Division JP5098120B2 (en) 2011-10-12 2011-10-12 Computer system and database management system program

Publications (2)

Publication Number Publication Date
JP2007065978A true JP2007065978A (en) 2007-03-15
JP5261809B2 JP5261809B2 (en) 2013-08-14

Family

ID=37928116

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2005251111A Expired - Fee Related JP5261809B2 (en) 2005-08-31 2005-08-31 Computer system and database management system program

Country Status (1)

Country Link
JP (1) JP5261809B2 (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010015556A (en) * 2008-07-02 2010-01-21 Sap Portals Israel Ltd Method and device for transaction processing conscious of distributed application context
JP4747307B2 (en) * 2007-11-09 2011-08-17 富士通株式会社 Network processing control device, program, and method
US8335804B2 (en) 2010-03-29 2012-12-18 International Business Machines Corporation Adaptive relational database access
WO2013161080A1 (en) * 2012-04-27 2013-10-31 株式会社日立製作所 Database management system, computer, and database management method
WO2013161076A1 (en) * 2012-04-27 2013-10-31 株式会社日立製作所 Database management system, computer, and database management method
WO2013161081A1 (en) * 2012-04-27 2013-10-31 株式会社日立製作所 Database management system, computer, and database management method

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH02230373A (en) * 1988-05-19 1990-09-12 Hitachi Ltd Data base processing system
JPH0373036A (en) * 1989-05-29 1991-03-28 Hitachi Ltd Buffer managing method
JPH0765019A (en) * 1993-08-30 1995-03-10 Hitachi Ltd Data base service method and service controller using same method
JP2003150419A (en) * 2001-11-14 2003-05-23 Hitachi Ltd Storage device having means for obtaining execution information of database management system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH02230373A (en) * 1988-05-19 1990-09-12 Hitachi Ltd Data base processing system
JPH0373036A (en) * 1989-05-29 1991-03-28 Hitachi Ltd Buffer managing method
JPH0765019A (en) * 1993-08-30 1995-03-10 Hitachi Ltd Data base service method and service controller using same method
JP2003150419A (en) * 2001-11-14 2003-05-23 Hitachi Ltd Storage device having means for obtaining execution information of database management system

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4747307B2 (en) * 2007-11-09 2011-08-17 富士通株式会社 Network processing control device, program, and method
US8032679B2 (en) 2007-11-09 2011-10-04 Fujitsu Limited Device and method for controlling network processing mode, and non-transitory computer-readable medium recording program for controlling network processing mode
JP2010015556A (en) * 2008-07-02 2010-01-21 Sap Portals Israel Ltd Method and device for transaction processing conscious of distributed application context
US8335804B2 (en) 2010-03-29 2012-12-18 International Business Machines Corporation Adaptive relational database access
US9659036B2 (en) 2010-03-29 2017-05-23 International Business Machines Corporation Adaptive relational database access
WO2013161081A1 (en) * 2012-04-27 2013-10-31 株式会社日立製作所 Database management system, computer, and database management method
WO2013161076A1 (en) * 2012-04-27 2013-10-31 株式会社日立製作所 Database management system, computer, and database management method
JPWO2013161076A1 (en) * 2012-04-27 2015-12-21 株式会社日立製作所 Database management system, computer, database management method
JPWO2013161081A1 (en) * 2012-04-27 2015-12-21 株式会社日立製作所 Database management system, computer, database management method
US9639576B2 (en) 2012-04-27 2017-05-02 Hitachi, Ltd. Database management system, computer, and database management method
WO2013161080A1 (en) * 2012-04-27 2013-10-31 株式会社日立製作所 Database management system, computer, and database management method
US9842136B2 (en) 2012-04-27 2017-12-12 Hitachi, Ltd. Database management system, computer, and database management method
US10417227B2 (en) 2012-04-27 2019-09-17 Hitachi, Ltd. Database management system, computer, and database management method
US11636107B2 (en) 2012-04-27 2023-04-25 Hitachi, Ltd. Database management system, computer, and database management method

Also Published As

Publication number Publication date
JP5261809B2 (en) 2013-08-14

Similar Documents

Publication Publication Date Title
JP4162184B2 (en) Storage device having means for acquiring execution information of database management system
JP4313068B2 (en) Cache management method for storage device
JP4116413B2 (en) Prefetch appliance server
Levandoski et al. High performance transactions in deuteronomy
EP2478442B1 (en) Caching data between a database server and a storage system
US9268702B2 (en) Storage I/O path partitioning to eliminate I/O interference in consolidated servers
US5987477A (en) Parallel file system and method for parallel write sharing
US7089347B2 (en) Computer system for managing performances of storage apparatus and performance management method of the computer system
JP4288978B2 (en) Data prefetching method
US7873791B1 (en) Methods and systems for incorporating improved tail cutting in a prefetch stream in TBC mode for data storage having a cache memory
EP2541423B1 (en) Replacement policy for resource container
JP5261809B2 (en) Computer system and database management system program
JP2000284995A (en) Data processor and recording medium
JPH09503328A (en) Computer method and apparatus for performing asynchronously ordered operations
JP2006277545A (en) Computer system, storage device system and write processing control method
JP5098120B2 (en) Computer system and database management system program
An et al. Avoiding read stalls on flash storage
JP4189342B2 (en) Storage apparatus, storage controller, and write-back cache control method
An et al. Your read is our priority in flash storage
Chen et al. Architectural support for nvram persistence in gpus
Raza et al. One-shot Garbage Collection for In-memory OLTP through Temporality-aware Version Storage
JP5147296B2 (en) Computer system, database management method and program
Shen et al. Ditto: An elastic and adaptive memory-disaggregated caching system
KR20210058613A (en) Locking method for parallel i/o of a single file in non-volatiel memeroy file system and computing device implementing the same
JP4486384B6 (en) DB linkage prefetch system

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20080404

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20110120

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20110208

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20110411

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20110712

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20111012

A911 Transfer to examiner for re-examination before appeal (zenchi)

Free format text: JAPANESE INTERMEDIATE CODE: A911

Effective date: 20111107

RD03 Notification of appointment of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7423

Effective date: 20120418

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20130411

R150 Certificate of patent or registration of utility model

Ref document number: 5261809

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

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