JP2012247901A - Database management method, database management device, and program - Google Patents
Database management method, database management device, and program Download PDFInfo
- 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
Links
Images
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
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
上記従来のインメモリ型データベースでは、有限の主記憶上にデータを配置するため、取り扱うデータの数やサイズに限りがある。このため、インメモリ型データベースの管理部と、ディスク型データベースの管理部を組み合わせたハイブリッド型データベースが提案されている。ハイブリッド型データベースでは、インメモリ型データベースで高速にアクセスするデータを管理し、レガシーなデータベースで主記憶の容量に制限されない大量のデータを管理する。 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.
しかしながら、上記従来のハイブリッド型データベースでは、インメモリ型データベースが使用する領域と、ディスク型データベースが使用する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.
以下、本発明の一実施形態を添付図面に基づいて説明する。 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
データベース管理装置2100は、プロセッサ2102と主記憶装置2104とネットワークインターフェース2101と外部記憶装置入出力インターフェース2103とを備えた計算機で構成されて、インメモリ型データベースとディスク型(オンディスク)データベースからなるハイブリッド型データベースを提供する。
The
ネットワークインターフェース2101は、ネットワーク2150に接続されて端末装置2140やクライアント端末装置2160と通信を行う。
The network interface 2101 is connected to the
外部記憶装置入出力インターフェース2103は、外部記憶装置2200に接続されており、プロセッサ2102からの指令に応じて外部記憶装置2200との間でデータの読み書きや、プログラムの読み込みを行う。外部記憶装置2200は、ディスクドライブや不揮発性の半導体記憶装置を含むストレージ装置で構成される。
The external storage device input /
外部記憶装置2200には、上記データベース管理装置2100が提供するディスク型データベースのデータ(表情報8010、インデクス情報8020)1001と、インメモリ型データベース(またはディスク型データベース)の定義情報等が格納される。なお、データベース管理装置2100の停止中は、外部記憶装置2200にインメモリ型データベースのデータを格納する。外部記憶装置2200はネットワークを介してデータベース管理装置2100に接続されるNAS等の装置で構成してもよい。
The
データベース管理装置2100のプロセッサ2102は、インメモリ型データベースとディスク型(オンディスク)データベースを提供するデータベース管理システム2110を実行する。データベース管理システム2110は外部記憶装置2200の所定の領域(図示省略)に格納されたプログラムで構成され、プロセッサ2102が主記憶装置2104へ当該プログラムを読み込んでから実行される。なお、外部記憶装置2200はデータベース管理システム2110のプログラムを格納する記憶媒体としても機能する。
The
データベース管理システム2110は、主記憶装置2104上に、インメモリ型データベースのメモリ領域2120と、ディスク型データベースのデータを入出力するためのバッファ領域(以下、DBバッファ)2130と、DBバッファ2130の表やインデクスなどを管理する表・インデクス情報8040と、インメモリ型データベースのメモリ領域2120の設定に関するメモリ領域情報8050を格納する。
The
また、主記憶装置2104上には、データベース管理システム2110がDBバッファ2130及びインメモリ型データベースのメモリ領域2120を操作する際に生成するDBバッファ解放対象リスト8060とDBバッファ解放操作リスト8070が保持される。
In addition, on the
データベース管理システム2110は、起動するとインメモリ型データベースのメモリ領域2120とDBバッファ2130を予め設定した容量または端末装置2140から指定された容量で主記憶装置2104上にそれぞれ設定する。
When activated, the
そして、データベース管理システム2110は、インメモリ型データベースのメモリ領域2120に予め設定された表(テーブル)2121または端末装置2140から指定された表2121とインデックス2122を外部記憶装置2200から読み込む。そして、クライアント端末装置2160で実行されるUAP(User Application Program)からのアクセス要求がインメモリ型データベースの場合には、メモリ領域2120をアクセスしてクライアント端末装置2160に応答する。
Then, the
また、データベース管理システム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
データベース管理システム2110が提供するハイブリッド型データベースが、クライアント端末装置2160のUAPからのリクエストに応答するデータの処理については、公知または周知のインメモリ型データベースとディスク型データベースの処理を適用すればよい。
For the processing of data in which the hybrid database provided by the
なお、DBバッファ2130及びインメモリ型データベースのメモリ領域2120の操作については後述する。
The operation of the
端末装置2140は、データベース管理装置2100の管理者などが利用する計算機で、入力装置と出力装置を備える。クライアント端末装置2160は、ハイブリッド型データベースの利用者などが使用する計算機で、入力装置と出力装置を備える。
The
<ソフトウェアの概要>
データベース管理システム2110は、インメモリ型データベースとディスク型データベースを管理する。このため、データベース管理システム2110は、インメモリ型データベースのメモリ領域2120とディスク型データベースのDBバッファ2130を管理するDBバッファ管理部2111と、メモリ領域2120を拡張する際に解放可能なDBバッファ2130の要素を格納するDBバッファ解放対象リスト8060と、DBバッファ2130から解放してインメモリ型データベースのメモリ領域2120加えるDBバッファ2130の要素を格納するDBバッファ解放操作リスト8070と、を有する。
<Software overview>
The
データベース管理システム2110は、クライアント端末装置2160からアクセス要求を受け付けると、アクセスの対象となる表がインメモリ型データベースとディスク型データベースの何れかを判定する。アクセスの対象となる表(テーブル)がインメモリ型データベースの場合にはインメモリ型データベースのメモリ領域2120にアクセスする。また、データベース管理システム2110は、アクセスの対象となる表がディスク型データベースの場合にはDBバッファ2130にアクセスする。
When the
データベース管理システム2110は、インメモリ型データベースへのアクセス要求を受け付けると、メモリ領域2120のインデックス2122または表2121を検索してデータを取得し、クライアント端末装置2160に応答する。図2の例では、インメモリ型データベースは、メモリ領域2120に表T1、表T3と、これらの表に対応するインデックスをメモリ領域2120に配置した例を示す。
Upon receiving an access request to the in-memory database, the
一方、データベース管理システム2110は、ディスク型データベースに対するアクセス要求を受け付けるとDBバッファ2130のインデックス2132または表2131あるいは外部記憶装置2200を検索してデータを取得し、クライアント端末装置2160に応答する。外部記憶装置2200には、図1で示したように、ディスク型データベースのデータである表8010とインデックス8020からなるディスクDBデータ1001が格納される。
On the other hand, when the
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
このとき、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
また、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
DBバッファ管理部2111は、インメモリ型データベースのメモリ領域2120の使用率が予め設定した閾値を超えたときにメモリ領域2120が不足すると判定する。なお、閾値は、図9で示すように、メモリ領域情報8050の容量不足検知割合8054に格納しておくことができる。
The DB buffer management unit 2111 determines that the
そして、インメモリ型データベースのメモリ領域2120の不足が判定されると、DBバッファ解放対象決定部2112で、DBバッファ2130から削減する要素(インデクス)を後述するように決定する。そして、DBバッファ解放操作実行部2113が決定された要素を主記憶装置2104から解放して、インメモリ型データベースのメモリ領域2120に加える。これによりDBバッファ管理部2111は、DBバッファ2130から削減した容量(領域)をメモリ領域2120に加えてメモリ領域2120を拡張する。
When it is determined that the
本発明は、インメモリ型データベースとディスク型データベースの双方を備えるハイブリッド型データベースにおいて、インメモリ型データベースのメモリ領域2120が不足する可能性があると判定されたときに、DBバッファ2130の要素のうちインデックス2132等が使用する領域を削減する。そして、削減によりインデックス2132から取得した主記憶装置2104の領域をインメモリ型データベースのメモリ領域2120に加える。
When it is determined that there is a possibility that the
インメモリ型データベースのメモリ領域2120に領域を追加することで、インメモリ型データベースの性能(例えば、応答)は向上する。一方、DBバッファ2130の削減によりディスク型データベースの性能は低下する。したがって、前記従来例のように予め拡張用の記憶領域を用意することなく、ハイブリッド型データベース全体の性能を確保しながらインメモリ型データベースの性能を向上させることができる。これにより、計算器資源を有効に利用することができる。
By adding an area to the
つまり、本発明では、DBバッファ2130のインデックス領域を削減することでディスク型データベースの性能を低下させる一方で、インメモリ型データベースのメモリ領域2120の拡張によりインメモリ型データベースの性能を向上させることで、ハイブリッド型データベース全体の性能を維持する。
That is, according to the present invention, the performance of the in-memory database is improved by extending the
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 /
表・インデクス情報8040は、図1で示すように、DBバッファ2130に格納された表の情報を保持する表情報8041と、表情報8041の表に定義されたインデクスの情報を保持するインデクス情報8042と、表情報8041の表に対するアクセスの頻度を保持する表アクセス頻度情報8043と、から構成される。
As shown in FIG. 1, the table /
一方、メモリ領域情報8050は、図9で示すように、インメモリ型データベースのメモリ領域2120に割り当てられた容量を保持するインメモリDB容量8051と、容量不足または不足する兆候を検知する閾値(割合)を保持する容量不足検知割合8054と、メモリ領域の拡張量を保持するメモリDB拡張割合8052と、メモリ領域2120に追加する主記憶装置2104の容量を保持するメモリ領域拡張サイズ8053から構成される。なお、容量不足を検知する閾値は、インメモリDB容量8051に対して実際に使用中の領域の割合の例を示す。この他、実際に使用中の領域の容量の上限値を閾値として設定してもよい。
On the other hand, as shown in FIG. 9, the
また、メモリDB拡張割合8052は、1回の操作でインメモリ型データベースのメモリ領域2120に付加する容量の比率を示し、この比率は、インメモリDB容量8051に乗ずる値が格納される。そして、メモリ領域拡張サイズ8053は、インメモリDB容量8051にメモリDB拡張割合8052を格納する。
The memory
図7は、表・インデクス情報8040を構成する表情報8041の一例を示す図である。
FIG. 7 is a diagram showing an example of the
表情報8041は、表の識別子を格納する表ID80411と、表の名称を格納する表名80412と、表に定義されたインデクスの数を格納する定義インデクス数80413と、表が使用しているDBバッファ内の容量を格納するDBバッファ容量80414と、1回の操作で削減可能なDBバッファ容量80414の比率を格納する削減割合80415からひとつのエントリが構成される。
図8は、表・インデクス情報8040を構成するインデクス情報8042の一例を示す図である。
FIG. 8 is a diagram showing an example of the
インデクス情報8042は、インデクスの識別子を格納するインデクスID80421と、インデクスの名称を格納するインデクス名80422と、当該インデクスが参照する表の識別子を格納する表ID80423と、当該インデクスがセカンダリインデクスであるか否かを識別するセカンダリインデクス識別80424と、当該インデクスが使用するDBバッファ2130上の容量を格納するDBバッファ容量80425からひとつのエントリが構成される。セカンダリインデクス識別80424が「1」であれば、当該インデクスはセカンダリインデクスであることを示し、「0」であればプライマリインデクスであることを示す。
The
図9は、メモリ領域2120の設定に関する情報を格納するメモリ領域情報8050の一例を示す図である。
FIG. 9 is a diagram illustrating an example of
メモリ領域情報8050は、インメモリ型データベースのメモリ領域2120の容量を格納するインメモリDB容量8051と、インメモリ型データベースのメモリ領域2120の不足を判定するために、メモリ領域2120の容量に対する実際の容量の比を使用率として、この使用率の閾値を格納する容量不足検知割合8054と、メモリ領域2120を拡張する際の比率を格納するメモリDB拡張割合8052と、メモリ領域2120を拡張する容量を格納するメモリ領域拡張サイズ8053と、を含む。
The
メモリDB拡張割合8052は、インメモリ型データベースに割り当てられた容量(インメモリDB容量8051)に対してメモリ領域2120を拡張する割合を予め格納しておく。メモリ領域拡張サイズ8053は、データベース管理システム2110が、インメモリ型データベースに割り当てられた領域2120の容量に対してメモリDB拡張割合8052を乗じた値を格納する。
The memory
上記メモリ領域情報8050の内容は、管理者などが操作する端末装置2140から入力しても良いし、所定のファイルからデータベース管理システム2110が読み込んで設定してもよい。
The contents of the
なお、上記図7、図8の表情報8041及びインデクス情報8042は、データベース管理システム2110によってデータの設定や更新を行うことができる。
The
図10は、表・インデクス情報8040を構成する表アクセス頻度情報8043の一例を示す図である。
FIG. 10 is a diagram showing an example of the table
表アクセス頻度情報8043は、表の識別子を格納する表ID80431と、当該表IDに対する1日当たりのアクセスの回数を格納するアクセス頻度80432と、から一つのエントリが構成される。
The table
データベース管理システム2110は、クライアント端末2160等からの要求に応じてディスク型データベースへのアクセスを受け付ける度に、表アクセス頻度情報8043の表ID80431に対応するアクセス頻度80432を更新する。
The
図11は、DBバッファ解放対象決定部2112が生成するDBバッファ解放対象リスト8060の一例を示す図である。
FIG. 11 is a diagram illustrating an example of the DB buffer
DBバッファ解放対象リスト8060は、解放の対象となるディスク型データベースの要素の種別を格納する解放対象種別8061と、解放の対象となる要素の名称を格納する解放対象名8062と、解放の対象となる要素のDBバッファ2130上の容量を格納する解放サイズ8063と、から一つのエントリが構成される。
The DB buffer
図12は、DBバッファ解放操作実行部2113が生成するDBバッファ解放操作リスト8070の一例を示す図である。
FIG. 12 is a diagram illustrating an example of the DB buffer
DBバッファ解放操作リスト8070は、解放の対象となるディスク型データベースの要素の名称を格納する解放対象8071と、解放の対象となる要素のDBバッファ2130上の容量を格納する解放容量8072と、から一つのエントリが構成される。
The DB buffer
<処理の概要>
図2は、本発明のデータベース管理システム2110が、インメモリ型データベースのメモリ領域2120が不足すると判定したときに、ディスク型データベースのDBバッファ2130の一部を削減し、削減した領域をインメモリ型データベースのメモリ領域2120に加えて拡張するメモリ操作の概要を示す図である。
<Outline of processing>
FIG. 2 shows that when the
データベース管理システム2110のDBバッファ管理部2111は、インメモリ型データベースのメモリ領域2120の使用率を監視して、メモリ領域2120の使用率が所定の閾値(容量不足検知割合8054)を超えると、インメモリ型データベースのメモリ領域2120が不足することを検出する。
The DB buffer management unit 2111 of the
インメモリ型データベースのメモリ領域2120の不足を検出するとDBバッファ管理部2111は、DBバッファ解放対象決定部2112を起動して、図4に示すDBバッファ解放対象決定処理(S600)を開始する。なお、DBバッファ解放対象決定処理(S600)は図1に示したDBバッファ解放対象決定部2112で行われる処理である。
When the shortage of the
DBバッファ解放対象決定処理S600では、メモリ領域情報8050のインメモリDB容量8051とメモリDB拡張割合8052からメモリ領域拡張サイズ8053を演算する。本実施形態では、1回の拡張でメモリ領域拡張サイズ8053ずつインメモリ型データベースのメモリ領域2120を拡張する例を示す。
In the DB buffer release target determination processing S600, the memory
次に、DBバッファ解放対象決定部2112は、メモリ削減操作の対象となるディスク型データベースの要素を抽出するため、表・インデクス情報8040から表情報8041、インデクス情報8042、表アクセス頻度情報8043を読み込む。DBバッファ解放対象決定部2112は、読み込んだ情報からDBバッファ解放対象リスト8060を後述するように生成する。
Next, the DB buffer release
DBバッファ解放対象決定部2112は、DBバッファ解放対象リスト8060を参照して、メモリ領域拡張サイズ8053を満たす容量になるまでディスク型データベースの要素を抽出する。そして、DBバッファ解放対象決定部2112は、抽出したディスク型データベースの要素からDBバッファ解放操作リスト8070を生成する。
The DB buffer release
DBバッファ管理部2111は、DBバッファ解放対象決定部2112の処理が完了すると、DBバッファ解放操作実行部2113を起動してDBバッファ解放操作を後述するように実行する(S700)。
When the processing of the DB buffer release
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
以上の処理によって、データベース管理システム2110は、DBバッファ2130からディスク型データベースの要素の一部を削除して、インメモリ型データベースのメモリ領域2120に加えることで、主記憶装置2104の領域を無駄なく利用しながらも、インメモリ型データベースのメモリが不足することを防止できる。
Through the above processing, the
<処理の詳細>
以下、データベース管理システム2110で行われるディスク型データベースのDBバッファ2130の一部を削減し、削減した記憶領域をインメモリ型データベースのメモリ領域2120に追加する処理の詳細を説明する。
<Details of processing>
The details of the processing performed by the
図3は、データベース管理システム2110で行われるメモリ操作の全体的な処理の一例を示すフローチャートである。この処理は、所定の周期(例えば、1分毎)で実行される。
FIG. 3 is a flowchart showing an example of the overall processing of the memory operation performed by the
ステップS200では、DBバッファ管理部2111が、メモリ領域情報8050を読み込んで、インメモリDB容量8051のうち実際に使用されている領域を監視して、実際に使用されている領域の比率が閾値である容量不足検知割合8054を超えていれば、インメモリ型データベースのメモリ領域2120が不足(または不足の予兆)することを検知する。メモリ領域2120が不足することを検知すると、データベース管理システム2110は、DBバッファ解放対象決定部2112を起動してステップS300へ進む。
In step S200, the DB buffer management unit 2111 reads the
ステップS300では、DBバッファ解放対象決定部2112がメモリ領域情報8050を読み込んでインメモリDB容量8051にメモリDB拡張割合8052を乗じて、メモリ領域拡張サイズ8053を演算する。
In step S300, the DB buffer release
ステップS400では、DBバッファ解放対象決定部2112が表・インデクス情報8040から表情報8041とインデクス情報8042を取得して、DBバッファ2130上に存在する表とインデクスを特定する。
In step S400, the DB buffer release
ステップS600では、DBバッファ解放対象決定部2112が、DBバッファ2130上に存在する表とインデクスから後述する図4の処理によって、DBバッファ解放対象となるディスク型データベースの要素を抽出してDBバッファ解放操作リスト8060を生成する。
In step S600, the DB buffer release
ステップ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
ステップ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
ステップ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
そして、ステップ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バッファ2130上から解放対象の要素が削除され、削除された領域がインメモリ型データベースのメモリ領域2120に加えられる。
Through the above processing, the element to be released is deleted from the
<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
ステップS602では、DBバッファ解放対象決定部2112が、上記ステップS601で生成したDBバッファ解放対象リスト8060の先頭のエントリからステップS603〜S606の処理を繰り返す。
In step S602, the DB buffer release
ステップ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
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
ステップS604では、DBバッファ解放対象決定部2112が、DBバッファ解放操作リスト8070に加えられたセカンダリインデクスの容量(解放容量8072)の合計をDBバッファ解放サイズとして演算する。
In step S604, the DB buffer release
ステップS605では、DBバッファ解放対象決定部2112が、ステップS300で求めたメモリ領域拡張サイズ8053と、ステップS604で求めたDBバッファ解放サイズを比較して、DBバッファ解放サイズがメモリ領域拡張サイズ8053以上であるか否かを判定する。
In step S605, the DB buffer release
DBバッファ解放サイズがメモリ領域拡張サイズ8053以上であれば、DBバッファ解放対象決定部2112は、DBバッファ2130から削減する領域がメモリ領域拡張サイズ8053以上になったので図4の処理を終了して図3の処理に戻る。
If the DB buffer release size is equal to or larger than the memory
一方、DBバッファ解放サイズがメモリ領域拡張サイズ8053未満であれば、DBバッファ解放対象決定部2112はステップS603に戻って、DBバッファ解放対象リスト8060の次のエントリについて上記処理を繰り返す(S606)。
On the other hand, if the DB buffer release size is less than the memory
DBバッファ解放対象決定部2112は、DBバッファ解放対象リスト8060の全てのエントリについて処理が終了してもDBバッファ解放サイズがメモリ領域拡張サイズ8053未満であればステップS806へ進む。つまり、現在生成されたセカンダリインデクスのみのDBバッファ解放操作リスト8070では、DBバッファ解放サイズが要求されるメモリ領域拡張サイズ8053に達しない場合である。
The DB buffer release
ステップS607では、DBバッファ解放対象決定部2112が、上記ステップS601で生成したDBバッファ解放対象リスト8060の先頭のエントリからステップS608〜S611の処理を繰り返す。なお、DBバッファ解放対象リスト8060は上述のようにアクセス頻度が低い順から高い順にソートされている。
In step S607, the DB buffer release
ステップ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
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
ステップS609では、DBバッファ解放対象決定部2112が、DBバッファ解放操作リスト8070に加えられたテーブルを含む解放容量8072の合計をDBバッファ解放サイズとして演算する。
In step S609, the DB buffer release
ステップS610では、DBバッファ解放対象決定部2112が、ステップS300で求めたメモリ領域拡張サイズ8053と、ステップS608で求めたDBバッファ解放サイズを比較して、DBバッファ解放サイズがメモリ領域拡張サイズ8053以上であるか否かを判定する。
In step S610, the DB buffer release
DBバッファ解放サイズがメモリ領域拡張サイズ8053以上であれば、DBバッファ解放対象決定部2112は、DBバッファ2130から削減する領域がメモリ領域拡張サイズ8053以上になったので図4の処理を終了して図3の処理に戻る。
If the DB buffer release size is equal to or larger than the memory
一方、DBバッファ解放サイズがメモリ領域拡張サイズ8053未満であれば、DBバッファ解放対象決定部2112はステップS607に戻って、DBバッファ解放対象リスト8060の次のエントリについて上記処理を繰り返す(S611)。
On the other hand, if the DB buffer release size is less than the memory
DBバッファ解放対象決定部2112は、上記図4の処理によって、DBバッファ2130のうちセカンダリインデクスをDBバッファ解放操作リスト8070に抽出して、DBバッファ解放サイズがメモリ領域拡張サイズ未満であれば、DBバッファ2130を使用中の表から所定の削減割合80415を削減してDBバッファ解放操作リスト8070に加えていく。
The DB buffer release
<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
DBバッファ解放対象決定部2112またはDBバッファ管理部2111は、ステップS661、S662、S663を繰り返すことで、DBバッファ解放操作リスト8070の先頭から終端までのエントリを読み込んで、解放容量8072の総和をDBバッファ解放サイズとして演算する。
The DB buffer release
<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
ステップS713では、DBバッファ解放操作実行部2113が解放操作リスト8070から一つのエントリを読み込んで、解放対象8071と解放容量8072を取得する。
In step S713, the DB buffer release operation execution unit 2113 reads one entry from the
ステップ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
なお、DBバッファ解放操作実行部2113は上記読み込んだ解放対象8071がセカンダリインデクスの場合には、外部記憶装置2200へ書き戻さずに削除するようにしても良い。
Note that the DB buffer release operation execution unit 2113 may delete the read
次に、ステップ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
上記ステップ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
以上の処理により、DBバッファ解放操作リスト8070に加えられたディスク型データベースの要素は、外部記憶装置2200へ書き戻されてからDBバッファ2130上で使用していた領域が解放される。
Through the above processing, the disk database element added to the DB buffer
<まとめ>
以上のように、本発明では、インメモリ型データベースのメモリ領域2120の実際の使用量が閾値(容量不足検知割合8054)を超えると、DBバッファ管理部2111はインメモリ型データベースのメモリ領域の不足または不足の予兆を検知する。
<Summary>
As described above, in the present invention, when the actual usage amount of the
メモリ領域2120の不足が検知されると、DBバッファ管理部2111は、DBバッファ2130の容量を削減して、インメモリ型データベースのメモリ領域2120に加えることで、主記憶装置2104の資源を無駄なく利用しながらインメモリ型データベースの性能を確保することができる。
When the shortage of the
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
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
このような処理により、まずアクセス頻度の低い順にセカンダリインデクスをDBバッファ2130から削除し、さらに、アクセス頻度の低い順に表の一部を所定の比率で削除することでDBバッファ2130の領域を解放することができる。なお、削除するデータは外部記憶装置2200へ書き戻しておく。
By such processing, first, the secondary indexes are deleted from the
そして、DBバッファ2130から解放した領域を、インメモリ型データベースのメモリ領域2120に追加することで、主記憶装置2104の資源を無駄なく利用しながら、インメモリ型データベースに必要な領域を迅速に確保することが可能となるのである。
Then, by adding the area released from the
なお、上記実施形態では、アクセス頻度の低い表の一部を外部記憶装置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
また、上記実施形態では、アクセス頻度の低い順にセカンダリインデクスをDBバッファ解放操作リスト8070へ加える例を示したが、セカンダリインデクスを用いたヒット率を監視してヒット率の低いセカンダリインデクスをDBバッファ2130から削除するようにしてもよい。
In the above embodiment, the secondary index is added to the DB buffer
また、上記実施形態では、外部記憶装置2200にデータベースを格納する例を示したが、データベース管理装置2100内のストレージ装置またはストレージデバイスにデータベースを格納するようにしても良い。
In the above embodiment, the database is stored in the
また、上記実施形態では、DBバッファ解放操作リスト8070の表またはインデクスを外部記憶装置2200に書き戻す例を示したが、データベース管理装置2100のストレージ装置にDBバッファ解放操作リスト8070の表またはインデクスを移動するようにしてもよい。
In the above-described embodiment, the table or index of the DB buffer
また、上記実施形態では、インメモリ型データベースのメモリ領域2120の不足または不足の予兆を契機に、DBバッファ2130の一部を開放してメモリ領域2120に追加する例を示したが、データベース管理システム2110がインメモリ型データベースの表のデータを追加する指令を受けたときにDBバッファ2130の一部を開放してメモリ領域2120に追加するようにしてもよい。
In the above-described embodiment, an example in which a part of the
本発明は、インメモリ型データベースとディスク型データベースとを有するハイブリッド型データベースを提供する計算機に適用することができる。
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
Claims (13)
前記計算機が、前記インメモリ型データベースの第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:
前記第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のステップは、
前記ディスク型データベースの表へのアクセス頻度を取得する第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.
前記第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.
前記第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.
前記第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:
前記対象決定部は、
前記第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.
前記対象決定部は、
前記ディスク型データベースの表へのアクセス頻度を取得して、前記アクセス頻度の低い順に前記表またはインデクスを前記削除する対象として順次選択することを特徴とするデータベースの管理装置。 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.
前記対象決定部は、
前記第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.
前記対象決定部は、
前記表ごとに削除比率を予め設定し、前記第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.
前記解放実行部は、
前記削除する対象として選択された表またはインデクスを、前記ストレージ装置に移動する指令を前記インターフェースに送信することを特徴とするデータベースの管理装置。 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のメモリ領域が不足することを検知する第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.
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)
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 |
-
2011
- 2011-05-26 JP JP2011117730A patent/JP2012247901A/en not_active Withdrawn
Cited By (13)
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 |