JP2012247901A - Database management method, database management device, and program - Google Patents

Database management method, database management device, and program Download PDF

Info

Publication number
JP2012247901A
JP2012247901A JP2011117730A JP2011117730A JP2012247901A JP 2012247901 A JP2012247901 A JP 2012247901A JP 2011117730 A JP2011117730 A JP 2011117730A JP 2011117730 A JP2011117730 A JP 2011117730A JP 2012247901 A JP2012247901 A JP 2012247901A
Authority
JP
Japan
Prior art keywords
memory
database
memory area
index
buffer
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.)
Withdrawn
Application number
JP2011117730A
Other languages
Japanese (ja)
Inventor
Toru Kawashima
徹 河島
Koji Kinami
孝治 木浪
Toru Shimotori
亨 霜鳥
Akihito Wakisaka
彰人 脇坂
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hitachi Ltd
Original Assignee
Hitachi Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP2011117730A priority Critical patent/JP2012247901A/en
Publication of JP2012247901A publication Critical patent/JP2012247901A/en
Withdrawn legal-status Critical Current

Links

Images

Landscapes

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

Abstract

PROBLEM TO BE SOLVED: To quickly secure the memory zone of an in-memory-type database while effectively using a memory capacity used by a hybrid-type database.SOLUTION: In a database management method for a computer including a processor, memory and a storage device to control an in-memory DB and a disk DB, where the former DB stores a table and an index in a first memory zone of memory, and the latter DB stores a part of a table and an index that are stored in a second memory zone of the memory, the computer performs the steps of: selecting, when an event that the first memory zone of the in-memory DB is in shortage is detected, a target to be deleted from the table or index stored in the second memory zone of the disk DB; deleting the table or index selected as a target of deletion from the second memory zone; and releasing the zone of the table or index deleted from the second memory zone to add the released zone to the first memory zone.

Description

本発明は、主記憶上にデータを配置するインメモリ型データベースと、ストレージ装置に格納したデータの一部を主記憶上のバッファ領域に配置するストレージ型データベースをひとつのデータベース管理システムで制御するデータベースに関する。   The present invention relates to an in-memory database that arranges data on a main memory and a database that controls a storage database that arranges a part of data stored in a storage device in a buffer area on the main memory with a single database management system. About.

従来から、ディスクドライブ等で構成されたストレージ装置にデータを格納し、計算機の主記憶上にバッファ領域(またはキャッシュ領域)を設け、計算機がアクセス要求を受け付けたデータをバッファ領域(以下、DBバッファとする)に読み込んで、再利用または更新を行うディスク型(オンディスク)データベース(DB)が広く普及している。   Conventionally, data is stored in a storage device composed of a disk drive or the like, a buffer area (or cache area) is provided on the main memory of the computer, and data that the computer has received an access request is stored in a buffer area (hereinafter referred to as a DB buffer). Disk type (on-disk) databases (DB) that are reused or updated are widely used.

近年、半導体製造技術の向上などにより、大容量のメモリを搭載した計算機が普及しつつあり、ストレージ装置に代わって主記憶上にデータを配置して高速にアクセスを行うインメモリ型データベースが知られている。   In recent years, computers equipped with large-capacity memories are becoming widespread due to improvements in semiconductor manufacturing technology, etc., and in-memory databases that place data on main memory and perform high-speed access instead of storage devices are known. ing.

一方、ストレージ装置とDBバッファを用いるディスク型データベースにおいても高速化が検討されており、DBバッファを複数の領域に分割し、リクエストに対する応答時間に基づいて動的に分割比率を変更するものが知られている(例えば、特許文献1)。特許文献1では、DBバッファ内を複数の領域に分割し、分割領域毎に応答時間を維持するように分割比率を決定している。   On the other hand, disk-type databases using storage devices and DB buffers are also being considered for speeding up, and it is known that the DB buffer is divided into a plurality of areas and the division ratio is dynamically changed based on the response time to the request. (For example, Patent Document 1). In Patent Document 1, the DB buffer is divided into a plurality of areas, and the division ratio is determined so as to maintain the response time for each divided area.

上記従来のインメモリ型データベースでは、有限の主記憶上にデータを配置するため、取り扱うデータの数やサイズに限りがある。このため、インメモリ型データベースの管理部と、ディスク型データベースの管理部を組み合わせたハイブリッド型データベースが提案されている。ハイブリッド型データベースでは、インメモリ型データベースで高速にアクセスするデータを管理し、レガシーなデータベースで主記憶の容量に制限されない大量のデータを管理する。   In the conventional in-memory database, since data is arranged on a finite main memory, the number and size of data to be handled are limited. For this reason, a hybrid database combining an in-memory database management unit and a disk database management unit has been proposed. In the hybrid database, data that is accessed at high speed is managed by the in-memory database, and a large amount of data that is not limited by the capacity of the main memory is managed by the legacy database.

特開2005−327138号公報JP 2005-327138 A

しかしながら、上記従来のハイブリッド型データベースでは、インメモリ型データベースが使用する領域と、ディスク型データベースが使用するDBバッファの領域を、データベース管理システムが主記憶上にそれぞれ設定する。データベース管理システムは、主記憶上に設定された領域のサイズを上限としてインメモリ型データベースの領域と、ディスク型データベースのDBバッファを配置して、データのアクセスを行う。   However, in the conventional hybrid database, the database management system sets the area used by the in-memory database and the area of the DB buffer used by the disk database on the main memory. The database management system accesses the data by arranging an in-memory database area and a disk database DB buffer with the size of the area set on the main memory as an upper limit.

インメモリ型データベースにアクセスが集中した場合や、インメモリ型データベースの表にデータを追加するために領域が不足する場合には、予め用意しておいた領域をインメモリ型データベースの領域に加える必要がある。   If access is concentrated in the in-memory database, or if there is not enough space to add data to the table in the in-memory database, it is necessary to add the prepared area to the in-memory database area. There is.

このため、従来のハイブリッド型データベースでは、インメモリ型データベースが使用する領域を拡張するため、主記憶に予め記憶領域を確保しておく必要があり、計算機資源を有効に利用できない、という問題があった。   For this reason, in the conventional hybrid database, since the area used by the in-memory database is expanded, it is necessary to secure a storage area in the main memory in advance, and there is a problem that computer resources cannot be used effectively. It was.

そこで本発明は、ハイブリッド型データベースが使用する主記憶の容量を有効に利用しながらも、インメモリ型データベースのデータ量が増大する場合でも、迅速にインメモリ型データベースのメモリ領域を確保することを目的とする。   Therefore, the present invention is intended to quickly secure a memory area of an in-memory database even when the amount of data in the in-memory database increases while effectively utilizing the capacity of the main memory used by the hybrid database. Objective.

本発明は、プロセッサとメモリとストレージ装置に接続されたインターフェースを備えた計算機で、前記メモリ上の第1のメモリ領域に表とインデックスを格納するインメモリデータベースと、前記メモリ上の第2のメモリ領域に前記ストレージ装置に格納された表の一部とインデクスを格納するディスク型データベースと、を制御するデータベースの管理方法であって、前記計算機が、前記インメモリ型データベースの第1のメモリ領域が不足することを検知する第1のステップと、前記計算機が、第1のメモリ領域が不足することを検知したときに、前記ディスク型データベースの第2のメモリ領域に格納された表またはインデクスから削除する対象を選択する第2のステップと、前記計算機が、前記削除する対象として選択された表またはインデクスを前記第2のメモリ領域から削除する第3のステップと、前記計算機が、前記第2のメモリ領域から削除された表またはインデクスの領域を解放して、当該解放した領域を前記第1のメモリ領域に付加する第4のステップと、を含む。   The present invention provides a computer having an interface connected to a processor, a memory, and a storage device, an in-memory database that stores a table and an index in a first memory area on the memory, and a second memory on the memory A database management method for controlling a part of a table stored in the storage device and a disk database for storing an index in an area, wherein the computer has a first memory area of the in-memory database A first step of detecting an insufficiency; and when the computer detects an insufficiency of the first memory area, it is deleted from the table or index stored in the second memory area of the disk database A second step of selecting an object to be deleted, and a table selected by the computer as the object to be deleted. A third step of deleting the index from the second memory area, and the computer releases the table or index area deleted from the second memory area, and releases the released area to the first memory area. And a fourth step of adding to the memory area.

したがって、本発明は、メモリの容量を有効に利用しながらも、インメモリ型データベースのデータ量が増大する場合には、迅速にインメモリ型データベースが使用するメモリ領域を拡張することができる。   Therefore, according to the present invention, the memory area used by the in-memory database can be quickly expanded when the data amount of the in-memory database increases while effectively using the memory capacity.

本発明の実施形態を示し、計算機システムの一例を示すブロック図である。It is a block diagram which shows embodiment of this invention and shows an example of a computer system. 本発明の実施形態を示し、データベース管理システムで行われるメモリ操作の概要を示す図である。It is a figure which shows embodiment of this invention and shows the outline | summary of the memory operation performed with a database management system. 本発明の実施形態を示し、データベース管理システムで行われるメモリ操作の一例を示すフローチャートである。It is a flowchart which shows embodiment of this invention and shows an example of memory operation performed with a database management system. 本発明の実施形態を示し、図3のステップS600で行われるDBバッファ解放対象の決定処理の一例を示すフローチャートである。4 is a flowchart illustrating an example of DB buffer release target determination processing performed in step S600 of FIG. 3 according to the embodiment of this invention. 本発明の実施形態を示し、図3のステップS660、図4のステップS604、S609で行われる解放操作リストの計算処理の一例を示すフローチャートである。6 is a flowchart illustrating an example of a release operation list calculation process performed in step S660 of FIG. 3 and steps S604 and S609 of FIG. 4 according to the embodiment of this invention. 本発明の実施形態を示し、図3のステップS700で行われるDBバッファ解放操作の一例を示すフローチャートである。4 is a flowchart illustrating an example of a DB buffer release operation performed in step S700 of FIG. 3 according to the embodiment of this invention. 本発明の実施形態を示し、表情報の一例を示す図である。It is a figure which shows embodiment of this invention and shows an example of table | surface information. 本発明の実施形態を示し、インデクス情報の一例を示す図である。It is a figure which shows embodiment of this invention and shows an example of index information. 本発明の実施形態を示し、メモリ領域情報の一例を示す図である。It is a figure which shows embodiment of this invention and shows an example of memory area information. 本発明の実施形態を示し、表アクセス頻度情報の一例を示す図である。It is a figure which shows embodiment of this invention and shows an example of table access frequency information. 本発明の実施形態を示し、DBバッファ解放対象リストの一例を示す図である。It is a figure which shows embodiment of this invention and shows an example of DB buffer release object list. 本発明の実施形態を示し、DBバッファ解放操作リストの一例を示す図である。It is a figure which shows embodiment of this invention and shows an example of DB buffer release operation list.

以下、本発明の一実施形態を添付図面に基づいて説明する。   Hereinafter, an embodiment of the present invention will be described with reference to the accompanying drawings.

図1は、本発明の実施形態におけるハイブリッド型データベースを提供する計算機システムの構成の一例を示すブロック図である。計算機システムは、データベース管理装置2100と、管理者などが利用する端末装置2140と、データベースのユーザが利用するクライアント端末装置2160と、データベース管理装置2100と端末装置2140及びクライアント端末装置2160を接続するネットワーク2150と、データベース管理装置2100に接続されてデータやプログラムを格納する外部記憶装置2200から構成される。   FIG. 1 is a block diagram showing an example of the configuration of a computer system that provides a hybrid database according to an embodiment of the present invention. The computer system includes a database management device 2100, a terminal device 2140 used by an administrator, a client terminal device 2160 used by a database user, and a network connecting the database management device 2100, the terminal device 2140, and the client terminal device 2160. 2150 and an external storage device 2200 that is connected to the database management device 2100 and stores data and programs.

データベース管理装置2100は、プロセッサ2102と主記憶装置2104とネットワークインターフェース2101と外部記憶装置入出力インターフェース2103とを備えた計算機で構成されて、インメモリ型データベースとディスク型(オンディスク)データベースからなるハイブリッド型データベースを提供する。   The database management device 2100 is composed of a computer having a processor 2102, a main storage device 2104, a network interface 2101, and an external storage device input / output interface 2103, and is a hybrid comprising an in-memory type database and a disk type (on-disk) database. Provides a type database.

ネットワークインターフェース2101は、ネットワーク2150に接続されて端末装置2140やクライアント端末装置2160と通信を行う。   The network interface 2101 is connected to the network 2150 and communicates with the terminal device 2140 and the client terminal device 2160.

外部記憶装置入出力インターフェース2103は、外部記憶装置2200に接続されており、プロセッサ2102からの指令に応じて外部記憶装置2200との間でデータの読み書きや、プログラムの読み込みを行う。外部記憶装置2200は、ディスクドライブや不揮発性の半導体記憶装置を含むストレージ装置で構成される。   The external storage device input / output interface 2103 is connected to the external storage device 2200, and reads / writes data and reads programs from / to the external storage device 2200 in response to a command from the processor 2102. The external storage device 2200 includes a storage device including a disk drive and a nonvolatile semiconductor storage device.

外部記憶装置2200には、上記データベース管理装置2100が提供するディスク型データベースのデータ(表情報8010、インデクス情報8020)1001と、インメモリ型データベース(またはディスク型データベース)の定義情報等が格納される。なお、データベース管理装置2100の停止中は、外部記憶装置2200にインメモリ型データベースのデータを格納する。外部記憶装置2200はネットワークを介してデータベース管理装置2100に接続されるNAS等の装置で構成してもよい。   The external storage device 2200 stores disk database data (table information 8010, index information 8020) 1001 provided by the database management device 2100, definition information of the in-memory database (or disk database), and the like. . Note that in-memory database data is stored in the external storage device 2200 while the database management device 2100 is stopped. The external storage device 2200 may be configured by a device such as NAS connected to the database management device 2100 via a network.

データベース管理装置2100のプロセッサ2102は、インメモリ型データベースとディスク型(オンディスク)データベースを提供するデータベース管理システム2110を実行する。データベース管理システム2110は外部記憶装置2200の所定の領域(図示省略)に格納されたプログラムで構成され、プロセッサ2102が主記憶装置2104へ当該プログラムを読み込んでから実行される。なお、外部記憶装置2200はデータベース管理システム2110のプログラムを格納する記憶媒体としても機能する。   The processor 2102 of the database management apparatus 2100 executes a database management system 2110 that provides an in-memory database and a disk (on-disk) database. The database management system 2110 is constituted by a program stored in a predetermined area (not shown) of the external storage device 2200, and is executed after the processor 2102 reads the program into the main storage device 2104. The external storage device 2200 also functions as a storage medium for storing the program of the database management system 2110.

データベース管理システム2110は、主記憶装置2104上に、インメモリ型データベースのメモリ領域2120と、ディスク型データベースのデータを入出力するためのバッファ領域(以下、DBバッファ)2130と、DBバッファ2130の表やインデクスなどを管理する表・インデクス情報8040と、インメモリ型データベースのメモリ領域2120の設定に関するメモリ領域情報8050を格納する。   The database management system 2110 includes a memory area 2120 of an in-memory database, a buffer area (hereinafter referred to as a DB buffer) 2130 for inputting / outputting data of a disk database, and a table of the DB buffer 2130 on the main storage device 2104. Table / index information 8040 for managing data and indexes, and memory area information 8050 relating to the setting of the memory area 2120 of the in-memory database.

また、主記憶装置2104上には、データベース管理システム2110がDBバッファ2130及びインメモリ型データベースのメモリ領域2120を操作する際に生成するDBバッファ解放対象リスト8060とDBバッファ解放操作リスト8070が保持される。   In addition, on the main storage device 2104, a DB buffer release target list 8060 and a DB buffer release operation list 8070 generated when the database management system 2110 operates the DB buffer 2130 and the memory area 2120 of the in-memory database are held. The

データベース管理システム2110は、起動するとインメモリ型データベースのメモリ領域2120とDBバッファ2130を予め設定した容量または端末装置2140から指定された容量で主記憶装置2104上にそれぞれ設定する。   When activated, the database management system 2110 sets the memory area 2120 and the DB buffer 2130 of the in-memory database on the main storage device 2104 with a preset capacity or a capacity specified by the terminal device 2140.

そして、データベース管理システム2110は、インメモリ型データベースのメモリ領域2120に予め設定された表(テーブル)2121または端末装置2140から指定された表2121とインデックス2122を外部記憶装置2200から読み込む。そして、クライアント端末装置2160で実行されるUAP(User Application Program)からのアクセス要求がインメモリ型データベースの場合には、メモリ領域2120をアクセスしてクライアント端末装置2160に応答する。   Then, the database management system 2110 reads from the external storage device 2200 a table 2121 preset in the memory area 2120 of the in-memory database or a table 2121 and an index 2122 designated from the terminal device 2140. If the access request from the UAP (User Application Program) executed by the client terminal device 2160 is an in-memory database, the memory area 2120 is accessed and the client terminal device 2160 is responded.

また、データベース管理システム2110は、ディスク型データベースを稼動させ、クライアント端末装置2160のUAP(User Application Program)からのアクセス要求を受け付けて、アクセス要求の対象がディスク型データベースの場合には、表2131及びインデックス2132を、外部記憶装置2200のディスクDBデータ1001のうち必要な部分のみを取得してDBバッファ2130に読み込む。そして、データベース管理システム2110は、DBバッファ2130に読み込んだデータについてクライアント端末装置2160からの要求を処理する。なお、DBバッファ2130に読み込んだ表2131及びインデックス2132は、外部記憶装置2200のディスクDBデータ1001の一部分である。   In addition, the database management system 2110 operates a disk database, receives an access request from a UAP (User Application Program) of the client terminal device 2160, and when the access request target is a disk database, Table 2131 and For the index 2132, only a necessary part of the disk DB data 1001 of the external storage device 2200 is acquired and read into the DB buffer 2130. Then, the database management system 2110 processes a request from the client terminal device 2160 for the data read into the DB buffer 2130. The table 2131 and the index 2132 read into the DB buffer 2130 are a part of the disk DB data 1001 of the external storage device 2200.

データベース管理システム2110が提供するハイブリッド型データベースが、クライアント端末装置2160のUAPからのリクエストに応答するデータの処理については、公知または周知のインメモリ型データベースとディスク型データベースの処理を適用すればよい。   For the processing of data in which the hybrid database provided by the database management system 2110 responds to a request from the UAP of the client terminal device 2160, a known or well-known in-memory database and disk database processing may be applied.

なお、DBバッファ2130及びインメモリ型データベースのメモリ領域2120の操作については後述する。   The operation of the DB buffer 2130 and the memory area 2120 of the in-memory database will be described later.

端末装置2140は、データベース管理装置2100の管理者などが利用する計算機で、入力装置と出力装置を備える。クライアント端末装置2160は、ハイブリッド型データベースの利用者などが使用する計算機で、入力装置と出力装置を備える。   The terminal device 2140 is a computer used by an administrator of the database management device 2100 and the like, and includes an input device and an output device. The client terminal device 2160 is a computer used by a hybrid database user and the like, and includes an input device and an output device.

<ソフトウェアの概要>
データベース管理システム2110は、インメモリ型データベースとディスク型データベースを管理する。このため、データベース管理システム2110は、インメモリ型データベースのメモリ領域2120とディスク型データベースのDBバッファ2130を管理するDBバッファ管理部2111と、メモリ領域2120を拡張する際に解放可能なDBバッファ2130の要素を格納するDBバッファ解放対象リスト8060と、DBバッファ2130から解放してインメモリ型データベースのメモリ領域2120加えるDBバッファ2130の要素を格納するDBバッファ解放操作リスト8070と、を有する。
<Software overview>
The database management system 2110 manages an in-memory database and a disk database. For this reason, the database management system 2110 includes a DB buffer management unit 2111 that manages the memory area 2120 of the in-memory database and the DB buffer 2130 of the disk database, and a DB buffer 2130 that can be released when the memory area 2120 is expanded. A DB buffer release target list 8060 for storing elements, and a DB buffer release operation list 8070 for storing elements of the DB buffer 2130 to be released from the DB buffer 2130 and added to the memory area 2120 of the in-memory database are provided.

データベース管理システム2110は、クライアント端末装置2160からアクセス要求を受け付けると、アクセスの対象となる表がインメモリ型データベースとディスク型データベースの何れかを判定する。アクセスの対象となる表(テーブル)がインメモリ型データベースの場合にはインメモリ型データベースのメモリ領域2120にアクセスする。また、データベース管理システム2110は、アクセスの対象となる表がディスク型データベースの場合にはDBバッファ2130にアクセスする。   When the database management system 2110 receives an access request from the client terminal device 2160, the database management system 2110 determines whether the table to be accessed is an in-memory database or a disk database. When the table to be accessed is an in-memory database, the memory area 2120 of the in-memory database is accessed. The database management system 2110 accesses the DB buffer 2130 when the table to be accessed is a disk database.

データベース管理システム2110は、インメモリ型データベースへのアクセス要求を受け付けると、メモリ領域2120のインデックス2122または表2121を検索してデータを取得し、クライアント端末装置2160に応答する。図2の例では、インメモリ型データベースは、メモリ領域2120に表T1、表T3と、これらの表に対応するインデックスをメモリ領域2120に配置した例を示す。   Upon receiving an access request to the in-memory database, the database management system 2110 searches the index 2122 or the table 2121 in the memory area 2120 to acquire data, and responds to the client terminal device 2160. In the example of FIG. 2, the in-memory type database shows an example in which the memory area 2120 has tables T1 and T3 and indexes corresponding to these tables arranged in the memory area 2120.

一方、データベース管理システム2110は、ディスク型データベースに対するアクセス要求を受け付けるとDBバッファ2130のインデックス2132または表2131あるいは外部記憶装置2200を検索してデータを取得し、クライアント端末装置2160に応答する。外部記憶装置2200には、図1で示したように、ディスク型データベースのデータである表8010とインデックス8020からなるディスクDBデータ1001が格納される。   On the other hand, when the database management system 2110 receives an access request for the disk database, the database management system 2110 searches the index 2132 or the table 2131 of the DB buffer 2130 or the external storage device 2200 to acquire data, and responds to the client terminal device 2160. As shown in FIG. 1, the external storage device 2200 stores disk DB data 1001 including a table 8010 and index 8020, which are data of a disk type database.

DBバッファ管理部2111は、DBバッファ2130に読み込む表2131及びインデックス2132とインメモリ型データベースのメモリ領域2120を管理する。DBバッファ管理部2111は、データベース管理システム2110がアクセスする表2131の部分(レコード)がDBバッファ2130にない場合には外部記憶装置2200のディスクDBデータ1001から表2131とインデックス2132のうち必要とする部分を読み込んで、DBバッファ2130に格納する。   The DB buffer management unit 2111 manages the table 2131 and the index 2132 read into the DB buffer 2130 and the memory area 2120 of the in-memory database. The DB buffer management unit 2111 needs the disk DB data 1001 to the table 2131 and the index 2132 of the external storage device 2200 when the part (record) of the table 2131 accessed by the database management system 2110 is not in the DB buffer 2130. The part is read and stored in the DB buffer 2130.

このとき、DBバッファ管理部2111は、DBバッファ2130内で不要となったデータ(表を構成するレコードまたはインデックスの一部)を外部記憶装置2200に書き戻すか、破棄する。不要となったデータの判定は、LRU(Least Recently Used)方式など周知または公知の手法を用いることができる。図2の例では、DBバッファ管理部2111が、外部記憶装置2200に格納されたディスクDBデータ1001のうち表T2の一部と表T2に対応するインデックスをDBバッファ2130に読み込んだ例を示す。   At this time, the DB buffer management unit 2111 writes data that is no longer necessary in the DB buffer 2130 (a record or a part of an index constituting the table) to the external storage device 2200 or discards it. For determining the data that is no longer necessary, a known or publicly known method such as an LRU (Least Recently Used) method can be used. In the example of FIG. 2, the DB buffer management unit 2111 reads a part of the table T2 and the index corresponding to the table T2 from the disk DB data 1001 stored in the external storage device 2200 into the DB buffer 2130.

また、DBバッファ管理部2111は、後述するように、インメモリ型データベースへのアクセスの増大または表2121の増大によって、インメモリ型データベースのメモリ領域2120が不足することを検知すると、DBバッファ解放対象決定部2112とDBバッファ解放操作実行部2113を起動してDBバッファ2130を縮小させる。そして、DBバッファ管理部2111は、DBバッファ2130から削減した容量をインメモリ型データベースのメモリ領域2120に割り当てて、メモリ領域2120を拡張する。   Further, as will be described later, when the DB buffer management unit 2111 detects that the memory area 2120 of the in-memory type database is insufficient due to an increase in access to the in-memory type database or an increase in the table 2121, the DB buffer release target The determination unit 2112 and the DB buffer release operation execution unit 2113 are activated to reduce the DB buffer 2130. Then, the DB buffer management unit 2111 expands the memory area 2120 by allocating the capacity reduced from the DB buffer 2130 to the memory area 2120 of the in-memory database.

DBバッファ管理部2111は、インメモリ型データベースのメモリ領域2120の使用率が予め設定した閾値を超えたときにメモリ領域2120が不足すると判定する。なお、閾値は、図9で示すように、メモリ領域情報8050の容量不足検知割合8054に格納しておくことができる。   The DB buffer management unit 2111 determines that the memory area 2120 is insufficient when the usage rate of the memory area 2120 of the in-memory database exceeds a preset threshold. Note that the threshold value can be stored in a capacity shortage detection ratio 8054 of the memory area information 8050 as shown in FIG.

そして、インメモリ型データベースのメモリ領域2120の不足が判定されると、DBバッファ解放対象決定部2112で、DBバッファ2130から削減する要素(インデクス)を後述するように決定する。そして、DBバッファ解放操作実行部2113が決定された要素を主記憶装置2104から解放して、インメモリ型データベースのメモリ領域2120に加える。これによりDBバッファ管理部2111は、DBバッファ2130から削減した容量(領域)をメモリ領域2120に加えてメモリ領域2120を拡張する。   When it is determined that the memory area 2120 of the in-memory database is insufficient, the DB buffer release target determination unit 2112 determines an element (index) to be reduced from the DB buffer 2130 as described later. Then, the DB buffer release operation execution unit 2113 releases the determined element from the main storage device 2104 and adds it to the memory area 2120 of the in-memory database. As a result, the DB buffer management unit 2111 expands the memory area 2120 by adding the capacity (area) reduced from the DB buffer 2130 to the memory area 2120.

本発明は、インメモリ型データベースとディスク型データベースの双方を備えるハイブリッド型データベースにおいて、インメモリ型データベースのメモリ領域2120が不足する可能性があると判定されたときに、DBバッファ2130の要素のうちインデックス2132等が使用する領域を削減する。そして、削減によりインデックス2132から取得した主記憶装置2104の領域をインメモリ型データベースのメモリ領域2120に加える。   When it is determined that there is a possibility that the memory area 2120 of the in-memory database is insufficient in the hybrid database including both the in-memory database and the disk database, the present invention The area used by the index 2132 and the like is reduced. Then, the area of the main storage device 2104 acquired from the index 2132 is added to the memory area 2120 of the in-memory database due to the reduction.

インメモリ型データベースのメモリ領域2120に領域を追加することで、インメモリ型データベースの性能(例えば、応答)は向上する。一方、DBバッファ2130の削減によりディスク型データベースの性能は低下する。したがって、前記従来例のように予め拡張用の記憶領域を用意することなく、ハイブリッド型データベース全体の性能を確保しながらインメモリ型データベースの性能を向上させることができる。これにより、計算器資源を有効に利用することができる。   By adding an area to the memory area 2120 of the in-memory database, the performance (for example, response) of the in-memory database is improved. On the other hand, the performance of the disk-type database decreases due to the reduction of the DB buffer 2130. Therefore, it is possible to improve the performance of the in-memory database while ensuring the performance of the entire hybrid database without preparing an expansion storage area in advance as in the conventional example. Thereby, a computer resource can be used effectively.

つまり、本発明では、DBバッファ2130のインデックス領域を削減することでディスク型データベースの性能を低下させる一方で、インメモリ型データベースのメモリ領域2120の拡張によりインメモリ型データベースの性能を向上させることで、ハイブリッド型データベース全体の性能を維持する。   That is, according to the present invention, the performance of the in-memory database is improved by extending the memory area 2120 of the in-memory database while reducing the performance of the disk database by reducing the index area of the DB buffer 2130. Maintain the overall performance of the hybrid database.

DBバッファ管理部2111は、ディスク型データベースとインメモリ型データベースの性能を監視するため、DBバッファ2130の要素に関する表・インデクス情報8040と、インメモリ型データベースのメモリ領域2120に関する情報をメモリ領域情報8050と、を主記憶装置2104上に配置する。   In order to monitor the performance of the disk database and the in-memory database, the DB buffer management unit 2111 stores the table / index information 8040 regarding the elements of the DB buffer 2130 and the information regarding the memory area 2120 of the in-memory database as memory area information 8050. Are arranged on the main storage device 2104.

表・インデクス情報8040は、図1で示すように、DBバッファ2130に格納された表の情報を保持する表情報8041と、表情報8041の表に定義されたインデクスの情報を保持するインデクス情報8042と、表情報8041の表に対するアクセスの頻度を保持する表アクセス頻度情報8043と、から構成される。   As shown in FIG. 1, the table / index information 8040 includes table information 8041 that holds table information stored in the DB buffer 2130, and index information 8042 that holds information about indexes defined in the table of the table information 8041. And table access frequency information 8043 that holds the frequency of access to the table of the table information 8041.

一方、メモリ領域情報8050は、図9で示すように、インメモリ型データベースのメモリ領域2120に割り当てられた容量を保持するインメモリDB容量8051と、容量不足または不足する兆候を検知する閾値(割合)を保持する容量不足検知割合8054と、メモリ領域の拡張量を保持するメモリDB拡張割合8052と、メモリ領域2120に追加する主記憶装置2104の容量を保持するメモリ領域拡張サイズ8053から構成される。なお、容量不足を検知する閾値は、インメモリDB容量8051に対して実際に使用中の領域の割合の例を示す。この他、実際に使用中の領域の容量の上限値を閾値として設定してもよい。   On the other hand, as shown in FIG. 9, the memory area information 8050 includes an in-memory DB capacity 8051 that holds the capacity allocated to the memory area 2120 of the in-memory database, and a threshold (ratio) for detecting signs of insufficient or insufficient capacity. ) For holding the capacity of the main storage device 2104 to be added to the memory area 2120, and a memory area expansion size 8053 for holding the capacity of the main storage device 2104 to be added to the memory area 2120. . Note that the threshold for detecting a shortage of capacity indicates an example of the ratio of the area actually being used with respect to the in-memory DB capacity 8051. In addition, the upper limit value of the capacity of the area that is actually in use may be set as the threshold value.

また、メモリDB拡張割合8052は、1回の操作でインメモリ型データベースのメモリ領域2120に付加する容量の比率を示し、この比率は、インメモリDB容量8051に乗ずる値が格納される。そして、メモリ領域拡張サイズ8053は、インメモリDB容量8051にメモリDB拡張割合8052を格納する。   The memory DB expansion ratio 8052 indicates a ratio of the capacity added to the memory area 2120 of the in-memory database in one operation, and this ratio stores a value multiplied by the in-memory DB capacity 8051. The memory area expansion size 8053 stores the memory DB expansion ratio 8052 in the in-memory DB capacity 8051.

図7は、表・インデクス情報8040を構成する表情報8041の一例を示す図である。   FIG. 7 is a diagram showing an example of the table information 8041 constituting the table / index information 8040.

表情報8041は、表の識別子を格納する表ID80411と、表の名称を格納する表名80412と、表に定義されたインデクスの数を格納する定義インデクス数80413と、表が使用しているDBバッファ内の容量を格納するDBバッファ容量80414と、1回の操作で削減可能なDBバッファ容量80414の比率を格納する削減割合80415からひとつのエントリが構成される。   Table information 8041 includes a table ID 80411 for storing a table identifier, a table name 80412 for storing a table name, a definition index number 80413 for storing the number of indexes defined in the table, and a DB used by the table. One entry is configured from the DB buffer capacity 80414 for storing the capacity in the buffer and the reduction ratio 80415 for storing the ratio of the DB buffer capacity 80414 that can be reduced by one operation.

図8は、表・インデクス情報8040を構成するインデクス情報8042の一例を示す図である。   FIG. 8 is a diagram showing an example of the index information 8042 constituting the table / index information 8040.

インデクス情報8042は、インデクスの識別子を格納するインデクスID80421と、インデクスの名称を格納するインデクス名80422と、当該インデクスが参照する表の識別子を格納する表ID80423と、当該インデクスがセカンダリインデクスであるか否かを識別するセカンダリインデクス識別80424と、当該インデクスが使用するDBバッファ2130上の容量を格納するDBバッファ容量80425からひとつのエントリが構成される。セカンダリインデクス識別80424が「1」であれば、当該インデクスはセカンダリインデクスであることを示し、「0」であればプライマリインデクスであることを示す。   The index information 8042 includes an index ID 80421 for storing an index identifier, an index name 80422 for storing an index name, a table ID 80423 for storing an identifier of a table referred to by the index, and whether or not the index is a secondary index. One entry is configured from the secondary index identification 80424 for identifying the above and the DB buffer capacity 80425 for storing the capacity on the DB buffer 2130 used by the index. If the secondary index identification 80424 is “1”, it indicates that the index is a secondary index, and if it is “0”, it indicates that it is a primary index.

図9は、メモリ領域2120の設定に関する情報を格納するメモリ領域情報8050の一例を示す図である。   FIG. 9 is a diagram illustrating an example of memory area information 8050 for storing information related to the setting of the memory area 2120.

メモリ領域情報8050は、インメモリ型データベースのメモリ領域2120の容量を格納するインメモリDB容量8051と、インメモリ型データベースのメモリ領域2120の不足を判定するために、メモリ領域2120の容量に対する実際の容量の比を使用率として、この使用率の閾値を格納する容量不足検知割合8054と、メモリ領域2120を拡張する際の比率を格納するメモリDB拡張割合8052と、メモリ領域2120を拡張する容量を格納するメモリ領域拡張サイズ8053と、を含む。   The memory area information 8050 includes an in-memory DB capacity 8051 for storing the capacity of the memory area 2120 of the in-memory database, and an actual memory capacity 2120 for determining the shortage of the memory area 2120 of the in-memory database. Using the capacity ratio as the usage rate, the capacity shortage detection rate 8054 for storing this usage rate threshold, the memory DB expansion rate 8052 for storing the rate for expanding the memory region 2120, and the capacity for expanding the memory region 2120 are shown. Memory area expansion size 8053 to be stored.

メモリDB拡張割合8052は、インメモリ型データベースに割り当てられた容量(インメモリDB容量8051)に対してメモリ領域2120を拡張する割合を予め格納しておく。メモリ領域拡張サイズ8053は、データベース管理システム2110が、インメモリ型データベースに割り当てられた領域2120の容量に対してメモリDB拡張割合8052を乗じた値を格納する。   The memory DB expansion ratio 8052 stores in advance a ratio of expanding the memory area 2120 with respect to the capacity allocated to the in-memory database (in-memory DB capacity 8051). As the memory area expansion size 8053, the database management system 2110 stores a value obtained by multiplying the capacity of the area 2120 allocated to the in-memory database by the memory DB expansion ratio 8052.

上記メモリ領域情報8050の内容は、管理者などが操作する端末装置2140から入力しても良いし、所定のファイルからデータベース管理システム2110が読み込んで設定してもよい。   The contents of the memory area information 8050 may be input from the terminal device 2140 operated by an administrator or the like, or may be read and set by the database management system 2110 from a predetermined file.

なお、上記図7、図8の表情報8041及びインデクス情報8042は、データベース管理システム2110によってデータの設定や更新を行うことができる。   The table information 8041 and the index information 8042 in FIGS. 7 and 8 can be set and updated by the database management system 2110.

図10は、表・インデクス情報8040を構成する表アクセス頻度情報8043の一例を示す図である。   FIG. 10 is a diagram showing an example of the table access frequency information 8043 constituting the table / index information 8040.

表アクセス頻度情報8043は、表の識別子を格納する表ID80431と、当該表IDに対する1日当たりのアクセスの回数を格納するアクセス頻度80432と、から一つのエントリが構成される。   The table access frequency information 8043 includes one entry including a table ID 80431 for storing a table identifier and an access frequency 80432 for storing the number of accesses to the table ID per day.

データベース管理システム2110は、クライアント端末2160等からの要求に応じてディスク型データベースへのアクセスを受け付ける度に、表アクセス頻度情報8043の表ID80431に対応するアクセス頻度80432を更新する。   The database management system 2110 updates the access frequency 80432 corresponding to the table ID 80431 of the table access frequency information 8043 every time access to the disk database is received in response to a request from the client terminal 2160 or the like.

図11は、DBバッファ解放対象決定部2112が生成するDBバッファ解放対象リスト8060の一例を示す図である。   FIG. 11 is a diagram illustrating an example of the DB buffer release target list 8060 generated by the DB buffer release target determination unit 2112.

DBバッファ解放対象リスト8060は、解放の対象となるディスク型データベースの要素の種別を格納する解放対象種別8061と、解放の対象となる要素の名称を格納する解放対象名8062と、解放の対象となる要素のDBバッファ2130上の容量を格納する解放サイズ8063と、から一つのエントリが構成される。   The DB buffer release target list 8060 includes a release target type 8061 for storing the type of the element of the disk database to be released, a release target name 8062 for storing the name of the element to be released, and a release target. One entry is configured from the release size 8063 for storing the capacity of the element in the DB buffer 2130.

図12は、DBバッファ解放操作実行部2113が生成するDBバッファ解放操作リスト8070の一例を示す図である。   FIG. 12 is a diagram illustrating an example of the DB buffer release operation list 8070 generated by the DB buffer release operation execution unit 2113.

DBバッファ解放操作リスト8070は、解放の対象となるディスク型データベースの要素の名称を格納する解放対象8071と、解放の対象となる要素のDBバッファ2130上の容量を格納する解放容量8072と、から一つのエントリが構成される。   The DB buffer release operation list 8070 includes a release target 8071 for storing the name of the element of the disk database to be released, and a release capacity 8072 for storing the capacity on the DB buffer 2130 of the element to be released. One entry is configured.

<処理の概要>
図2は、本発明のデータベース管理システム2110が、インメモリ型データベースのメモリ領域2120が不足すると判定したときに、ディスク型データベースのDBバッファ2130の一部を削減し、削減した領域をインメモリ型データベースのメモリ領域2120に加えて拡張するメモリ操作の概要を示す図である。
<Outline of processing>
FIG. 2 shows that when the database management system 2110 of the present invention determines that the memory area 2120 of the in-memory database is insufficient, a part of the DB buffer 2130 of the disk-type database is reduced, and the reduced area is reduced to the in-memory type. It is a figure which shows the outline | summary of the memory operation expanded in addition to the memory area 2120 of a database.

データベース管理システム2110のDBバッファ管理部2111は、インメモリ型データベースのメモリ領域2120の使用率を監視して、メモリ領域2120の使用率が所定の閾値(容量不足検知割合8054)を超えると、インメモリ型データベースのメモリ領域2120が不足することを検出する。   The DB buffer management unit 2111 of the database management system 2110 monitors the usage rate of the memory area 2120 of the in-memory database, and if the usage rate of the memory area 2120 exceeds a predetermined threshold (capacity shortage detection rate 8054), It detects that the memory area 2120 of the memory type database is insufficient.

インメモリ型データベースのメモリ領域2120の不足を検出するとDBバッファ管理部2111は、DBバッファ解放対象決定部2112を起動して、図4に示すDBバッファ解放対象決定処理(S600)を開始する。なお、DBバッファ解放対象決定処理(S600)は図1に示したDBバッファ解放対象決定部2112で行われる処理である。   When the shortage of the memory area 2120 of the in-memory database is detected, the DB buffer management unit 2111 activates the DB buffer release target determination unit 2112 and starts the DB buffer release target determination process (S600) shown in FIG. The DB buffer release target determination process (S600) is a process performed by the DB buffer release target determination unit 2112 shown in FIG.

DBバッファ解放対象決定処理S600では、メモリ領域情報8050のインメモリDB容量8051とメモリDB拡張割合8052からメモリ領域拡張サイズ8053を演算する。本実施形態では、1回の拡張でメモリ領域拡張サイズ8053ずつインメモリ型データベースのメモリ領域2120を拡張する例を示す。   In the DB buffer release target determination processing S600, the memory area expansion size 8053 is calculated from the in-memory DB capacity 8051 of the memory area information 8050 and the memory DB expansion ratio 8052. In this embodiment, an example in which the memory area 2120 of the in-memory database is expanded by one memory area expansion size 8053 by one expansion is shown.

次に、DBバッファ解放対象決定部2112は、メモリ削減操作の対象となるディスク型データベースの要素を抽出するため、表・インデクス情報8040から表情報8041、インデクス情報8042、表アクセス頻度情報8043を読み込む。DBバッファ解放対象決定部2112は、読み込んだ情報からDBバッファ解放対象リスト8060を後述するように生成する。   Next, the DB buffer release target determination unit 2112 reads the table information 8041, the index information 8042, and the table access frequency information 8043 from the table / index information 8040 in order to extract the elements of the disk-type database that are the targets of the memory reduction operation. . The DB buffer release target determination unit 2112 generates a DB buffer release target list 8060 from the read information as described later.

DBバッファ解放対象決定部2112は、DBバッファ解放対象リスト8060を参照して、メモリ領域拡張サイズ8053を満たす容量になるまでディスク型データベースの要素を抽出する。そして、DBバッファ解放対象決定部2112は、抽出したディスク型データベースの要素からDBバッファ解放操作リスト8070を生成する。   The DB buffer release target determination unit 2112 refers to the DB buffer release target list 8060 and extracts the elements of the disk database until the capacity reaches the memory area expansion size 8053. Then, the DB buffer release target determination unit 2112 generates a DB buffer release operation list 8070 from the extracted disk database elements.

DBバッファ管理部2111は、DBバッファ解放対象決定部2112の処理が完了すると、DBバッファ解放操作実行部2113を起動してDBバッファ解放操作を後述するように実行する(S700)。   When the processing of the DB buffer release target determination unit 2112 is completed, the DB buffer management unit 2111 activates the DB buffer release operation execution unit 2113 and executes the DB buffer release operation as described later (S700).

DBバッファ解放操作実行部2113は、DBバッファ解放操作リスト8070を読み込んで、解放対象となるディスク型データベースの要素をDBバッファ2130から削除して外部記憶装置2200へ書き戻す。DBバッファ解放操作実行部2113は、DBバッファ2130から削除された領域を解放する。そして、DBバッファ解放操作実行部2113は、DBバッファ2130上で解放した領域を、インメモリ型データベースのメモリ領域2120に加えて、メモリ領域2120の拡張を行う(S800)。   The DB buffer release operation execution unit 2113 reads the DB buffer release operation list 8070, deletes the element of the disk database to be released from the DB buffer 2130, and writes it back to the external storage device 2200. The DB buffer release operation execution unit 2113 releases the area deleted from the DB buffer 2130. Then, the DB buffer release operation execution unit 2113 extends the memory area 2120 by adding the area released on the DB buffer 2130 to the memory area 2120 of the in-memory database (S800).

以上の処理によって、データベース管理システム2110は、DBバッファ2130からディスク型データベースの要素の一部を削除して、インメモリ型データベースのメモリ領域2120に加えることで、主記憶装置2104の領域を無駄なく利用しながらも、インメモリ型データベースのメモリが不足することを防止できる。   Through the above processing, the database management system 2110 deletes some of the elements of the disk-type database from the DB buffer 2130 and adds them to the memory area 2120 of the in-memory database, so that the area of the main storage device 2104 can be used without waste. It is possible to prevent the in-memory database from running out of memory while being used.

<処理の詳細>
以下、データベース管理システム2110で行われるディスク型データベースのDBバッファ2130の一部を削減し、削減した記憶領域をインメモリ型データベースのメモリ領域2120に追加する処理の詳細を説明する。
<Details of processing>
The details of the processing performed by the database management system 2110 to reduce a part of the DB buffer 2130 of the disk type database and add the reduced storage area to the memory area 2120 of the in-memory type database will be described below.

図3は、データベース管理システム2110で行われるメモリ操作の全体的な処理の一例を示すフローチャートである。この処理は、所定の周期(例えば、1分毎)で実行される。   FIG. 3 is a flowchart showing an example of the overall processing of the memory operation performed by the database management system 2110. This process is executed at a predetermined cycle (for example, every minute).

ステップS200では、DBバッファ管理部2111が、メモリ領域情報8050を読み込んで、インメモリDB容量8051のうち実際に使用されている領域を監視して、実際に使用されている領域の比率が閾値である容量不足検知割合8054を超えていれば、インメモリ型データベースのメモリ領域2120が不足(または不足の予兆)することを検知する。メモリ領域2120が不足することを検知すると、データベース管理システム2110は、DBバッファ解放対象決定部2112を起動してステップS300へ進む。   In step S200, the DB buffer management unit 2111 reads the memory area information 8050, monitors the area actually used in the in-memory DB capacity 8051, and the ratio of the area actually used is a threshold value. If a certain capacity shortage detection ratio 8054 is exceeded, it is detected that the memory area 2120 of the in-memory database is short (or a sign of shortage). If it is detected that the memory area 2120 is insufficient, the database management system 2110 activates the DB buffer release target determination unit 2112 and proceeds to step S300.

ステップS300では、DBバッファ解放対象決定部2112がメモリ領域情報8050を読み込んでインメモリDB容量8051にメモリDB拡張割合8052を乗じて、メモリ領域拡張サイズ8053を演算する。   In step S300, the DB buffer release target determination unit 2112 reads the memory area information 8050, multiplies the in-memory DB capacity 8051 by the memory DB expansion ratio 8052, and calculates the memory area expansion size 8053.

ステップS400では、DBバッファ解放対象決定部2112が表・インデクス情報8040から表情報8041とインデクス情報8042を取得して、DBバッファ2130上に存在する表とインデクスを特定する。   In step S400, the DB buffer release target determination unit 2112 acquires the table information 8041 and the index information 8042 from the table / index information 8040, and identifies the table and index existing on the DB buffer 2130.

ステップS600では、DBバッファ解放対象決定部2112が、DBバッファ2130上に存在する表とインデクスから後述する図4の処理によって、DBバッファ解放対象となるディスク型データベースの要素を抽出してDBバッファ解放操作リスト8060を生成する。   In step S600, the DB buffer release target determination unit 2112 extracts the elements of the disk database to be DB buffer released from the table and index existing in the DB buffer 2130 by the process of FIG. An operation list 8060 is generated.

ステップS660では、DBバッファ管理部2111が、DBバッファ解放操作リスト8070を構成するディスク型データベースの要素の容量(解放容量8072)の合計をDBバッファ解放サイズとして演算する。   In step S660, the DB buffer management unit 2111 calculates the total capacity (release capacity 8072) of the elements of the disk database constituting the DB buffer release operation list 8070 as the DB buffer release size.

ステップS690では、DBバッファ管理部2111が、ステップS300で求めたメモリ領域拡張サイズ8053とステップS660で求めたDBバッファ解放サイズを比較して、DBバッファ解放サイズがメモリ領域拡張サイズ8053以上であるか否かを判定する。そして、DBバッファ解放サイズがメモリ領域拡張サイズ8053以上であれば、DBバッファ管理部2111は、DBバッファ解放操作実行部2113を起動してステップS700へ進む。一方、DBバッファ解放サイズがメモリ領域拡張サイズ8053未満であれば、DBバッファ管理部2111は、ステップS692へ進んでインメモリ型データベースのメモリ領域2120を拡張できないことを通知するエラー処理を実行する。   In step S690, the DB buffer management unit 2111 compares the memory area extension size 8053 obtained in step S300 with the DB buffer release size obtained in step S660, and determines whether the DB buffer release size is greater than or equal to the memory area extension size 8053. Determine whether or not. If the DB buffer release size is greater than or equal to the memory area expansion size 8053, the DB buffer management unit 2111 activates the DB buffer release operation execution unit 2113 and proceeds to step S700. On the other hand, if the DB buffer release size is less than the memory area expansion size 8053, the DB buffer management unit 2111 proceeds to step S692 and executes error processing for notifying that the memory area 2120 of the in-memory database cannot be expanded.

ステップS700では、DBバッファ解放操作実行部2113が後述する図6のように、DBバッファ解放操作リスト8070の要素をDBバッファ2130から削除する。   In step S700, the DB buffer release operation execution unit 2113 deletes elements of the DB buffer release operation list 8070 from the DB buffer 2130 as shown in FIG.

そして、ステップS800では、DBバッファ解放操作実行部2113は、ステップS700でDBバッファ2130から削除した領域を、インメモリ型データベースのメモリ領域2120に付加して拡張させる。DBバッファ解放操作実行部2113は、メモリ領域拡張サイズ8053をインメモリDB容量8051に加算し、その後、メモリ領域拡張サイズ8053をクリアする。   In step S800, the DB buffer release operation execution unit 2113 adds and expands the area deleted from the DB buffer 2130 in step S700 to the memory area 2120 of the in-memory database. The DB buffer release operation execution unit 2113 adds the memory area expansion size 8053 to the in-memory DB capacity 8051, and then clears the memory area expansion size 8053.

以上の処理により、DBバッファ2130上から解放対象の要素が削除され、削除された領域がインメモリ型データベースのメモリ領域2120に加えられる。   Through the above processing, the element to be released is deleted from the DB buffer 2130, and the deleted area is added to the memory area 2120 of the in-memory database.

<DBバッファ解放対象決定処理>
図4は上記図3のステップS600で行われるDBバッファ解放対象決定処理の一例を示すフローチャートである。
<DB buffer release target decision processing>
FIG. 4 is a flowchart showing an example of the DB buffer release target determination process performed in step S600 of FIG.

ステップS601では、DBバッファ解放対象決定部2112が、図3のステップS400で取得した表とインデクスから、図11に示すDBバッファ解放対象リスト8060を生成する。次に、DBバッファ解放対象決定部2112は、図10に示した表アクセス頻度情報8043を読み込んで、DBバッファ解放対象リスト8060をアクセス頻度80432の昇順でソートする。このとき、解放対象種別8061がテーブルの場合は、解放対象名8062に含まれるテーブルの識別子に対応するアクセス頻度情報8043を用いる。また、解放対象種別8061がインデクスの場合は、解放対象名8062に含まれるテーブルの識別子を、当該インデクスのアクセス頻度情報8043として扱うようにしてもよい。   In step S601, the DB buffer release target determination unit 2112 generates the DB buffer release target list 8060 shown in FIG. 11 from the table and index acquired in step S400 of FIG. Next, the DB buffer release target determination unit 2112 reads the table access frequency information 8043 shown in FIG. 10 and sorts the DB buffer release target list 8060 in ascending order of the access frequency 80432. At this time, if the release target type 8061 is a table, the access frequency information 8043 corresponding to the identifier of the table included in the release target name 8062 is used. When the release target type 8061 is an index, the identifier of the table included in the release target name 8062 may be handled as the access frequency information 8043 of the index.

ステップS602では、DBバッファ解放対象決定部2112が、上記ステップS601で生成したDBバッファ解放対象リスト8060の先頭のエントリからステップS603〜S606の処理を繰り返す。   In step S602, the DB buffer release target determination unit 2112 repeats the processing in steps S603 to S606 from the top entry of the DB buffer release target list 8060 generated in step S601.

ステップS603では、DBバッファ解放対象決定部2112が、上記ステップS601でアクセス頻度80432の昇順でDBバッファ解放対象リスト8060のエントリを読み込む。そして、DBバッファ解放対象決定部2112は、詠み込んだDBバッファ解放対象リスト8060のエントリの解放対象種別8061が「インデクス」であるか否かを判定する。「インデクス」であれば、DBバッファ解放対象決定部2112は、解放対象名8062で図8のインデクス情報8042のインデクス名80422と表ID80423を検索し、当該インデクスのセカンダリインデクス識別80424を取得する。   In step S603, the DB buffer release target determination unit 2112 reads the entries in the DB buffer release target list 8060 in ascending order of the access frequency 80432 in step S601. Then, the DB buffer release target determination unit 2112 determines whether or not the release target type 8061 of the entry in the stored DB buffer release target list 8060 is “index”. If it is “index”, the DB buffer release target determination unit 2112 searches the index name 80422 and the table ID 80423 of the index information 8042 of FIG. 8 using the release target name 8062, and acquires the secondary index identification 80424 of the index.

DBバッファ解放対象決定部2112は、セカンダリインデクス識別80424が「1」であるか否かを判定し、「1」であれば当該解放対象名8062のインデクスはセカンダリであるので、当該解放対象名8062でDBバッファ解放操作リスト8070にエントリを追加する。つまり、DBバッファ解放対象決定部2112は、当該解放対象名8062をDBバッファ解放操作リスト8070の解放対象8071に設定し、インデクス情報8042のDBバッファ容量80425からセカンダリインデクスが使用していた容量を取得し、この容量をDBバッファ解放操作リスト8070の解放容量8072に設定する。   The DB buffer release target determination unit 2112 determines whether or not the secondary index identification 80424 is “1”. If it is “1”, the release target name 8062 is secondary, so the release target name 8062. Thus, an entry is added to the DB buffer release operation list 8070. That is, the DB buffer release target determination unit 2112 sets the release target name 8062 as the release target 8071 of the DB buffer release operation list 8070, and acquires the capacity used by the secondary index from the DB buffer capacity 80425 of the index information 8042. This capacity is set in the release capacity 8072 of the DB buffer release operation list 8070.

ステップS604では、DBバッファ解放対象決定部2112が、DBバッファ解放操作リスト8070に加えられたセカンダリインデクスの容量(解放容量8072)の合計をDBバッファ解放サイズとして演算する。   In step S604, the DB buffer release target determination unit 2112 calculates the sum of the secondary index capacities (release capacity 8072) added to the DB buffer release operation list 8070 as the DB buffer release size.

ステップS605では、DBバッファ解放対象決定部2112が、ステップS300で求めたメモリ領域拡張サイズ8053と、ステップS604で求めたDBバッファ解放サイズを比較して、DBバッファ解放サイズがメモリ領域拡張サイズ8053以上であるか否かを判定する。   In step S605, the DB buffer release target determination unit 2112 compares the memory area extension size 8053 obtained in step S300 with the DB buffer release size obtained in step S604, and the DB buffer release size is equal to or larger than the memory area extension size 8053. It is determined whether or not.

DBバッファ解放サイズがメモリ領域拡張サイズ8053以上であれば、DBバッファ解放対象決定部2112は、DBバッファ2130から削減する領域がメモリ領域拡張サイズ8053以上になったので図4の処理を終了して図3の処理に戻る。   If the DB buffer release size is equal to or larger than the memory area expansion size 8053, the DB buffer release target determination unit 2112 ends the processing of FIG. 4 because the area to be reduced from the DB buffer 2130 is equal to or larger than the memory area expansion size 8053. Returning to the process of FIG.

一方、DBバッファ解放サイズがメモリ領域拡張サイズ8053未満であれば、DBバッファ解放対象決定部2112はステップS603に戻って、DBバッファ解放対象リスト8060の次のエントリについて上記処理を繰り返す(S606)。   On the other hand, if the DB buffer release size is less than the memory area expansion size 8053, the DB buffer release target determination unit 2112 returns to Step S603 and repeats the above processing for the next entry in the DB buffer release target list 8060 (S606).

DBバッファ解放対象決定部2112は、DBバッファ解放対象リスト8060の全てのエントリについて処理が終了してもDBバッファ解放サイズがメモリ領域拡張サイズ8053未満であればステップS806へ進む。つまり、現在生成されたセカンダリインデクスのみのDBバッファ解放操作リスト8070では、DBバッファ解放サイズが要求されるメモリ領域拡張サイズ8053に達しない場合である。   The DB buffer release target determination unit 2112 proceeds to step S806 if the DB buffer release size is less than the memory area expansion size 8053 even when processing is completed for all entries in the DB buffer release target list 8060. That is, in the DB buffer release operation list 8070 for only the secondary index that is currently generated, the DB buffer release size does not reach the required memory area expansion size 8053.

ステップS607では、DBバッファ解放対象決定部2112が、上記ステップS601で生成したDBバッファ解放対象リスト8060の先頭のエントリからステップS608〜S611の処理を繰り返す。なお、DBバッファ解放対象リスト8060は上述のようにアクセス頻度が低い順から高い順にソートされている。   In step S607, the DB buffer release target determination unit 2112 repeats the processes in steps S608 to S611 from the top entry of the DB buffer release target list 8060 generated in step S601. The DB buffer release target list 8060 is sorted in ascending order of access frequency as described above.

ステップS608では、DBバッファ解放対象決定部2112が、上記ステップS601でアクセス頻度80432の昇順でDBバッファ解放対象リスト8060のエントリを読み込む。そして、DBバッファ解放対象決定部2112は、詠み込んだDBバッファ解放対象リスト8060のエントリの解放対象種別8061が「テーブル」(表)であるか否かを判定する。「テーブル」であれば、DBバッファ解放対象決定部2112は、解放対象名8062で図7の表情報8041の表ID80411を検索し、当該テーブルの削減割合80415と、当該テーブルが使用中のDBバッファ容量80414を取得する。DBバッファ解放対象決定部2112は、当該テーブルが使用中のDBバッファ容量80414に削減割合80415を乗じた値を解放容量として求める。   In step S608, the DB buffer release target determination unit 2112 reads the entries in the DB buffer release target list 8060 in ascending order of the access frequency 80432 in step S601. Then, the DB buffer release target determination unit 2112 determines whether or not the release target type 8061 of the entry in the stored DB buffer release target list 8060 is “table”. If it is “table”, the DB buffer release target determination unit 2112 searches the table ID 80411 of the table information 8041 of FIG. 7 using the release target name 8062, the reduction ratio 80415 of the table, and the DB buffer used by the table The capacity 80414 is acquired. The DB buffer release target determination unit 2112 obtains a value obtained by multiplying the DB buffer capacity 80414 in use by the table by the reduction ratio 80415 as the release capacity.

DBバッファ解放対象決定部2112は、当該テーブルの解放対象名8062でDBバッファ解放操作リスト8070にエントリを追加する。つまり、DBバッファ解放対象決定部2112は、当該テーブルの解放対象名8062をDBバッファ解放操作リスト8070の解放対象8071に設定し、上記削減割合80415から求めた容量をDBバッファ解放操作リスト8070の解放容量8072に設定する。なお、削減割合80415は、図7で示すように例えば、30%で、使用中のDBバッファ容量80414が例えば、300MBの場合、解放容量8072は90Mbyteとなる。DBバッファ解放操作リスト8070のテーブルの解放容量8072は、解放対象8071の表がDBバッファ2130使用中の領域のうち外部記憶装置2200へ書き戻す容量を示す。   The DB buffer release target determination unit 2112 adds an entry to the DB buffer release operation list 8070 with the release target name 8062 of the table. That is, the DB buffer release target determination unit 2112 sets the release target name 8062 of the table as the release target 8071 of the DB buffer release operation list 8070, and releases the capacity obtained from the reduction ratio 80415 to the release of the DB buffer release operation list 8070. The capacity is set to 8072. The reduction ratio 80415 is 30%, for example, as shown in FIG. 7, and when the DB buffer capacity 80414 in use is, for example, 300 MB, the release capacity 8072 is 90 Mbytes. The release capacity 8072 of the table in the DB buffer release operation list 8070 indicates the capacity to be written back to the external storage device 2200 in the area where the table of the release target 8071 is in use by the DB buffer 2130.

ステップS609では、DBバッファ解放対象決定部2112が、DBバッファ解放操作リスト8070に加えられたテーブルを含む解放容量8072の合計をDBバッファ解放サイズとして演算する。   In step S609, the DB buffer release target determination unit 2112 calculates the total of the release capacity 8072 including the table added to the DB buffer release operation list 8070 as the DB buffer release size.

ステップS610では、DBバッファ解放対象決定部2112が、ステップS300で求めたメモリ領域拡張サイズ8053と、ステップS608で求めたDBバッファ解放サイズを比較して、DBバッファ解放サイズがメモリ領域拡張サイズ8053以上であるか否かを判定する。   In step S610, the DB buffer release target determination unit 2112 compares the memory area extension size 8053 obtained in step S300 with the DB buffer release size obtained in step S608, and the DB buffer release size is equal to or larger than the memory area extension size 8053. It is determined whether or not.

DBバッファ解放サイズがメモリ領域拡張サイズ8053以上であれば、DBバッファ解放対象決定部2112は、DBバッファ2130から削減する領域がメモリ領域拡張サイズ8053以上になったので図4の処理を終了して図3の処理に戻る。   If the DB buffer release size is equal to or larger than the memory area expansion size 8053, the DB buffer release target determination unit 2112 ends the processing of FIG. 4 because the area to be reduced from the DB buffer 2130 is equal to or larger than the memory area expansion size 8053. Returning to the process of FIG.

一方、DBバッファ解放サイズがメモリ領域拡張サイズ8053未満であれば、DBバッファ解放対象決定部2112はステップS607に戻って、DBバッファ解放対象リスト8060の次のエントリについて上記処理を繰り返す(S611)。   On the other hand, if the DB buffer release size is less than the memory area expansion size 8053, the DB buffer release target determination unit 2112 returns to step S607 and repeats the above processing for the next entry in the DB buffer release target list 8060 (S611).

DBバッファ解放対象決定部2112は、上記図4の処理によって、DBバッファ2130のうちセカンダリインデクスをDBバッファ解放操作リスト8070に抽出して、DBバッファ解放サイズがメモリ領域拡張サイズ未満であれば、DBバッファ2130を使用中の表から所定の削減割合80415を削減してDBバッファ解放操作リスト8070に加えていく。   The DB buffer release target determination unit 2112 extracts the secondary index from the DB buffer 2130 to the DB buffer release operation list 8070 by the processing of FIG. 4, and if the DB buffer release size is less than the memory area expansion size, A predetermined reduction rate 80415 is reduced from the table in use of the buffer 2130 and added to the DB buffer release operation list 8070.

<DBバッファ解放操作リストの計算処理>
図5は、上記図3のステップS660、図4のステップS604、S609で行われるDBバッファ解放操作リスト8070の計算処理の一例を示すフローチャートである。
<DB buffer release operation list calculation process>
FIG. 5 is a flowchart showing an example of calculation processing of the DB buffer release operation list 8070 performed in step S660 of FIG. 3 and steps S604 and S609 of FIG.

DBバッファ解放対象決定部2112またはDBバッファ管理部2111は、ステップS661、S662、S663を繰り返すことで、DBバッファ解放操作リスト8070の先頭から終端までのエントリを読み込んで、解放容量8072の総和をDBバッファ解放サイズとして演算する。   The DB buffer release target determination unit 2112 or the DB buffer management unit 2111 reads the entries from the beginning to the end of the DB buffer release operation list 8070 by repeating steps S661, S662, and S663, and sets the sum of the release capacity 8072 to the DB. Calculated as buffer release size.

<DBバッファ解放操作実行処理>
図6は、上記図3のステップS700で行われるDBバッファ解放操作実行処理の一例を示すフローチャートである。
<DB buffer release operation execution processing>
FIG. 6 is a flowchart showing an example of the DB buffer release operation execution process performed in step S700 of FIG.

ステップS711では、DBバッファ解放操作実行部2113が、DBバッファ解放操作リスト8070を読み込む。そして、ステップS712では、DBバッファ解放操作実行部2113が、DBバッファ解放操作リスト8070の先頭から終端までのエントリについてステップS713〜S716の処理を繰り返す。   In step S711, the DB buffer release operation execution unit 2113 reads the DB buffer release operation list 8070. In step S712, the DB buffer release operation execution unit 2113 repeats the processing in steps S713 to S716 for the entries from the beginning to the end of the DB buffer release operation list 8070.

ステップS713では、DBバッファ解放操作実行部2113が解放操作リスト8070から一つのエントリを読み込んで、解放対象8071と解放容量8072を取得する。   In step S713, the DB buffer release operation execution unit 2113 reads one entry from the release operation list 8070, and acquires the release target 8071 and the release capacity 8072.

ステップS714では、DBバッファ解放操作実行部2113が上記読み込んだ解放対象8071を外部記憶装置2200のディスクDBデータ1001に書き戻す。このとき、DBバッファ解放操作実行部2113が外部記憶装置2200へDBバッファ2130の一部を書き戻す場合には、書き戻す対象をLRU(Least Recently Used)等の周知または公知の手法で決定すればよい。   In step S 714, the DB buffer release operation execution unit 2113 writes the read release target 8071 back into the disk DB data 1001 of the external storage device 2200. At this time, when the DB buffer release operation execution unit 2113 writes back a part of the DB buffer 2130 to the external storage device 2200, the target to be written back can be determined by a known or known method such as LRU (Least Recently Used). Good.

なお、DBバッファ解放操作実行部2113は上記読み込んだ解放対象8071がセカンダリインデクスの場合には、外部記憶装置2200へ書き戻さずに削除するようにしても良い。   Note that the DB buffer release operation execution unit 2113 may delete the read release target 8071 without writing back to the external storage device 2200 when the read target 8071 is a secondary index.

次に、ステップS715では、DBバッファ解放操作実行部2113は、解放対象8071が使用していたDBバッファ2130上の領域を解放する。このとき、DBバッファ解放操作実行部2113は、解放対象8071が「テーブル」の場合、表が使用中のDBバッファ容量80414から、このDBバッファ容量80414に削減割合80415を乗じた値を差し引いてDBバッファ容量80414を更新する。DBバッファ解放操作実行部2113は、解放対象8071が「インデクス」の場合、インデクス情報8042から該当するインデクスID80421またはインデクス名80422のエントリを削除する。あるいは、インデクスの一部を解放した場合には、インデクス情報8042の使用中のDBバッファ容量80425を更新するようにしてもよい。   In step S715, the DB buffer release operation execution unit 2113 releases the area on the DB buffer 2130 used by the release target 8071. At this time, when the release target 8071 is “table”, the DB buffer release operation execution unit 2113 subtracts a value obtained by multiplying the DB buffer capacity 80414 by the reduction ratio 80415 from the DB buffer capacity 80414 in use by the table. The buffer capacity 80414 is updated. When the release target 8071 is “index”, the DB buffer release operation execution unit 2113 deletes the corresponding index ID 80421 or index name 80422 entry from the index information 8042. Alternatively, when a part of the index is released, the DB buffer capacity 80425 in use of the index information 8042 may be updated.

上記ステップS713〜S714の処理を、DBバッファ解放操作リスト8070の全てのエントリについて完了すると、ステップS720に進む。ステップS720では、DBバッファ解放操作実行部2113は、DBバッファ解放操作リスト8070の全エントリを削除して初期化する。また、DBバッファ解放操作実行部2113は、メモリ領域情報8050のインメモリDB容量8051に、上記図3のステップS660で求めたDBバッファ解放サイズを加算して更新する。また、DBバッファ解放操作実行部2113は、メモリ領域情報8050のメモリ領域拡張サイズ8053をクリアする。   When the processes in steps S713 to S714 are completed for all entries in the DB buffer release operation list 8070, the process proceeds to step S720. In step S720, the DB buffer release operation execution unit 2113 deletes and initializes all entries in the DB buffer release operation list 8070. Also, the DB buffer release operation execution unit 2113 updates the in-memory DB capacity 8051 of the memory area information 8050 by adding the DB buffer release size obtained in step S660 of FIG. In addition, the DB buffer release operation execution unit 2113 clears the memory area expansion size 8053 of the memory area information 8050.

以上の処理により、DBバッファ解放操作リスト8070に加えられたディスク型データベースの要素は、外部記憶装置2200へ書き戻されてからDBバッファ2130上で使用していた領域が解放される。   Through the above processing, the disk database element added to the DB buffer release operation list 8070 is written back to the external storage device 2200, and the area used on the DB buffer 2130 is released.

<まとめ>
以上のように、本発明では、インメモリ型データベースのメモリ領域2120の実際の使用量が閾値(容量不足検知割合8054)を超えると、DBバッファ管理部2111はインメモリ型データベースのメモリ領域の不足または不足の予兆を検知する。
<Summary>
As described above, in the present invention, when the actual usage amount of the memory area 2120 of the in-memory database exceeds the threshold (capacity shortage detection ratio 8054), the DB buffer management unit 2111 runs out of the memory area of the in-memory database. Or detect signs of shortage.

メモリ領域2120の不足が検知されると、DBバッファ管理部2111は、DBバッファ2130の容量を削減して、インメモリ型データベースのメモリ領域2120に加えることで、主記憶装置2104の資源を無駄なく利用しながらインメモリ型データベースの性能を確保することができる。   When the shortage of the memory area 2120 is detected, the DB buffer management unit 2111 reduces the capacity of the DB buffer 2130 and adds it to the memory area 2120 of the in-memory database, so that the resources of the main storage device 2104 can be used without waste. The performance of the in-memory database can be secured while being used.

DBバッファ管理部2111は、インメモリ型データベースのメモリ領域2120を拡張する単位(比率)をメモリ領域情報8050のメモリDB拡張割合8052として保持する。そして、DBバッファ管理部2111のDBバッファ解放対象決定部2112は、メモリ領域2120を拡張する度に、現在のメモリ領域2120の容量8051にメモリDB拡張割合8052を乗じて、今回追加するメモリ領域拡張サイズ8053を求める。   The DB buffer management unit 2111 holds a unit (ratio) for expanding the memory area 2120 of the in-memory database as a memory DB expansion ratio 8052 of the memory area information 8050. Then, every time the memory area 2120 is expanded, the DB buffer release target determining section 2112 of the DB buffer management section 2111 multiplies the current capacity 8051 of the memory area 2120 by the memory DB expansion ratio 8052 to add the memory area expansion to be added this time. The size 8053 is obtained.

DBバッファ解放対象決定部2112は、まず、アクセス頻度の少ない順にセカンダリインデクスを解放対象としてDBバッファ解放操作リスト8070に追加する。そして、DBバッファ解放対象決定部2112は、解放するセカンダリインデクスの容量の総和がメモリ領域拡張サイズ8053に満たない場合は、DBバッファ2130上の表の一部を外部記憶装置2200に書き戻すよう外部記憶装置入出力インターフェース2103に指令した後、当該表の一部を削除する。ここで、表情報8041には、各表ID80411毎に1回の削減操作でDBバッファ2130から書き戻す比率を削減割合80415として予め設定しておく。そして、DBバッファ解放対象決定部2112は、DBバッファ解放対象リスト8060からアクセス頻度の低い順に解放容量8072を順次決定してDBバッファ解放操作リスト8070に追加する処理を、メモリ領域拡張サイズ8053を満たすまで繰り返す。   The DB buffer release target determination unit 2112 first adds secondary indexes to the DB buffer release operation list 8070 as release targets in ascending order of access frequency. Then, the DB buffer release target determining unit 2112 externally writes a part of the table on the DB buffer 2130 back to the external storage device 2200 when the total capacity of the secondary indexes to be released is less than the memory area expansion size 8053. After instructing the storage device input / output interface 2103, a part of the table is deleted. Here, in the table information 8041, a ratio of writing back from the DB buffer 2130 by one reduction operation for each table ID 80411 is set in advance as a reduction ratio 80415. Then, the DB buffer release target determination unit 2112 satisfies the memory area expansion size 8053 for processing to sequentially determine the release capacity 8072 from the DB buffer release target list 8060 in the order of low access frequency and add it to the DB buffer release operation list 8070. Repeat until.

このような処理により、まずアクセス頻度の低い順にセカンダリインデクスをDBバッファ2130から削除し、さらに、アクセス頻度の低い順に表の一部を所定の比率で削除することでDBバッファ2130の領域を解放することができる。なお、削除するデータは外部記憶装置2200へ書き戻しておく。   By such processing, first, the secondary indexes are deleted from the DB buffer 2130 in the order of low access frequency, and further, a part of the table is deleted at a predetermined ratio in the order of low access frequency to release the area of the DB buffer 2130. be able to. The data to be deleted is written back to the external storage device 2200.

そして、DBバッファ2130から解放した領域を、インメモリ型データベースのメモリ領域2120に追加することで、主記憶装置2104の資源を無駄なく利用しながら、インメモリ型データベースに必要な領域を迅速に確保することが可能となるのである。   Then, by adding the area released from the DB buffer 2130 to the memory area 2120 of the in-memory database, the necessary area for the in-memory database can be quickly secured while using the resources of the main memory 2104 without waste. It becomes possible to do.

なお、上記実施形態では、アクセス頻度の低い表の一部を外部記憶装置2200へ書き戻す例を示したが、アクセス頻度の低い表の全てを外部記憶装置2200へ書き戻すようにしてもよい。   In the above-described embodiment, an example in which a part of a table with low access frequency is written back to the external storage device 2200 is shown. However, all of a table with low access frequency may be written back to the external storage device 2200.

また、上記実施形態では、アクセス頻度の低い順にセカンダリインデクスをDBバッファ解放操作リスト8070へ加える例を示したが、セカンダリインデクスを用いたヒット率を監視してヒット率の低いセカンダリインデクスをDBバッファ2130から削除するようにしてもよい。   In the above embodiment, the secondary index is added to the DB buffer release operation list 8070 in ascending order of access frequency. However, the hit rate using the secondary index is monitored, and the secondary index with the low hit rate is assigned to the DB buffer 2130. You may make it delete from.

また、上記実施形態では、外部記憶装置2200にデータベースを格納する例を示したが、データベース管理装置2100内のストレージ装置またはストレージデバイスにデータベースを格納するようにしても良い。   In the above embodiment, the database is stored in the external storage device 2200. However, the database may be stored in a storage device or a storage device in the database management device 2100.

また、上記実施形態では、DBバッファ解放操作リスト8070の表またはインデクスを外部記憶装置2200に書き戻す例を示したが、データベース管理装置2100のストレージ装置にDBバッファ解放操作リスト8070の表またはインデクスを移動するようにしてもよい。   In the above-described embodiment, the table or index of the DB buffer release operation list 8070 is written back to the external storage device 2200. However, the table or index of the DB buffer release operation list 8070 is stored in the storage device of the database management device 2100. You may make it move.

また、上記実施形態では、インメモリ型データベースのメモリ領域2120の不足または不足の予兆を契機に、DBバッファ2130の一部を開放してメモリ領域2120に追加する例を示したが、データベース管理システム2110がインメモリ型データベースの表のデータを追加する指令を受けたときにDBバッファ2130の一部を開放してメモリ領域2120に追加するようにしてもよい。   In the above-described embodiment, an example in which a part of the DB buffer 2130 is released and added to the memory area 2120 when the memory area 2120 of the in-memory database is insufficient or an indication of a shortage has been shown. A part of the DB buffer 2130 may be released and added to the memory area 2120 when the 2110 receives a command to add data in the table of the in-memory database.

本発明は、インメモリ型データベースとディスク型データベースとを有するハイブリッド型データベースを提供する計算機に適用することができる。
The present invention can be applied to a computer that provides a hybrid database having an in-memory database and a disk database.

2100 データベース管理装置
2102 プロセッサ
2103 外部記憶装置入出力インターフェース
2104 主記憶装置
2110 データベース管理システム
2111 DBバッファ管理部
2112 DBバッファ解放対象決定部
2113 DBバッファ解放操作実行部
2120 メモリ領域
2130 DBバッファ
2200 外部記憶装置
8040 表・インデクス情報
8050 メモリ領域情報
2100 Database management device 2102 Processor 2103 External storage device input / output interface 2104 Main storage device 2110 Database management system 2111 DB buffer management unit 2112 DB buffer release target determination unit 2113 DB buffer release operation execution unit 2120 Memory area 2130 DB buffer 2200 External storage device 8040 Table / index information 8050 Memory area information

Claims (13)

プロセッサとメモリとストレージ装置に接続されたインターフェースを備えた計算機で、前記メモリ上の第1のメモリ領域に表とインデックスを格納するインメモリデータベースと、前記メモリ上の第2のメモリ領域に前記ストレージ装置に格納された表の一部とインデクスを格納するディスク型データベースと、を制御するデータベースの管理方法であって、
前記計算機が、前記インメモリ型データベースの第1のメモリ領域が不足することを検知する第1のステップと、
前記計算機が、第1のメモリ領域が不足することを検知したときに、前記ディスク型データベースの第2のメモリ領域に格納された表またはインデクスから削除する対象を選択する第2のステップと、
前記計算機が、前記削除する対象として選択された表またはインデクスを前記第2のメモリ領域から削除する第3のステップと、
前記計算機が、前記第2のメモリ領域から削除された表またはインデクスの領域を解放して、当該解放した領域を前記第1のメモリ領域に付加する第4のステップと、
を含むことを特徴とするデータベースの管理方法。
A computer having an interface connected to a processor, a memory, and a storage device, an in-memory database that stores a table and an index in a first memory area on the memory, and the storage in a second memory area on the memory A database management method for controlling a part of a table stored in a device and a disk type database for storing an index,
A first step in which the computer detects that the first memory area of the in-memory database is insufficient;
A second step of selecting a target to be deleted from a table or index stored in the second memory area of the disk-type database when the computer detects that the first memory area is insufficient;
A third step in which the computer deletes the table or index selected as the object to be deleted from the second memory area;
A fourth step in which the computer releases a table or index area deleted from the second memory area and adds the released area to the first memory area;
A database management method comprising:
請求項1に記載のデータベースの管理方法であって、
前記第2のステップは、
前記計算機が、前記第1のメモリ領域に追加する領域のサイズを拡張サイズとして演算する第5のステップと、
所定の順序で前記第2のメモリ領域に格納された表またはインデクスを削除する対象として順次選択する第6のステップと、を含み、
前記削除対象として選択された表またはインデクスの容量の総和が前記拡張サイズ以上となるまで前記第6のステップを繰り返すことを特徴とするデータベースの管理方法。
A database management method according to claim 1, comprising:
The second step includes
A fifth step in which the calculator calculates a size of an area to be added to the first memory area as an extended size;
A sixth step of sequentially selecting a table or index stored in the second memory area in a predetermined order as a target to be deleted; and
A database management method, wherein the sixth step is repeated until the total capacity of the tables or indexes selected as the deletion target becomes equal to or larger than the extension size.
請求項2に記載のデータベースの管理方法であって、
前記第2のステップは、
前記ディスク型データベースの表へのアクセス頻度を取得する第7のステップを含み、
前記第6のステップは、
前記アクセス頻度の低い順に前記表またはインデクスを前記削除する対象として順次選択することを特徴とするデータベースの管理方法。
A database management method according to claim 2, comprising:
The second step includes
Including a seventh step of obtaining an access frequency to the table of the disk-type database;
The sixth step includes
A database management method, wherein the table or index is sequentially selected as the deletion target in the order of low access frequency.
請求項2に記載のデータベースの管理方法であって、
前記第6のステップは、
前記第2のメモリ領域に格納されたインデクスにセカンダリインデクスが存在する場合には、当該セカンダリインデクスを削除対象として選択することを特徴とするデータベースの管理方法。
A database management method according to claim 2, comprising:
The sixth step includes
A database management method comprising: selecting a secondary index as a deletion target when a secondary index exists in the index stored in the second memory area.
請求項2に記載のデータベースの管理方法であって、
前記第6のステップは、
前記表ごとに削除比率を予め設定し、前記第2のメモリ領域に格納された表を前記所定の順序で選択し、当該選択した表が第2のメモリ領域で使用する容量に前記削除比率を乗じた容量を削除対象として選択することを特徴とするデータベースの管理方法。
A database management method according to claim 2, comprising:
The sixth step includes
A deletion ratio is preset for each table, tables stored in the second memory area are selected in the predetermined order, and the deletion ratio is set to a capacity used by the selected table in the second memory area. A database management method, wherein the multiplied capacity is selected as a deletion target.
請求項1に記載のデータベースの管理方法であって、
前記第3のステップは、
前記削除する対象として選択された表またはインデクスを、前記ストレージ装置に移動する指令を前記インターフェースに送信することを特徴とするデータベースの管理方法。
A database management method according to claim 1, comprising:
The third step includes
A database management method, comprising: transmitting an instruction for moving a table or an index selected as an object to be deleted to the storage apparatus to the interface.
プロセッサとメモリとストレージ装置に接続されたインターフェースとを備え、
前記メモリ上の第1のメモリ領域に表とインデックスを格納するインメモリデータベースと、
前記メモリ上の第2のメモリ領域に前記ストレージ装置に格納された表の一部とインデクスを格納するディスク型データベースと、
前記インメモリデータベースとディスク型データベースを制御する管理部と、
を備えたデータベースの管理装置であって、
前記管理部は、
前記インメモリ型データベースの第1のメモリ領域が不足することを検知したときに、前記ディスク型データベースの第2のメモリ領域に格納された表またはインデクスから削除する対象を選択する対象決定部と、
前記削除する対象として選択された表またはインデクスを前記第2のメモリ領域から削除して、前記第2のメモリ領域から削除された表またはインデクスの領域を解放し、当該解放した領域を前記第1のメモリ領域に付加する解放実行部と、
を備えたことを特徴とするデータベースの管理装置。
A processor, a memory, and an interface connected to the storage device;
An in-memory database that stores tables and indexes in a first memory area on the memory;
A disk-type database for storing a part of a table and an index stored in the storage device in a second memory area on the memory;
A management unit for controlling the in-memory database and the disk-type database;
A database management device comprising:
The management unit
An object determination unit that selects an object to be deleted from a table or index stored in the second memory area of the disk-type database when it is detected that the first memory area of the in-memory database is insufficient;
The table or index selected as the object to be deleted is deleted from the second memory area, the table or index area deleted from the second memory area is released, and the released area is released from the first memory area. A release execution unit to be added to the memory area of
A database management apparatus comprising:
請求項7に記載のデータベースの管理装置であって、
前記対象決定部は、
前記第1のメモリ領域に追加する領域のサイズを拡張サイズとして演算し、前記削除対象として選択された表またはインデクスの容量の総和が前記拡張サイズ以上となるまで、所定の順序で前記第2のメモリ領域に格納された表またはインデクスを削除する対象として順次選択することを特徴とするデータベースの管理装置。
The database management device according to claim 7,
The target determining unit
The size of the area to be added to the first memory area is calculated as an extended size, and the second size is added in a predetermined order until the total capacity of the table or index selected as the deletion target is equal to or larger than the extended size. A database management apparatus that sequentially selects a table or an index stored in a memory area as an object to be deleted.
請求項8に記載のデータベースの管理装置であって、
前記対象決定部は、
前記ディスク型データベースの表へのアクセス頻度を取得して、前記アクセス頻度の低い順に前記表またはインデクスを前記削除する対象として順次選択することを特徴とするデータベースの管理装置。
The database management apparatus according to claim 8, wherein
The target determining unit
An apparatus for managing a database, comprising: obtaining an access frequency to a table of the disk-type database, and sequentially selecting the table or index as the object to be deleted in order of increasing access frequency.
請求項8に記載のデータベースの管理装置であって、
前記対象決定部は、
前記第2のメモリ領域に格納されたインデクスにセカンダリインデクスが存在する場合には、当該セカンダリインデクスを削除対象として選択することを特徴とするデータベースの管理装置。
The database management apparatus according to claim 8, wherein
The target determining unit
A database management apparatus, wherein when a secondary index exists in an index stored in the second memory area, the secondary index is selected as a deletion target.
請求項8に記載のデータベースの管理装置であって、
前記対象決定部は、
前記表ごとに削除比率を予め設定し、前記第2のメモリ領域に格納された表を前記所定の順序で選択し、当該選択した表が第2のメモリ領域で使用する容量に前記削除比率を乗じた容量を削除対象として選択することを特徴とするデータベースの管理装置。
The database management apparatus according to claim 8, wherein
The target determining unit
A deletion ratio is preset for each table, tables stored in the second memory area are selected in the predetermined order, and the deletion ratio is set to a capacity used by the selected table in the second memory area. A database management apparatus that selects a multiplied capacity as a deletion target.
請求項7に記載のデータベースの管理装置であって、
前記解放実行部は、
前記削除する対象として選択された表またはインデクスを、前記ストレージ装置に移動する指令を前記インターフェースに送信することを特徴とするデータベースの管理装置。
The database management device according to claim 7,
The release execution unit
A database management apparatus, wherein a command for moving a table or an index selected as a deletion target to the storage apparatus is transmitted to the interface.
プロセッサとメモリとストレージ装置に接続されたインターフェースを備えた計算機で、前記メモリ上の第1のメモリ領域に表とインデックスを格納するインメモリデータベースと、前記メモリ上の第2のメモリ領域に前記ストレージ装置に格納された表の一部とインデクスを格納するディスク型データベースと、を制御するデータベースのプログラムであって、
前記インメモリ型データベースの第1のメモリ領域が不足することを検知する第1の手順と、
前記第1のメモリ領域が不足することを検知したときに、前記ディスク型データベースの第2のメモリ領域に格納された表またはインデクスから削除する対象を選択する第2の手順と、
前記削除する対象として選択された表またはインデクスを前記第2のメモリ領域から削除する第3の手順と、
前記第2のメモリ領域から削除された表またはインデクスの領域を解放して、当該解放した領域を前記第1のメモリ領域に付加する第4の手順と、
を前記計算機に実行させることを特徴とするプログラム。
A computer having an interface connected to a processor, a memory, and a storage device, an in-memory database that stores a table and an index in a first memory area on the memory, and the storage in a second memory area on the memory A database program for controlling a part of a table stored in a device and a disk type database for storing an index,
A first procedure for detecting that the first memory area of the in-memory database is insufficient;
A second procedure for selecting an object to be deleted from a table or index stored in the second memory area of the disk-type database when it is detected that the first memory area is insufficient;
A third procedure for deleting the table or index selected as the object to be deleted from the second memory area;
A fourth procedure for releasing a table or index area deleted from the second memory area and adding the released area to the first memory area;
Is executed by the computer.
JP2011117730A 2011-05-26 2011-05-26 Database management method, database management device, and program Withdrawn JP2012247901A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2011117730A JP2012247901A (en) 2011-05-26 2011-05-26 Database management method, database management device, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2011117730A JP2012247901A (en) 2011-05-26 2011-05-26 Database management method, database management device, and program

Publications (1)

Publication Number Publication Date
JP2012247901A true JP2012247901A (en) 2012-12-13

Family

ID=47468309

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2011117730A Withdrawn JP2012247901A (en) 2011-05-26 2011-05-26 Database management method, database management device, and program

Country Status (1)

Country Link
JP (1) JP2012247901A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2014136172A1 (en) * 2013-03-04 2014-09-12 株式会社東芝 Database device, program, and data processing method
WO2014178854A1 (en) * 2013-04-30 2014-11-06 Hewlett-Packard Development Company, L.P. Memory network to route memory traffic and i/o traffic
KR101546333B1 (en) 2014-02-20 2015-08-25 주식회사 티맥스데이터 Apparatus for processing query in database with hybrid storages
KR101775107B1 (en) 2014-05-08 2017-09-05 주식회사 알티베이스 Hybrid DBMS and the method to manage table thereof
JP2020061032A (en) * 2018-10-11 2020-04-16 富士通株式会社 Database server management program, database server management method, and database system
JP2021074524A (en) * 2020-09-25 2021-05-20 株式会社ユニバーサルエンターテインメント Game machine
JP7459287B2 (en) 2020-03-23 2024-04-01 メンティアム テクノロジーズ インコーポレイテッド Digital-IMC hybrid system architecture for neural network acceleration

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5719083B2 (en) * 2013-03-04 2015-05-13 株式会社東芝 Database apparatus, program, and data processing method
WO2014136172A1 (en) * 2013-03-04 2014-09-12 株式会社東芝 Database device, program, and data processing method
JPWO2014136172A1 (en) * 2013-03-04 2017-02-09 株式会社東芝 Database apparatus, program, and data processing method
US10969970B2 (en) 2013-03-04 2021-04-06 Kabushiki Kaisha Toshiba Storage optimization of database in volatile and non-volatile storing unit
US9952975B2 (en) 2013-04-30 2018-04-24 Hewlett Packard Enterprise Development Lp Memory network to route memory traffic and I/O traffic
WO2014178854A1 (en) * 2013-04-30 2014-11-06 Hewlett-Packard Development Company, L.P. Memory network to route memory traffic and i/o traffic
KR101546333B1 (en) 2014-02-20 2015-08-25 주식회사 티맥스데이터 Apparatus for processing query in database with hybrid storages
US9904708B2 (en) 2014-02-20 2018-02-27 TmaxData Co., Ltd. Apparatus and method for processing query in database with hybrid storage
KR101775107B1 (en) 2014-05-08 2017-09-05 주식회사 알티베이스 Hybrid DBMS and the method to manage table thereof
JP2020061032A (en) * 2018-10-11 2020-04-16 富士通株式会社 Database server management program, database server management method, and database system
JP7459287B2 (en) 2020-03-23 2024-04-01 メンティアム テクノロジーズ インコーポレイテッド Digital-IMC hybrid system architecture for neural network acceleration
JP2021074524A (en) * 2020-09-25 2021-05-20 株式会社ユニバーサルエンターテインメント Game machine
JP7030922B2 (en) 2020-09-25 2022-03-07 株式会社ユニバーサルエンターテインメント Pachinko machine

Similar Documents

Publication Publication Date Title
US8521986B2 (en) Allocating storage memory based on future file size or use estimates
JP2012247901A (en) Database management method, database management device, and program
CN111309732B (en) Data processing method, device, medium and computing equipment
US9635123B2 (en) Computer system, and arrangement of data control method
US20070283091A1 (en) Method, computer and computer system for monitoring performance
JP2005196602A (en) System configuration changing method in unshared type database management system
US20170262196A1 (en) Load monitoring method and information processing apparatus
CN105446653A (en) Data merging method and device
CN103236989A (en) Cache control method, devices and system in content delivery network
JP2005338985A (en) Method and system for managing storage area
JP6269140B2 (en) Access control program, access control method, and access control apparatus
US20120166744A1 (en) Memory management method, computer system, and storage medium having program stored thereon
CN105095495A (en) Distributed file system cache management method and system
US20150186401A1 (en) Using file element accesses to select file elements in a file system to defragment
JP6582721B2 (en) Control device, storage system, and control program
JP2011192049A (en) Virtual machine system, automatic migration method, and automatic migration program
JP2021009561A (en) Data processing system, data processing device, and data processing program
US9870152B2 (en) Management system and management method for managing data units constituting schemas of a database
US20140058717A1 (en) Simulation system for simulating i/o performance of volume and simulation method
CN112597112A (en) Data processing method and device, electronic equipment and storage medium
US20140089611A1 (en) Memory management control system, memory management control method, and storage medium storing memory management control program
JP6568232B2 (en) Computer system and device management method
JP2006277530A (en) Allocation system, allocation apparatus, allocation method and program for the same
US9933944B2 (en) Information processing system and control method of information processing system
JP5899369B2 (en) Garbage collection that selects the area to be released based on the update of reference source information

Legal Events

Date Code Title Description
A300 Application deemed to be withdrawn because no request for examination was validly filed

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20140805