JP2009276941A - Determination device, program, and determination method - Google Patents

Determination device, program, and determination method Download PDF

Info

Publication number
JP2009276941A
JP2009276941A JP2008126519A JP2008126519A JP2009276941A JP 2009276941 A JP2009276941 A JP 2009276941A JP 2008126519 A JP2008126519 A JP 2008126519A JP 2008126519 A JP2008126519 A JP 2008126519A JP 2009276941 A JP2009276941 A JP 2009276941A
Authority
JP
Japan
Prior art keywords
access
access frequency
range
unit
tables
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.)
Pending
Application number
JP2008126519A
Other languages
Japanese (ja)
Inventor
Masahiro Okawa
昌弘 大川
So Kaishima
創 貝嶋
Akira Sakaguchi
明 坂口
Masakazu Sano
正和 佐野
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.)
International Business Machines Corp
Original Assignee
International Business Machines Corp
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 International Business Machines Corp filed Critical International Business Machines Corp
Priority to JP2008126519A priority Critical patent/JP2009276941A/en
Publication of JP2009276941A publication Critical patent/JP2009276941A/en
Pending legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To provide a determination device, a program, and a determination method for performing efficient table partition. <P>SOLUTION: This determination device for determining which of a plurality of table storage regions should each of a plurality of division tables obtained by dividing a table in a database be arranged in includes: an acquisition part for acquiring an access request to a table; a specification part for specifying an access range in the table from the acquired access request; a calculation part for calculating the access frequency of each record range of the table from the access range of each access request; and a determination part for determining a table storage region in which each division table should be arranged based on the access frequency of each record range of the table. <P>COPYRIGHT: (C)2010,JPO&INPIT

Description

本発明は、決定装置、プログラムおよび決定方法に関する。特に本発明は、データベースのテーブルを分割した分割テーブルの配置を決定する決定装置、プログラムおよび決定方法に関する。   The present invention relates to a determination device, a program, and a determination method. In particular, the present invention relates to a determination device, a program, and a determination method for determining the arrangement of a divided table obtained by dividing a database table.

SOX(サーベインス・オクスレー)法等の制定により、業務上保存しておかなければならないデータが増加し、これによりSAN(ストレージ エリア ネットワーク)等の非常に大きな記憶容量を有する記憶システムが用いられるようになってきた。しかしながら、保持すべきデータの増加に伴い、データ保持のための維持コストも増加してしまっていた。そこで、アクセス頻度の高いデータを維持コストは高いがアクセス性能は良い記憶装置に記憶させ、アクセス頻度の低いデータをアクセス性能は悪いが維持コストは低い記憶装置に記憶させるといった、効率の良いデータ管理が必要となってきた。なお、以下、このようなデータ管理のことをインフォメーションライフサイクルマネージメントと呼ぶ。   With the establishment of the SOX (Survey Oxley) Act, etc., the amount of data that must be preserved for business use increases, so that a storage system having a very large storage capacity such as a SAN (Storage Area Network) is used. It has become. However, with the increase in data to be retained, the maintenance cost for retaining data has also increased. Therefore, efficient data management, such as storing frequently accessed data in a storage device with high maintenance cost but good access performance, and storing data with low access frequency in storage device with poor access performance but low maintenance cost. Has become necessary. Hereinafter, such data management is referred to as information life cycle management.

また、データベースの容量の増大に伴い、データベース内の1個のテーブルを複数の分割テーブルに分割し、これらを物理的に異なる記憶領域に記憶させる、テーブルパーティションと呼ばれる技術が知られている(例えば、特許文献1、2参照)。このようなテーブルパーティション技術によれば、例えば、テーブルに新たなレコードを大量にロードしたり、テーブルから保存期間が過ぎたレコードを削除したりすることが容易となる。   Further, as the capacity of the database increases, a technique called table partition is known in which one table in a database is divided into a plurality of divided tables and stored in physically different storage areas (for example, Patent Documents 1 and 2). According to such a table partition technology, for example, it is easy to load a large number of new records into a table and to delete records whose retention period has passed from the table.

特開2001−142752号公報JP 2001-142752 A 特開2002−41333号公報JP 2002-41333 A

ところで、テーブルパーティションにより分割された各分割テーブルも、インフォメーションライフサイクルマネージメントを考慮して、記憶装置に格納させることが好ましい。しかしながら、テーブルパーティションにおいて、テーブルの分割範囲の指定はユーザによって行われていたので、分割対象となるテーブルに膨大な量のレコードが含まれる場合、最適な分割を行うことは困難であった。   By the way, each divided table divided by the table partition is preferably stored in the storage device in consideration of information life cycle management. However, in the table partition, since the table division range is specified by the user, it is difficult to perform the optimum division when the table to be divided includes a huge amount of records.

そこで本発明は、上記の課題を解決することのできる決定装置、プログラムおよび決定方法を提供することを目的とする。この目的は特許請求の範囲における独立項に記載の特徴の組み合わせにより達成される。また従属項は本発明の更なる有利な具体例を規定する。   Then, an object of this invention is to provide the determination apparatus, program, and determination method which can solve said subject. This object is achieved by a combination of features described in the independent claims. The dependent claims define further advantageous specific examples of the present invention.

本発明の第1の形態においては、データベース内のテーブルを分割した複数の分割テーブルのそれぞれを、複数のテーブル記憶領域のいずれに配置するかを決定する決定装置であって、テーブルに対するアクセス要求を取得する取得部と、取得したアクセス要求から、テーブル内のアクセス範囲を特定する特定部と、各アクセス要求のアクセス範囲からテーブルのレコード範囲毎のアクセス頻度を算出する算出部と、テーブルのレコード範囲毎のアクセス頻度に基づいて、それぞれの分割テーブルを配置するべきテーブル記憶領域を決定する決定部と、を備える決定装置を提供する。また、当該決定装置としてコンピュータを機能させる方法およびプログラムを提供する。   According to a first aspect of the present invention, there is provided a determination device for determining which of a plurality of divided tables obtained by dividing a table in a database is to be arranged in a plurality of table storage areas, wherein an access request for the table is issued. An acquisition unit to be acquired, a specifying unit for specifying an access range in the table from the acquired access request, a calculation unit for calculating an access frequency for each record range of the table from the access range of each access request, and a record range of the table A determination device is provided that includes a determination unit that determines a table storage area in which each divided table is to be arranged based on the access frequency for each. In addition, a method and a program for causing a computer to function as the determination device are provided.

本発明の第2の形態においては、データベース内のテーブルを分割した複数の分割テーブルのそれぞれを、複数のテーブル記憶領域のいずれに配置するかを決定する決定装置であって、複数のテーブルのそれぞれに対するアクセス要求を取得する取得部と、それぞれのテーブルについて取得したアクセス要求から、それぞれのテーブル内のアクセス範囲を特定する特定部と、それぞれのテーブルに対する各アクセス要求のアクセス範囲から、それぞれのテーブルのレコード範囲毎のアクセス頻度を算出する算出部と、テーブルのレコード範囲毎のアクセス頻度に基づいて、それぞれの分割テーブルを配置するべきテーブル記憶領域を決定する決定部と、を備え、複数のテーブル記憶領域は、それぞれのテーブル記憶領域が割り当てられた記憶装置のアクセス性能が高い順に優先順位付けられており、決定部は、テーブル記憶領域を優先順位がより高い順に選択する選択部と、複数のテーブルにおける基準アクセス頻度以上のアクセス頻度を有するレコード範囲の総データサイズが、選択されたテーブル記憶領域の使用可能サイズ以内となるように基準アクセス頻度を調整する調整部と、複数のテーブルのそれぞれから、基準アクセス頻度以上のアクセス頻度を有するレコード範囲を分割して分割テーブルを生成する分割部と、基準アクセス頻度以上のアクセス頻度を有するレコード範囲を分割した分割テーブルを、選択されたテーブル記憶領域に配置すべきことを決定する配置決定部と、を有する決定装置を提供する。   In the second aspect of the present invention, there is provided a determination device that determines in which of a plurality of table storage areas each of a plurality of divided tables obtained by dividing a table in a database, and each of the plurality of tables The acquisition unit that acquires the access request for each table, the specific unit that specifies the access range in each table from the access request acquired for each table, and the access range of each access request for each table, A plurality of table storages, comprising: a calculation unit that calculates an access frequency for each record range; and a determination unit that determines a table storage area in which each divided table is to be placed based on the access frequency for each record range of the table. The area is a memory to which each table storage area is allocated. The determination unit is configured to select a table storage area in order of higher priority, and a record range having an access frequency equal to or higher than a reference access frequency in a plurality of tables. Dividing a record range with an access frequency equal to or higher than the reference access frequency from each of a plurality of tables and an adjustment unit that adjusts the reference access frequency so that the total data size is within the usable size of the selected table storage area A dividing unit that generates a dividing table, and an arrangement determining unit that decides that a dividing table obtained by dividing a record range having an access frequency equal to or higher than the reference access frequency should be arranged in the selected table storage area. A decision device is provided.

なお、上記の発明の概要は、本発明の必要な特徴の全てを列挙したものではなく、これらの特徴群のサブコンビネーションもまた、発明となりうる。   The above summary of the invention does not enumerate all the necessary features of the present invention, and sub-combinations of these feature groups can also be the invention.

以下、発明の実施の形態を通じて本発明を説明するが、以下の実施形態は特許請求の範囲にかかる発明を限定するものではなく、また実施形態の中で説明されている特徴の組み合わせの全てが発明の解決手段に必須であるとは限らない。   Hereinafter, the present invention will be described through embodiments of the invention. However, the following embodiments do not limit the invention according to the scope of claims, and all combinations of features described in the embodiments are included. It is not necessarily essential for the solution of the invention.

図1は、本実施形態に係るデータベース装置10の構成を示す。データベース装置10は、データベースサーバ12と、複数の記憶装置14と、決定装置20とを備える。データベースサーバ12は、他の装置からデータベースリクエストを受け取り、受け取ったデーベースリクエストに応じたデータベース処理を実行する。   FIG. 1 shows a configuration of a database apparatus 10 according to the present embodiment. The database device 10 includes a database server 12, a plurality of storage devices 14, and a determination device 20. The database server 12 receives a database request from another device and executes database processing according to the received database request.

複数の記憶装置14のそれぞれは、データベースサーバ12により管理されるデータベース内のテーブルを格納する。複数の記憶装置14のそれぞれは、当該記憶装置14に割り当てられたテーブルを格納するテーブル記憶領域30を有する。テーブル記憶領域30は、例えば、テーブルスペースと呼ばれる。さらに、複数の記憶装置14のそれぞれは、ネットワーク16を介してデータベースサーバ12と接続された構成であってよい。   Each of the plurality of storage devices 14 stores a table in a database managed by the database server 12. Each of the plurality of storage devices 14 has a table storage area 30 for storing a table assigned to the storage device 14. The table storage area 30 is called a table space, for example. Further, each of the plurality of storage devices 14 may be configured to be connected to the database server 12 via the network 16.

決定装置20は、複数のテーブル記憶領域30に格納させるテーブルの配置を決定する。なお、決定装置20の詳細な構成については、図3以降において説明する。   The determination device 20 determines the arrangement of tables to be stored in the plurality of table storage areas 30. The detailed configuration of the determination device 20 will be described in FIG.

図2は、複数のテーブル記憶領域30および複数のテーブル記憶領域30に格納される複数の分割テーブル40の一例を示す。データベース装置10は、データベース内のテーブルを分割した複数の分割テーブル40を、複数のテーブル記憶領域30に分散して配置する。すなわち、データベース装置10は、テーブルパーティションを実行して生成した複数の分割テーブル40を、複数のテーブル記憶領域30に格納させる。さらに、データベース装置10は、データベース内の複数のテーブルについて、テーブルパーティションを実行する。また、データベース装置10は、一例として、複数のテーブルのそれぞれについて、テーブルの列(例えば、テーブルの主キーまたは日付型列)をキーとし、それぞれのテーブル毎に指定されたキーの値の範囲毎に分割した複数の分割テーブル40を、複数のテーブル記憶領域30に分散して配置してよい。   FIG. 2 shows an example of a plurality of table storage areas 30 and a plurality of divided tables 40 stored in the plurality of table storage areas 30. The database device 10 distributes a plurality of divided tables 40 obtained by dividing the tables in the database in a plurality of table storage areas 30. That is, the database apparatus 10 stores a plurality of divided tables 40 generated by executing table partitions in a plurality of table storage areas 30. Further, the database device 10 executes table partitioning for a plurality of tables in the database. Further, as an example, the database device 10 uses, for each of a plurality of tables, a table column (for example, a primary key of the table or a date type column) as a key, and each key value range specified for each table. A plurality of divided tables 40 may be distributed and arranged in a plurality of table storage areas 30.

また、複数のテーブル記憶領域30は、それぞれのテーブル記憶領域30が割り当てられた記憶装置14のアクセス性能が高い順に優先順位付けられている。記憶装置14のアクセス性能が高いとは、一例として、記憶装置14のスループットが高いことであってよい。また、記憶装置14のアクセス性能が高いとは、一例として、アクセス速度が速いことであってもよい。   The plurality of table storage areas 30 are prioritized in descending order of access performance of the storage devices 14 to which the respective table storage areas 30 are assigned. The high access performance of the storage device 14 may be, for example, a high throughput of the storage device 14. Further, the high access performance of the storage device 14 may be, for example, a high access speed.

図3は、本実施形態に係る決定装置20の機能構成を、複数のテーブル記憶領域30とともに示す。決定装置20は、データベース内のテーブルを分割した複数の分割テーブル40のそれぞれを、複数のテーブル記憶領域30のいずれに配置するかを決定する。そして、テーブル記憶領域30は、決定した配置に応じて、複数の分割テーブル40のそれぞれの格納位置を変更する。   FIG. 3 shows a functional configuration of the determination apparatus 20 according to the present embodiment together with a plurality of table storage areas 30. The determination device 20 determines in which of the plurality of table storage areas 30 each of the plurality of divided tables 40 obtained by dividing the table in the database. Then, the table storage area 30 changes the storage position of each of the plurality of divided tables 40 according to the determined arrangement.

決定装置20は、取得部52と、特定部54と、算出部56と、決定部58とを有する。取得部52は、複数のテーブルのそれぞれに対するアクセス要求を取得する。   The determination device 20 includes an acquisition unit 52, a specification unit 54, a calculation unit 56, and a determination unit 58. The acquisition unit 52 acquires an access request for each of the plurality of tables.

特定部54は、それぞれのテーブルについて取得したアクセス要求から、それぞれのテーブル内のアクセス範囲を特定する。算出部56は、それぞれのテーブルに対する各アクセス要求のアクセス範囲から、それぞれのテーブルのレコード範囲毎のアクセス頻度を算出する。   The specifying unit 54 specifies the access range in each table from the access request acquired for each table. The calculation unit 56 calculates the access frequency for each record range of each table from the access range of each access request for each table.

決定部58は、テーブルのレコード範囲毎のアクセス頻度に基づいて、それぞれの分割テーブル40を配置するべきテーブル記憶領域30を決定する。決定部58は、一例として、選択部62と、調整部64と、分割部66と、配置決定部68とを含んでよい。   The determining unit 58 determines the table storage area 30 in which each divided table 40 is to be placed based on the access frequency for each record range of the table. For example, the determination unit 58 may include a selection unit 62, an adjustment unit 64, a division unit 66, and an arrangement determination unit 68.

選択部62は、テーブル記憶領域30を優先順位がより高い順に選択する。調整部64は、複数のテーブルにおける基準アクセス頻度以上のアクセス頻度を有する、レコード範囲の総データサイズが、予め指定された又は選択部62により選択されたテーブル記憶領域30の使用可能サイズ以内となるように基準アクセス頻度を調整する。   The selection unit 62 selects the table storage area 30 in descending order of priority. The adjustment unit 64 has an access frequency equal to or higher than the reference access frequency in the plurality of tables, and the total data size of the record range is within the usable size of the table storage area 30 designated in advance or selected by the selection unit 62. The reference access frequency is adjusted as follows.

分割部66は、少なくとも1つのテーブルのレコード範囲毎のアクセス頻度に基づいて、当該少なくとも1つのテーブルを複数の分割テーブル40に分割する。分割部66は、一例として、複数のテーブルのそれぞれから、基準アクセス頻度以上のアクセス頻度を有するレコード範囲を分割して分割テーブル40を生成してよい。   The dividing unit 66 divides the at least one table into a plurality of divided tables 40 based on the access frequency for each record range of the at least one table. For example, the dividing unit 66 may generate the divided table 40 by dividing a record range having an access frequency equal to or higher than the reference access frequency from each of the plurality of tables.

配置決定部68は、それぞれのテーブルのレコード範囲毎のアクセス頻度に基づいて、それぞれの分割テーブル40、および、分割していないそれぞれのテーブルを配置すべきテーブル記憶領域30を決定する。配置決定部68は、一例として、基準アクセス頻度以上のアクセス頻度を有するレコード範囲を分割した分割テーブル40を、予め指定された又は選択部62により選択されたテーブル記憶領域30に配置すべきことを決定する。   The arrangement determining unit 68 determines each divided table 40 and the table storage area 30 where each non-divided table is to be arranged based on the access frequency for each record range of each table. For example, the arrangement determining unit 68 should arrange that the division table 40 obtained by dividing the record range having an access frequency equal to or higher than the reference access frequency should be arranged in the table storage area 30 designated in advance or selected by the selection unit 62. decide.

図4は、本実施形態に係る決定装置20の処理フローを示す。決定装置20は、データベース内のテーブルを分割した複数の分割テーブル40を、複数のテーブル記憶領域30に分散して配置する場合、以下のステップS11〜S16の処理を実行する。   FIG. 4 shows a processing flow of the determination apparatus 20 according to the present embodiment. The determination apparatus 20 executes the following steps S11 to S16 when the plurality of divided tables 40 obtained by dividing the table in the database are distributed and arranged in the plurality of table storage areas 30.

まず、ステップS11において、算出部56は、データベース内の複数のテーブルのそれぞれに対して、テーブルを分割する値の範囲を指定するための1個又は複数個のキー(例えば、列)の候補を設定する。算出部56は、使用者から入力された情報に応じて候補となるキーを設定してよい。   First, in step S11, the calculation unit 56 selects one or a plurality of key (for example, column) candidates for designating a range of values for dividing the table for each of the plurality of tables in the database. Set. The calculation unit 56 may set a candidate key in accordance with information input from the user.

続いて、ステップS12において、取得部52は、データベース内の複数のテーブルに対するアクセスを監視して、一定期間中に与えられた複数のテーブルに対するアクセス要求を取得する。取得部52は、一例として、外部の装置からデータベースサーバ12に与えられたクエリのログを取得することにより、複数のテーブルに対するアクセス要求を取得してよい。取得部52は、一例として、複数のテーブルのそれぞれを、例えば数時間、1日または1ヶ月等の間監視して得られた、それぞれのテーブルに対するアクセス要求を取得してよい。   Subsequently, in step S12, the acquisition unit 52 monitors access to a plurality of tables in the database, and acquires access requests to the plurality of tables given during a certain period. For example, the acquisition unit 52 may acquire an access request for a plurality of tables by acquiring a log of a query given to the database server 12 from an external device. For example, the acquisition unit 52 may acquire an access request for each table obtained by monitoring each of the plurality of tables for several hours, one day, one month, or the like.

続いて、ステップS13において、特定部54は、それぞれのテーブルについて取得した一定期間中に与えられた各アクセス要求から、それぞれのテーブル内のアクセス範囲を特定する。特定部54は、一例として、各アクセス要求により読み出しまたは書き込みがされたレコードの範囲を、テーブル内のアクセス範囲として特定してよい。   Subsequently, in step S <b> 13, the specifying unit 54 specifies an access range in each table from each access request given during a certain period acquired for each table. For example, the specifying unit 54 may specify a range of records read or written by each access request as an access range in the table.

特定部54は、一例として、それぞれのテーブルについて取得した各アクセス要求から、当該アクセス要求によりアクセスがされた1以上のレコードにおける、ステップS11で設定された1個又は複数個の候補となるキー毎の値の範囲を特定してよい。特定部54は、一例として、あるテーブルについて日付を表わす値を格納するキーが候補として選択された場合、各アクセス要求により読み出しまたは書き込みがされた1以上のレコードにおける当該キーの日付の範囲(例えば、X年X月X年からY年Y月Y日までといった範囲)を特定してよい。   For example, the specifying unit 54, for each key that is one or more candidates set in step S11 in one or more records accessed by the access request, from each access request acquired for each table. A range of values may be specified. For example, when a key that stores a value representing a date for a certain table is selected as a candidate, the specifying unit 54 selects the date range of the key in one or more records read or written by each access request (for example, , X year X month X year to Y year Y month Y day) may be specified.

また、特定部54は、一例として、外部の装置からデータベースサーバ12に与えられたクエリの検索条件に基づき、当該クエリにより読み出しまたは書き込みがされたレコードにおける、1個又は複数個の候補となるキー毎の値の範囲を特定してよい。なお、クエリの検索条件に基づく特定方法の一例については、図12において詳細に説明する。   For example, the specifying unit 54 may use one or more candidate keys in a record read or written by the query based on a query search condition given to the database server 12 from an external device. A range of values for each may be specified. An example of a specifying method based on the query search condition will be described in detail with reference to FIG.

続いて、ステップS14において、算出部56は、それぞれのテーブルに対する各アクセス要求のアクセス範囲から、それぞれのテーブルのレコード範囲毎のアクセス頻度を算出する。算出部56は、一例として、それぞれのテーブルに対する各アクセス要求のアクセス範囲から、それぞれのテーブルのそれぞれのレコードに対してされたアクセスを一定期間累積して、それぞれのテーブルのレコード範囲毎のアクセス頻度を算出してよい。   Subsequently, in step S14, the calculation unit 56 calculates the access frequency for each record range of each table from the access range of each access request for each table. As an example, the calculation unit 56 accumulates the access made to each record of each table for a certain period from the access range of each access request to each table, and the access frequency for each record range of each table. May be calculated.

算出部56は、一例として、それぞれのテーブルに対する各アクセス要求によりアクセスがされたレコードにおけるステップS11で設定された候補となるキー毎の値の範囲から、それぞれのテーブルのそれぞれのレコードに対してのアクセスを当該キーのそれぞれの値の範囲毎に一定期間累積してよい。そして、算出部56は、累積結果に基づき、複数のテーブルのそれぞれについて、1個又は複数個の候補となるキー毎における値の範囲毎のアクセス頻度を算出してよい。   As an example, the calculation unit 56 calculates the value for each record in each table from the range of values for each candidate key set in step S11 in the record accessed by each access request for each table. Access may be accumulated for a certain period of time for each value range of the key. Then, the calculation unit 56 may calculate the access frequency for each value range for each of a plurality of keys as one or a plurality of candidates based on the accumulation result.

続いて、ステップS15において、決定部58は、それぞれのテーブルのレコード範囲毎のアクセス頻度に基づいて、それぞれの分割テーブル40、および、分割していないそれぞれのテーブルを配置すべきテーブル記憶領域30を決定する。決定部58は、一例として、複数のテーブルのそれぞれについて、1個又は複数個の候補となるキー毎における値の範囲毎のアクセス頻度に基づいて、それぞれの分割テーブル40、および、分割していないそれぞれのテーブルを配置すべきテーブル記憶領域30を決定してよい。なお、ステップS15における処理については、詳細を図6において説明する。   Subsequently, in step S15, the determining unit 58 sets the table storage area 30 in which each divided table 40 and each table that is not divided are to be arranged based on the access frequency for each record range of each table. decide. As an example, the determination unit 58 does not divide each of the plurality of tables based on the access frequency for each value range for each of one or more candidate keys. You may determine the table storage area 30 which should arrange | position each table. Details of the processing in step S15 will be described with reference to FIG.

そして、ステップS16において、決定部58は、ステップS15で決定された配置に従って分割テーブル40の配置を変更する。決定装置20は、ステップS16の処理を終えると、当該フローを終了する。   In step S16, the determination unit 58 changes the arrangement of the division table 40 according to the arrangement determined in step S15. When the determination device 20 finishes the process of step S <b> 16, it ends the flow.

図5は、複数のテーブルのそれぞれについての、候補となるキーの値の範囲毎のアクセス頻度の一例を示す。本実施形態において、算出部56は、データベース内のデータパーティションの対象となる複数のテーブルのそれぞれについて、1個又は複数個の候補となるキー毎に、当該キーの値の範囲毎のアクセス頻度を算出する。   FIG. 5 shows an example of the access frequency for each range of candidate key values for each of a plurality of tables. In the present embodiment, the calculation unit 56 calculates the access frequency for each key value range for each of one or a plurality of candidate keys for each of a plurality of tables that are targets of data partitions in the database. calculate.

例えばデータベース内のテーブルTのキーK11が候補として選択された場合、算出部56は、図5の(A)に示されるような、テーブルTについてキーK11の値の範囲毎のアクセス頻度を算出する。また、例えばデータベース内のテーブルTのキーK21が候補として選択された場合、算出部56は、図5の(B)に示されるような、テーブルTについてキーK21の値の範囲毎のアクセス頻度を算出する。また、例えばデータベース内のテーブルTのキーK22が候補として選択された場合、算出部56は、図5の(C)に示されるような、テーブルTについてキーK22の値の範囲毎のアクセス頻度を算出する。また、例えばデータベース内のテーブルTのキーK31が候補として選択された場合、算出部56は、図5の(D)に示されるような、テーブルTについてキーK31の値の範囲毎のアクセス頻度を算出する。また、例えばデータベース内のテーブルTのキーK32が候補として選択された場合、算出部56は、図5の(E)に示されるような、テーブルTについてキーK32の値の範囲毎のアクセス頻度を算出する。 For example, when the key K 11 of the table T 1 in the database is selected as a candidate, the calculation unit 56 accesses the table T 1 for each range of values of the key K 11 as shown in FIG. Calculate the frequency. Further, for example, when the key K 21 of the table T 2 in the database is selected as a candidate, the calculation unit 56 performs the range of the value of the key K 21 for the table T 2 as shown in FIG. The access frequency is calculated. Further, for example, when the key K 22 of the table T 2 in the database is selected as a candidate, the calculation unit 56 performs the range of the value of the key K 22 for the table T 2 as shown in FIG. The access frequency is calculated. Further, for example, when the key K 31 of the table T 3 in the database is selected as a candidate, the calculation unit 56 performs the range of the value of the key K 31 for the table T 3 as shown in FIG. The access frequency is calculated. Further, for example, when the key K 32 of the table T 3 in the database is selected as a candidate, the calculation unit 56 sets the range of the value of the key K 32 for the table T 3 as shown in FIG. The access frequency is calculated.

また、算出部56は、一例として、図5の(A)〜(E)に表わされるような、候補として選択されたキーの値順に配列した場合の値の範囲毎のアクセス頻度を表すヒストグラムを算出してもよい。また、算出部56は、一例として、図5の(A)〜(E)に表わされるようなヒストグラムを最小二乗法等により近似することにより、キーの値に対するアクセス頻度を表わす関数を生成してもよい。   Further, as an example, the calculation unit 56 generates a histogram representing the access frequency for each range of values when arranged in the order of the values of the keys selected as candidates, as shown in (A) to (E) of FIG. It may be calculated. Further, as an example, the calculation unit 56 generates a function representing the access frequency for the key value by approximating a histogram as shown in FIGS. 5A to 5E by the least square method or the like. Also good.

図6は、図4に示したステップS15の処理フローを示す。図7は、テーブルTのキーK11、テーブルTのキーK21、テーブルTのキーK31の組合せの場合の、各キーの値の範囲毎のアクセス頻度および基準アクセス頻度の一例を示す。図8は、テーブルTのキーK11、テーブルTのキーK22、テーブルTのキーK31の組合せの場合の、各キーの値の範囲毎のアクセス頻度および基準アクセス頻度の一例を示す。図9は、テーブルTのキーK11、テーブルTのキーK21、テーブルTのキーK32の組合せの場合の、各キーの値の範囲毎のアクセス頻度および基準アクセス頻度の一例を示す。図10は、テーブルTのキーK11、テーブルTのキーK22、テーブルTのキーK32の組合せの場合の、各キーの値の範囲毎のアクセス頻度および基準アクセス頻度の一例を示す。 FIG. 6 shows a processing flow of step S15 shown in FIG. 7, the key K 11 of table T 1, the key K 21 of table T 2, in the case of a combination of keys K 31 of the table T 3, one example of the access frequency and the reference access frequency for each range of values for each key Show. 8, the key K 11 of table T 1, the key K 22 of table T 2, in the case of a combination of keys K 31 of the table T 3, one example of the access frequency and the reference access frequency for each range of values for each key Show. 9, the key K 11 of table T 1, the key K 21 of table T 2, in the case of a combination of keys K 32 of the table T 3, one example of the access frequency and the reference access frequency for each range of values for each key Show. Figure 10 is a key K 11 of table T 1, the key K 22 of table T 2, in the case of a combination of keys K 32 of the table T 3, one example of the access frequency and the reference access frequency for each range of values for each key Show.

決定部58は、図4に示されたステップS15において、以下のステップS20〜ステップS28の処理を実行する。まず、ステップS20において、選択部62は、複数のテーブル記憶領域30のうちのいずれかのテーブル記憶領域30を選択する。この場合において、選択部62は、テーブル記憶領域30を優先順位がより高い順に選択する。そして、選択部62は、選択したテーブル記憶領域30毎に、調整部64、分割部66および配置決定部68に対して以下のステップS21からステップS27の処理を実行させる(S20、S28)。   In step S15 shown in FIG. 4, the determination unit 58 executes the following processes of step S20 to step S28. First, in step S <b> 20, the selection unit 62 selects any one of the plurality of table storage areas 30. In this case, the selection unit 62 selects the table storage area 30 in descending order of priority. Then, the selecting unit 62 causes the adjusting unit 64, the dividing unit 66, and the arrangement determining unit 68 to execute the following processing from step S21 to step S27 for each selected table storage area 30 (S20, S28).

テーブル記憶領域30が選択されると、続いて、ステップS21において、調整部64は、選択されたテーブル記憶領域30に格納させることができる分割テーブル40の容量を表わす使用可能サイズを算出する。調整部64は、一例として、選択されたテーブル記憶領域30の全容量に対する予め定められた割合(例えば、80%)を、使用可能サイズとして算出してよい。これにより、調整部64は、選択されたテーブル記憶領域30に格納された分割テーブル40の容量が変動した場合であっても、当該テーブル記憶領域30の総容量を超えないようにできる。   When the table storage area 30 is selected, subsequently, in step S <b> 21, the adjustment unit 64 calculates an available size representing the capacity of the divided table 40 that can be stored in the selected table storage area 30. For example, the adjustment unit 64 may calculate a predetermined ratio (for example, 80%) with respect to the total capacity of the selected table storage area 30 as the usable size. Thus, the adjustment unit 64 can prevent the total capacity of the table storage area 30 from being exceeded even when the capacity of the divided table 40 stored in the selected table storage area 30 varies.

続いて、調整部64は、複数のテーブルのそれぞれ毎に、ステップS11で候補として選択された1個または複数個のキーのうちいずれか1個のキーを指定する。そして、調整部64は、複数のテーブルに対して指定されるキーの組合せ毎に、ステップS23の処理を実行する(S22、S24)。   Subsequently, the adjustment unit 64 designates one of the one or a plurality of keys selected as candidates in step S11 for each of the plurality of tables. Then, the adjustment unit 64 executes the process of step S23 for each key combination designated for the plurality of tables (S22, S24).

例えば、図5に示されたようなキーが候補として選択された場合においては、調整部64は、以下の4つの組合せのそれぞれについて、ステップS23の処理を実行してよい。
第1の組合せ:テーブルTのキーK11、テーブルTのキーK21、テーブルTのキーK31
第2の組合せ:テーブルTのキーK11、テーブルTのキーK22、テーブルTのキーK31
第3の組合せ:テーブルTのキーK11、テーブルTのキーK21、テーブルTのキーK32
第4の組合せ:テーブルTのキーK11、テーブルTのキーK22、テーブルTのキーK32
For example, when a key as shown in FIG. 5 is selected as a candidate, the adjustment unit 64 may execute the process of step S23 for each of the following four combinations.
First combination: Table T 1 of the key K 11, table T 2 of the key K 21, key K 31 of the table T 3
Second combination: Table T 1 of the key K 11, table T 2 of the key K 22, key K 31 of the table T 3
Third combination: Table T 1 of the key K 11, key K 21 of table T 2, the key K 32 of the table T 3
Fourth combination: Table T 1 of the key K 11, key K 22 of table T 2, the key of the table T 3 K 32

そして、ステップS23において、調整部64は、複数のテーブルにおける基準アクセス頻度以上のアクセス頻度を有する、レコード範囲の総データサイズが、選択されたテーブル記憶領域30の使用可能サイズ以内となるように基準アクセス頻度を調整する。本実施形態においては、調整部64は、複数のテーブルにおける、基準アクセス頻度以上のアクセス頻度となる指定されたキーの値を有するレコードのうち、レコードの総データサイズが、使用可能サイズ以内となるように基準アクセス頻度を調整する。より具体的には、調整部64は、次のように基準アクセス頻度を調整してよい。   In step S23, the adjustment unit 64 sets the reference data so that the total data size of the record range having an access frequency equal to or higher than the reference access frequency in the plurality of tables is within the usable size of the selected table storage area 30. Adjust access frequency. In the present embodiment, the adjustment unit 64 has a total data size of records within a usable size among records having a specified key value that has an access frequency equal to or higher than the reference access frequency in a plurality of tables. The reference access frequency is adjusted as follows. More specifically, the adjustment unit 64 may adjust the reference access frequency as follows.

まず、調整部64は、基準アクセス頻度として、任意の初期値を設定する。続いて、調整部64は、複数のテーブルのそれぞれについて、指定されたキーの値順に配列した場合の値の範囲毎のアクセス頻度を表わすヒストグラム、または、当該ヒストグラムを表わす関数を呼び出す。続いて、調整部64は、複数のテーブルのそれぞれについて、指定されたキーの値の範囲毎のアクセス頻度と基準アクセス頻度とを比較して、基準アクセス頻度以上となるアクセス頻度を有する、指定されたキーの値の範囲を抽出する。   First, the adjustment unit 64 sets an arbitrary initial value as the reference access frequency. Subsequently, for each of the plurality of tables, the adjustment unit 64 calls a histogram representing an access frequency for each range of values when arranged in the order of values of designated keys, or a function representing the histogram. Subsequently, for each of the plurality of tables, the adjustment unit 64 compares the access frequency for each specified key value range with the reference access frequency, and has a specified access frequency that is equal to or higher than the reference access frequency. Extract a range of key values.

続いて、調整部64は、複数のテーブルにおける指定されたキーの値が抽出した値の範囲に一致するレコードの総データサイズを算出する。調整部64は、一例として、複数のテーブルのそれぞれ毎に、指定されたキーの値が抽出した値の範囲に一致するレコードの個数を算出し、予め設定された1レコード当たりの容量と算出したレコードの個数とを乗じて、テーブル毎の個別データサイズを算出してよい。そして、調整部64は、一例として、複数のテーブルのそれぞれの個別データサイズを総計して、総データサイズを算出してよい。   Subsequently, the adjustment unit 64 calculates the total data size of the records in which the specified key value in the plurality of tables matches the extracted value range. For example, the adjustment unit 64 calculates, for each of a plurality of tables, the number of records in which the specified key value matches the extracted value range, and calculates the preset capacity per record. The individual data size for each table may be calculated by multiplying the number of records. For example, the adjustment unit 64 may calculate the total data size by adding up the individual data sizes of the plurality of tables.

続いて、調整部64は、総データサイズと、使用可能サイズとを比較する。続いて、調整部64は、総データサイズが使用可能サイズより大きければ基準アクセス頻度を高くし、総データサイズが使用可能サイズより小さければ基準アクセス頻度を低く設定する。調整部64は、以上の処理を繰り返して、総データサイズが使用可能サイズを超えない最も低い値となるように、基準アクセス頻度を調整する。このようにして、調整部64は、複数のテーブルにおける、基準アクセス頻度以上のアクセス頻度となる指定されたキーの値を有するレコードのうち、レコードの総データサイズが、使用可能サイズ以内となるように基準アクセス頻度を調整することができる。   Subsequently, the adjustment unit 64 compares the total data size with the usable size. Subsequently, the adjustment unit 64 increases the reference access frequency if the total data size is larger than the usable size, and sets the reference access frequency low if the total data size is smaller than the usable size. The adjustment unit 64 repeats the above processing to adjust the reference access frequency so that the total data size becomes the lowest value that does not exceed the usable size. In this way, the adjustment unit 64 makes the total data size of the records within the usable size among the records having the designated key value having the access frequency equal to or higher than the reference access frequency in the plurality of tables. The reference access frequency can be adjusted.

調整部64は、候補となるキーの全ての組合せについてステップS23の処理を実行して、候補となるキーの全ての組合せのそれぞれについて基準アクセス頻度を調整する。図5に示されたようなキーが候補として選択された場合には、例えば、図7〜図10に示されるような基準アクセス頻度に調整してよい。   The adjustment unit 64 executes the process of step S23 for all combinations of candidate keys, and adjusts the reference access frequency for each of all combinations of candidate keys. When the key as shown in FIG. 5 is selected as a candidate, for example, the reference access frequency as shown in FIGS. 7 to 10 may be adjusted.

すなわち、調整部64は、第1の組合せ(即ち、テーブルTのキーK11、テーブルTのキーK21、テーブルTのキーK31の組合せ)については、図7に示されるような基準アクセス頻度に調整する。調整部64は、第2の組合せ(即ち、テーブルTのキーK11、テーブルTのキーK22、テーブルTのキーK31の組合せ)については、図8に示されるような基準アクセス頻度に調整する。調整部64は、第3の組合せ(即ち、テーブルTのキーK11、テーブルTのキーK21、テーブルTのキーK32)については、図9に示されるような基準アクセス頻度に調整する。調整部64は、第4の組合せ(即ち、テーブルTのキーK11、テーブルTのキーK22、テーブルTのキーK32の組合せ)については、図10に示されるような基準アクセス頻度に調整する。 That is, the adjusting section 64, the first combination (i.e., key K 11 of table T 1, the key K 21 of table T 2, the key combination K 31 of the table T 3) for, as shown in FIG. 7 Adjust to the standard access frequency. Adjusting section 64, a second combination (i.e., key K 11 of table T 1, the key K 22 of table T 2, the key combination K 31 of the table T 3) for the reference access as shown in FIG. 8 Adjust to frequency. Adjusting section 64, the third combination (i.e., key K 11 of table T 1, the key K 21 of table T 2, the key K 32 Table T 3) for, in reference access frequency as shown in FIG. 9 adjust. Adjusting section 64, the fourth combination (i.e., key K 11 of table T 1, the key K 22 of table T 2, the key combination K 32 of the table T 3) for the reference access as shown in Figure 10 Adjust to frequency.

調整部64は、候補となるキーの全ての組合せについて基準アクセス頻度の調整が完了すると(S24)、処理をステップS25に進める。続くステップS25において、調整部64は、調整した基準アクセス頻度がより低くなるように複数のテーブルのそれぞれの分割に用いるキーの組合せを選択する。調整部64は、一例として、候補となるキーの全ての組合せのうち、調整した基準アクセス頻度が最も低くなるキーの組合せを選択してよい。   When the adjustment of the reference access frequency is completed for all combinations of candidate keys (S24), the adjustment unit 64 advances the process to step S25. In subsequent step S25, the adjustment unit 64 selects a combination of keys to be used for dividing each of the plurality of tables so that the adjusted reference access frequency becomes lower. For example, the adjustment unit 64 may select a combination of keys with the lowest adjusted reference access frequency among all combinations of candidate keys.

また、この場合において、調整部64は、一例として、少なくとも1つのテーブルについて、当該テーブルの各レコードをキーの値順に配列した場合に基準アクセス頻度以上のアクセス頻度を有するレコード範囲が基準数以上に分断されないことを条件として、当該テーブルの分割に用いるキーを選択してよい。例えば、図9に示されるテーブルTの場合、キーの値順に配列した場合に基準アクセス頻度以上のアクセス頻度を有するレコード範囲が、7個に分断される。このような場合、調整部64は、例えば基準数が6個以下に設定されていれば、図9に示されるキーの組合せの基準アクセス頻度が最も低くても、他のキーの組合せを選択する。これにより、調整部64は、分割テーブル40の数が多くなりすぎることを防止することができる。 In this case, as an example, the adjustment unit 64 has, for at least one table, a record range having an access frequency equal to or higher than the reference access frequency when the records in the table are arranged in the order of the key values. A key used for dividing the table may be selected on the condition that the table is not divided. For example, if the table T 3 shown in FIG record range with a reference access frequency or access frequency when arranged in value order of the key, it is divided into seven. In such a case, for example, if the reference number is set to 6 or less, the adjustment unit 64 selects another key combination even if the reference access frequency of the key combination shown in FIG. 9 is the lowest. . Thereby, the adjustment part 64 can prevent that the number of the division | segmentation tables 40 increases too much.

続いて、ステップS26において、分割部66は、少なくとも1つのテーブルのレコード範囲毎のアクセス頻度に基づいて、当該少なくとも1つのテーブルを複数の分割テーブル40に分割する。分割部66は、一例として、複数のテーブルのそれぞれから、基準アクセス頻度以上のアクセス頻度を有するレコード範囲を分割する。この場合において、分割部66は、一例として、複数のテーブルのそれぞれのレコードをステップS25で選択された組合せのキーの値順に配列し、このように配列された状態でそれぞれのテーブルを基準アクセス頻度以上となるキーの値の範囲に応じて分割してよい。   Subsequently, in step S <b> 26, the dividing unit 66 divides the at least one table into a plurality of divided tables 40 based on the access frequency for each record range of the at least one table. For example, the dividing unit 66 divides a record range having an access frequency equal to or higher than the reference access frequency from each of the plurality of tables. In this case, as an example, the dividing unit 66 arranges the records of the plurality of tables in the order of the key values of the combination selected in step S25, and sets each table in the state of being arranged in this manner as the reference access frequency. You may divide | segment according to the range of the key value used as the above.

続いて、ステップS27において、配置決定部68は、基準アクセス頻度以上のアクセス頻度を有するレコード範囲を分割した分割テーブル40を、選択されたテーブル記憶領域30に配置すべきことを決定する。選択部62は、ステップS27の処理を終えると、ステップS20に戻って、優先順位が次に高いテーブル記憶領域30を選択して、ステップS21からステップS27の処理を実行する。そして、選択部62は、全てのテーブルの全てのレコード範囲を分割して、テーブル記憶領域30に配置すべきことを決定した場合には、当該フローを終了する。   Subsequently, in step S <b> 27, the arrangement determining unit 68 determines that the division table 40 obtained by dividing the record range having an access frequency equal to or higher than the reference access frequency should be arranged in the selected table storage area 30. After completing the process of step S27, the selection unit 62 returns to step S20, selects the table storage area 30 with the next highest priority, and executes the processes of step S21 to step S27. When the selection unit 62 divides all the record ranges of all the tables and determines that they should be arranged in the table storage area 30, the flow ends.

以上のような決定装置20は、基準アクセス頻度がより低くなるように、複数のテーブルのそれぞれの分割に用いるキーの組合せを選択する。これにより、決定装置20は、アクセス頻度のより高いレコードから順番に予め定められたテーブル記憶領域30に配置する場合において、当該テーブル記憶領域30にアクセス頻度のより低いレコードまでを格納することができる。すなわち、決定装置20は、アクセス頻度のより高いレコードから順番に予め定められたテーブル記憶領域30に配置する場合において、予め定められたテーブル記憶領域30により多くのレコードを格納することができる。これにより、決定装置20によれば、効率の良いテーブルパーティションをすることができる。   The determination device 20 as described above selects a key combination to be used for dividing each of the plurality of tables so that the reference access frequency becomes lower. Thereby, the determination apparatus 20 can store up to records with a lower access frequency in the table storage area 30 when arranging them in the predetermined table storage area 30 in order from a record with a higher access frequency. . That is, the determination device 20 can store a larger number of records in the predetermined table storage area 30 when arranging them in the predetermined table storage area 30 in order from the record with the higher access frequency. Thereby, according to the determination apparatus 20, an efficient table partition can be performed.

なお、決定部58は、優先順位が最も高いテーブル記憶領域30に配置するべき分割テーブル40の分割に用いたキーの組合せを、優先順位が2番目以降のテーブル記憶領域30に配置するべき分割テーブル40の分割に用いるキーの組合せとして用いてもよい。この場合において、調整部64は、優先順位が2番目以降のテーブル記憶領域30については、ステップS22〜S24において、候補となるキーの組合せ毎に基準アクセス頻度の調整を行うことに代えて、優先順位が最も高いテーブル記憶領域30に配置するべき分割テーブル40の分割に用いたキーの組合せについてのみ基準アクセス頻度の調整を行う。そして、この場合において、調整部64は、優先順位が2番目以降のテーブル記憶領域30については、ステップS25における処理も行わなくてよい。   Note that the determination unit 58 determines the combination of keys used for dividing the divided table 40 to be arranged in the table storage area 30 with the highest priority in the divided table to be arranged in the table storage area 30 with the second or higher priority. It may be used as a combination of keys used for 40 divisions. In this case, the adjustment unit 64 prioritizes the second and subsequent priority table storage areas 30 instead of adjusting the reference access frequency for each candidate key combination in steps S22 to S24. The reference access frequency is adjusted only for the combination of keys used for the division of the division table 40 to be arranged in the table storage area 30 with the highest rank. In this case, the adjustment unit 64 does not have to perform the process in step S25 for the table storage areas 30 with the second and subsequent priorities.

図11は、本実施形態の変形例に係る決定装置20の処理例を説明するための図を示す。より詳しくは、図11の(A)は、テーブルTのキーK11、テーブルTのキーK21、テーブルTのキーK31の組合せの場合の、各キーの値毎のアクセス頻度、第1基準アクセス頻度および第2の基準アクセス頻度の一例を示す。図11の(B)は、テーブルTのキーK11、テーブルTのキーK22、テーブルTのキーK31の組合せの場合の、各キーの値毎のアクセス頻度、第1基準アクセス頻度および第2の基準アクセス頻度の一例を示す。なお、本変形例に係る決定装置20は、図1〜図10において説明した本実施形態に係る決定装置20と略同一の機能および構成を取るので、図1〜図10において説明した部材と略同一の構成および機能を有する部材については図中に同一の符号を付けて、以下相違点を除き説明を省略する。 FIG. 11 is a diagram for explaining a processing example of the determination device 20 according to the modification of the present embodiment. More specifically, (A) in FIG. 11, the key K 11 of table T 1, the key K 21 of table T 2, in the case of a combination of keys K 31 of the table T 3, the access frequency of each value of each key, An example of the 1st standard access frequency and the 2nd standard access frequency is shown. (B) in FIG. 11, the key K 11 of table T 1, the key K 22 of table T 2, in the case of a combination of keys K 31 of the table T 3, the access frequency of each value of each key, a first reference access An example of a frequency and the 2nd standard access frequency is shown. Note that the determination device 20 according to this modification has substantially the same function and configuration as the determination device 20 according to the present embodiment described with reference to FIGS. Members having the same configuration and function are denoted by the same reference numerals in the drawings, and description thereof will be omitted except for differences.

アクセス性能の異なる複数のテーブル記憶領域30のそれぞれに、アクセス性能の順位を付けたとき、アクセス性能の差が大きい部分と、アクセス性能の差が小さい部分とが存在する場合がある。このような場合、アクセス頻度のより高いレコードから順番に分割テーブル40を配置していったときに、アクセス性能の差が大きい部分よりも上位側のテーブル記憶領域30に、より多くのレコードを格納することが好ましい。   When ranking the access performance for each of the plurality of table storage areas 30 having different access performance, there may be a portion where the difference in access performance is large and a portion where the difference in access performance is small. In such a case, when the divided table 40 is arranged in order from the record with the higher access frequency, a larger number of records are stored in the table storage area 30 on the upper side than the portion with the large difference in access performance. It is preferable to do.

例えば、図11の(A)および(B)に示された第1の基準アクセス頻度は、優先順位が1番目のテーブル記憶領域30に配置すべき分割テーブル40を算出する場合に用いられた基準アクセス頻度の一例を示す。また、図11の(A)および(B)に示された第2の基準アクセス頻度は、優先順位が1番目のテーブル記憶領域30および2番目のテーブル記憶領域30の両者を合成した領域に配置すべき分割テーブル40を算出する場合に用いた基準アクセス頻度の一例を示す。   For example, the first reference access frequency shown in FIGS. 11A and 11B is the reference used when calculating the divided table 40 to be placed in the first table storage area 30 with the priority order. An example of access frequency is shown. Further, the second reference access frequency shown in FIGS. 11A and 11B is arranged in an area in which both the first table storage area 30 and the second table storage area 30 are combined. An example of the reference access frequency used when calculating the division table 40 to be shown is shown.

1番目のテーブル記憶領域30と2番目のテーブル記憶領域30との間の性能差が、2番目のテーブル記憶領域30と3番目のテーブル記憶領域30との間の性能差より大きい場合、調整部64は、第1の基準アクセス頻度がより低くなるような複数のテーブルのそれぞれの分割に用いるキーの組合せを選択することが好ましい。例えば、図11の例においては、調整部64は、(A)の組合せを選択することが好ましい。   When the performance difference between the first table storage area 30 and the second table storage area 30 is larger than the performance difference between the second table storage area 30 and the third table storage area 30, the adjustment unit Preferably, 64 selects a combination of keys used for dividing each of the plurality of tables so that the first reference access frequency is lower. For example, in the example of FIG. 11, the adjustment unit 64 preferably selects the combination (A).

これに対して、2番目のテーブル記憶領域30と3番目のテーブル記憶領域30との間の性能差が、1番目のテーブル記憶領域30と2番目のテーブル記憶領域30との間の性能差より大きい場合、調整部64は、第1の基準アクセス頻度の高低に関わらず、第2の基準アクセス頻度がより低くなるような複数のテーブルのそれぞれの分割に用いるキーの組合せを選択することが好ましい。例えば、図11の例においては、調整部64は、(B)の組合せを選択することが好ましい。   In contrast, the performance difference between the second table storage area 30 and the third table storage area 30 is greater than the performance difference between the first table storage area 30 and the second table storage area 30. If larger, it is preferable that the adjustment unit 64 selects a combination of keys used for dividing each of the plurality of tables so that the second reference access frequency becomes lower regardless of whether the first reference access frequency is high or low. . For example, in the example of FIG. 11, the adjustment unit 64 preferably selects the combination (B).

そこで、調整部64は、性能差が大きい優先順位のテーブル記憶領域30の指定を予め受けて、予め指定された優先順位のテーブル記憶領域30に対して調整した基準アクセス頻度がより低くなるように複数のテーブルのそれぞれの分割に用いるキーの組み合わせを選択してよい。これにより、本変形例に係る決定装置20によれば、より効率の良くテーブルパーティションをすることができる。   Therefore, the adjustment unit 64 receives the specification of the priority table storage area 30 having a large performance difference in advance so that the reference access frequency adjusted for the pre-specified priority table storage area 30 becomes lower. You may select the key combination used for each division | segmentation of a some table. Thereby, according to the determination apparatus 20 which concerns on this modification, a table partition can be performed more efficiently.

図12の(A)は、外部の装置からデータベースサーバ12に対して発行されたSQL文の一例を示す。図12の(B)は、図12の(A)のSQL文が発行された場合におけるテーブルのアクセス範囲を取得するための範囲特定用のSQL文の一例を示す。   FIG. 12A shows an example of an SQL statement issued to the database server 12 from an external device. FIG. 12B shows an example of a range specifying SQL statement for acquiring the access range of the table when the SQL statement of FIG. 12A is issued.

特定部54は、一例として、取得したアクセス要求の対象となるテーブル中の当該アクセス要求により指定された検索条件を満たす少なくとも1つのレコードの中からキーの値の最大値および最小値を求める範囲特定用アクセス要求をデータベースサーバ12に対して発行することにより、当該テーブル内のアクセス範囲を特定してよい。特定部54は、一例として、外部の装置からデータベースサーバ12に与えられたセレクトステートメントにより指定された検索条件を満たす少なくとも1つのレコードの中から、分割に用いられる候補となるキーの値の最大値および最小値を求める範囲特定用セレクトステートメントをデータベースサーバ12に対して発行してよい。   For example, the specifying unit 54 specifies a range for obtaining the maximum value and the minimum value of the key value from at least one record satisfying the search condition specified by the access request in the acquired access request target table. The access range in the table may be specified by issuing an access request to the database server 12. As an example, the specifying unit 54 selects the maximum value of key values that are candidates for division from at least one record that satisfies the search condition specified by the select statement given to the database server 12 from an external device. A range specifying select statement for obtaining the minimum value may be issued to the database server 12.

例えば、図12の(A)に示されるようなセレクトステートメントが、外部の装置からデータベースサーバ12に与えられたとする。この場合、特定部54は、図12の(B)に示されるような、範囲確定用セレクトステートメントを発行する。   For example, assume that a select statement as shown in FIG. 12A is given to the database server 12 from an external device. In this case, the specifying unit 54 issues a range determination select statement as shown in FIG.

すなわち、特定部54は、検索条件を表わす句(図12の(A)の"where"以降の句)を複製し、当該検索条件により取得されるレコードの中における候補となる1個または複数個のキーのそれぞれの値の最大値および最小値を取得する範囲特定用セレクトステートメントを生成する。そして、特定部54は、生成した範囲特定用セレクトステートメントをデータベースサーバ12に対して発行して、応答結果を取得する。このようにして、特定部54は、それぞれのテーブルについてのアクセス要求によりアクセスがされた1以上のレコードにおける、1個又は複数個の候補となるキー毎の値の範囲を特定することができる。   That is, the specifying unit 54 duplicates a phrase representing the search condition (phrase after “where” in FIG. 12A), and one or a plurality of candidates in the record acquired by the search condition. Generate a select statement for range specification that obtains the maximum and minimum values of each key value. Then, the specifying unit 54 issues the generated range specifying select statement to the database server 12 and obtains a response result. In this manner, the specifying unit 54 can specify a range of values for each of one or more candidate keys in one or more records accessed by an access request for each table.

図13は、本実施形態に係るコンピュータ1900のハードウェア構成の一例を示す。本実施形態に係るコンピュータ1900は、ホスト・コントローラ2082により相互に接続されるCPU2000、RAM2020、グラフィック・コントローラ2075、及び表示装置2080を有するCPU周辺部と、入出力コントローラ2084によりホスト・コントローラ2082に接続される通信インターフェイス2030、ハードディスクドライブ2040、及びCD−ROMドライブ2060を有する入出力部と、入出力コントローラ2084に接続されるROM2010、フレキシブルディスク・ドライブ2050、及び入出力チップ2070を有するレガシー入出力部とを備える。   FIG. 13 shows an example of a hardware configuration of a computer 1900 according to the present embodiment. A computer 1900 according to this embodiment is connected to a CPU peripheral unit having a CPU 2000, a RAM 2020, a graphic controller 2075, and a display device 2080 that are connected to each other by a host controller 2082, and to the host controller 2082 by an input / output controller 2084. Input / output unit having communication interface 2030, hard disk drive 2040, and CD-ROM drive 2060, and legacy input / output unit having ROM 2010, flexible disk drive 2050, and input / output chip 2070 connected to input / output controller 2084 With.

ホスト・コントローラ2082は、RAM2020と、高い転送レートでRAM2020をアクセスするCPU2000及びグラフィック・コントローラ2075とを接続する。CPU2000は、ROM2010及びRAM2020に格納されたプログラムに基づいて動作し、各部の制御を行う。グラフィック・コントローラ2075は、CPU2000等がRAM2020内に設けたフレーム・バッファ上に生成する画像データを取得し、表示装置2080上に表示させる。これに代えて、グラフィック・コントローラ2075は、CPU2000等が生成する画像データを格納するフレーム・バッファを、内部に含んでもよい。   The host controller 2082 connects the RAM 2020 to the CPU 2000 and the graphic controller 2075 that access the RAM 2020 at a high transfer rate. The CPU 2000 operates based on programs stored in the ROM 2010 and the RAM 2020 and controls each unit. The graphic controller 2075 acquires image data generated by the CPU 2000 or the like on a frame buffer provided in the RAM 2020 and displays it on the display device 2080. Instead of this, the graphic controller 2075 may include a frame buffer for storing image data generated by the CPU 2000 or the like.

入出力コントローラ2084は、ホスト・コントローラ2082と、比較的高速な入出力装置である通信インターフェイス2030、ハードディスクドライブ2040、CD−ROMドライブ2060を接続する。通信インターフェイス2030は、ネットワークを介して他の装置と通信する。ハードディスクドライブ2040は、コンピュータ1900内のCPU2000が使用するプログラム及びデータを格納する。CD−ROMドライブ2060は、CD−ROM2095からプログラム又はデータを読み取り、RAM2020を介してハードディスクドライブ2040に提供する。   The input / output controller 2084 connects the host controller 2082 to the communication interface 2030, the hard disk drive 2040, and the CD-ROM drive 2060, which are relatively high-speed input / output devices. The communication interface 2030 communicates with other devices via a network. The hard disk drive 2040 stores programs and data used by the CPU 2000 in the computer 1900. The CD-ROM drive 2060 reads a program or data from the CD-ROM 2095 and provides it to the hard disk drive 2040 via the RAM 2020.

また、入出力コントローラ2084には、ROM2010と、フレキシブルディスク・ドライブ2050、及び入出力チップ2070の比較的低速な入出力装置とが接続される。ROM2010は、コンピュータ1900が起動時に実行するブート・プログラム、及び/又は、コンピュータ1900のハードウェアに依存するプログラム等を格納する。フレキシブルディスク・ドライブ2050は、フレキシブルディスク2090からプログラム又はデータを読み取り、RAM2020を介してハードディスクドライブ2040に提供する。入出力チップ2070は、フレキシブルディスク・ドライブ2050を入出力コントローラ2084へと接続すると共に、例えばパラレル・ポート、シリアル・ポート、キーボード・ポート、マウス・ポート等を介して各種の入出力装置を入出力コントローラ2084へと接続する。   The input / output controller 2084 is connected to the ROM 2010, the flexible disk drive 2050, and the relatively low-speed input / output device of the input / output chip 2070. The ROM 2010 stores a boot program that the computer 1900 executes at startup and / or a program that depends on the hardware of the computer 1900. The flexible disk drive 2050 reads a program or data from the flexible disk 2090 and provides it to the hard disk drive 2040 via the RAM 2020. The input / output chip 2070 connects the flexible disk drive 2050 to the input / output controller 2084 and inputs / outputs various input / output devices via, for example, a parallel port, a serial port, a keyboard port, a mouse port, and the like. Connect to controller 2084.

RAM2020を介してハードディスクドライブ2040に提供されるプログラムは、フレキシブルディスク2090、CD−ROM2095、又はICカード等の記録媒体に格納されて利用者によって提供される。プログラムは、記録媒体から読み出され、RAM2020を介してコンピュータ1900内のハードディスクドライブ2040にインストールされ、CPU2000において実行される。   A program provided to the hard disk drive 2040 via the RAM 2020 is stored in a recording medium such as the flexible disk 2090, the CD-ROM 2095, or an IC card and provided by the user. The program is read from the recording medium, installed in the hard disk drive 2040 in the computer 1900 via the RAM 2020, and executed by the CPU 2000.

コンピュータ1900にインストールされ、コンピュータ1900を決定装置20として機能させるプログラムは、取得モジュールと、特定モジュールと、算出モジュールと、決定モジュールとを備える。これらのプログラム又はモジュールは、CPU2000等に働きかけて、コンピュータ1900を、取得部52、特定部54、算出部56および決定部58としてそれぞれ機能させる。   A program that is installed in the computer 1900 and causes the computer 1900 to function as the determination device 20 includes an acquisition module, a specific module, a calculation module, and a determination module. These programs or modules work on the CPU 2000 or the like to cause the computer 1900 to function as the acquisition unit 52, the identification unit 54, the calculation unit 56, and the determination unit 58, respectively.

これらのプログラムに記述された情報処理は、コンピュータ1900に読込まれることにより、ソフトウェアと上述した各種のハードウェア資源とが協働した具体的手段である取得部52、特定部54、算出部56および決定部58として機能する。そして、これらの具体的手段によって、本実施形態におけるコンピュータ1900の使用目的に応じた情報の演算又は加工を実現することにより、使用目的に応じた特有の決定装置20が構築される。   The information processing described in these programs is read into the computer 1900, whereby the acquisition unit 52, the identification unit 54, and the calculation unit 56, which are specific means in which the software and the various hardware resources described above cooperate. And functions as the determination unit 58. And the specific determination apparatus 20 according to the intended use is constructed | assembled by implement | achieving the calculation or processing of the information according to the intended use of the computer 1900 in this embodiment by these specific means.

一例として、コンピュータ1900と外部の装置等との間で通信を行う場合には、CPU2000は、RAM2020上にロードされた通信プログラムを実行し、通信プログラムに記述された処理内容に基づいて、通信インターフェイス2030に対して通信処理を指示する。通信インターフェイス2030は、CPU2000の制御を受けて、RAM2020、ハードディスクドライブ2040、フレキシブルディスク2090、又はCD−ROM2095等の記憶装置上に設けた送信バッファ領域等に記憶された送信データを読み出してネットワークへと送信し、もしくは、ネットワークから受信した受信データを記憶装置上に設けた受信バッファ領域等へと書き込む。このように、通信インターフェイス2030は、DMA(ダイレクト・メモリ・アクセス)方式により記憶装置との間で送受信データを転送してもよく、これに代えて、CPU2000が転送元の記憶装置又は通信インターフェイス2030からデータを読み出し、転送先の通信インターフェイス2030又は記憶装置へとデータを書き込むことにより送受信データを転送してもよい。   As an example, when communication is performed between the computer 1900 and an external device or the like, the CPU 2000 executes a communication program loaded on the RAM 2020 and executes a communication interface based on the processing content described in the communication program. A communication process is instructed to 2030. Under the control of the CPU 2000, the communication interface 2030 reads transmission data stored in a transmission buffer area or the like provided on a storage device such as the RAM 2020, the hard disk drive 2040, the flexible disk 2090, or the CD-ROM 2095, and sends it to the network. The reception data transmitted or received from the network is written into a reception buffer area or the like provided on the storage device. As described above, the communication interface 2030 may transfer transmission / reception data to / from the storage device by a DMA (direct memory access) method. Instead, the CPU 2000 transfers the storage device or the communication interface 2030 as a transfer source. The transmission / reception data may be transferred by reading the data from the data and writing the data to the communication interface 2030 or the storage device of the transfer destination.

また、CPU2000は、ハードディスクドライブ2040、CD−ROMドライブ2060(CD−ROM2095)、フレキシブルディスク・ドライブ2050(フレキシブルディスク2090)等の外部記憶装置に格納されたファイルまたはデータベース等の中から、全部または必要な部分をDMA転送等によりRAM2020へと読み込ませ、RAM2020上のデータに対して各種の処理を行う。そして、CPU2000は、処理を終えたデータを、DMA転送等により外部記憶装置へと書き戻す。このような処理において、RAM2020は、外部記憶装置の内容を一時的に保持するものとみなせるから、本実施形態においてはRAM2020および外部記憶装置等をメモリ、記憶部、または記憶装置等と総称する。本実施形態における各種のプログラム、データ、テーブル、データベース等の各種の情報は、このような記憶装置上に格納されて、情報処理の対象となる。なお、CPU2000は、RAM2020の一部をキャッシュメモリに保持し、キャッシュメモリ上で読み書きを行うこともできる。このような形態においても、キャッシュメモリはRAM2020の機能の一部を担うから、本実施形態においては、区別して示す場合を除き、キャッシュメモリもRAM2020、メモリ、及び/又は記憶装置に含まれるものとする。   The CPU 2000 is all or necessary from among files or databases stored in an external storage device such as a hard disk drive 2040, a CD-ROM drive 2060 (CD-ROM 2095), and a flexible disk drive 2050 (flexible disk 2090). This portion is read into the RAM 2020 by DMA transfer or the like, and various processes are performed on the data on the RAM 2020. Then, CPU 2000 writes the processed data back to the external storage device by DMA transfer or the like. In such processing, since the RAM 2020 can be regarded as temporarily holding the contents of the external storage device, in the present embodiment, the RAM 2020 and the external storage device are collectively referred to as a memory, a storage unit, or a storage device. Various types of information such as various programs, data, tables, and databases in the present embodiment are stored on such a storage device and are subjected to information processing. Note that the CPU 2000 can also hold a part of the RAM 2020 in the cache memory and perform reading and writing on the cache memory. Even in such a form, the cache memory bears a part of the function of the RAM 2020. Therefore, in the present embodiment, the cache memory is also included in the RAM 2020, the memory, and / or the storage device unless otherwise indicated. To do.

また、CPU2000は、RAM2020から読み出したデータに対して、プログラムの命令列により指定された、本実施形態中に記載した各種の演算、情報の加工、条件判断、情報の検索・置換等を含む各種の処理を行い、RAM2020へと書き戻す。例えば、CPU2000は、条件判断を行う場合においては、本実施形態において示した各種の変数が、他の変数または定数と比較して、大きい、小さい、以上、以下、等しい等の条件を満たすかどうかを判断し、条件が成立した場合(又は不成立であった場合)に、異なる命令列へと分岐し、またはサブルーチンを呼び出す。   In addition, the CPU 2000 performs various operations, such as various operations, information processing, condition determination, information search / replacement, etc., described in the present embodiment, specified for the data read from the RAM 2020 by the instruction sequence of the program. Is written back to the RAM 2020. For example, when performing the condition determination, the CPU 2000 determines whether the various variables shown in the present embodiment satisfy the conditions such as large, small, above, below, equal, etc., compared to other variables or constants. When the condition is satisfied (or not satisfied), the program branches to a different instruction sequence or calls a subroutine.

また、CPU2000は、記憶装置内のファイルまたはデータベース等に格納された情報を検索することができる。例えば、第1属性の属性値に対し第2属性の属性値がそれぞれ対応付けられた複数のエントリが記憶装置に格納されている場合において、CPU2000は、記憶装置に格納されている複数のエントリの中から第1属性の属性値が指定された条件と一致するエントリを検索し、そのエントリに格納されている第2属性の属性値を読み出すことにより、所定の条件を満たす第1属性に対応付けられた第2属性の属性値を得ることができる。   Further, the CPU 2000 can search for information stored in a file or database in the storage device. For example, in the case where a plurality of entries in which the attribute value of the second attribute is associated with the attribute value of the first attribute are stored in the storage device, the CPU 2000 displays the plurality of entries stored in the storage device. The entry that matches the condition in which the attribute value of the first attribute is specified is retrieved, and the attribute value of the second attribute that is stored in the entry is read, thereby associating with the first attribute that satisfies the predetermined condition The attribute value of the specified second attribute can be obtained.

以上に示したプログラム又はモジュールは、外部の記録媒体に格納されてもよい。記録媒体としては、フレキシブルディスク2090、CD−ROM2095の他に、DVD又はCD等の光学記録媒体、MO等の光磁気記録媒体、テープ媒体、ICカード等の半導体メモリ等を用いることができる。また、専用通信ネットワーク又はインターネットに接続されたサーバシステムに設けたハードディスク又はRAM等の記憶装置を記録媒体として使用し、ネットワークを介してプログラムをコンピュータ1900に提供してもよい。   The program or module shown above may be stored in an external recording medium. As the recording medium, in addition to the flexible disk 2090 and the CD-ROM 2095, an optical recording medium such as DVD or CD, a magneto-optical recording medium such as MO, a tape medium, a semiconductor memory such as an IC card, and the like can be used. Further, a storage device such as a hard disk or RAM provided in a server system connected to a dedicated communication network or the Internet may be used as a recording medium, and the program may be provided to the computer 1900 via the network.

以上、本発明を実施の形態を用いて説明したが、本発明の技術的範囲は上記実施の形態に記載の範囲には限定されない。上記実施の形態に、多様な変更または改良を加えることが可能であることが当業者に明らかである。その様な変更または改良を加えた形態も本発明の技術的範囲に含まれ得ることが、特許請求の範囲の記載から明らかである。   As mentioned above, although this invention was demonstrated using embodiment, the technical scope of this invention is not limited to the range as described in the said embodiment. It will be apparent to those skilled in the art that various modifications or improvements can be added to the above-described embodiment. It is apparent from the scope of the claims that the embodiments added with such changes or improvements can be included in the technical scope of the present invention.

図1は、本実施形態に係るデータベース装置10の構成を示す。FIG. 1 shows a configuration of a database apparatus 10 according to the present embodiment. 図2は、複数のテーブル記憶領域30および複数のテーブル記憶領域30に格納される複数の分割テーブル40の一例を示す。FIG. 2 shows an example of a plurality of table storage areas 30 and a plurality of divided tables 40 stored in the plurality of table storage areas 30. 図3は、本実施形態に係る決定装置20の機能構成を、複数のテーブル記憶領域30とともに示す。FIG. 3 shows a functional configuration of the determination apparatus 20 according to the present embodiment, together with a plurality of table storage areas 30. 図4は、本実施形態に係る決定装置20の処理フローを示す。FIG. 4 shows a processing flow of the determination apparatus 20 according to the present embodiment. 図5は、複数のテーブルのそれぞれについての、候補となるキーの値の範囲毎のアクセス頻度の一例を示す。FIG. 5 shows an example of the access frequency for each range of candidate key values for each of a plurality of tables. 図6は、図4に示したステップS15の処理フローを示す。FIG. 6 shows a processing flow of step S15 shown in FIG. 図7は、テーブルTのキーK11、テーブルTのキーK21、テーブルTのキーK31の組合せの場合の、各キーの値の範囲毎のアクセス頻度および基準アクセス頻度の一例を示す。7, the key K 11 of table T 1, the key K 21 of table T 2, in the case of a combination of keys K 31 of the table T 3, one example of the access frequency and the reference access frequency for each range of values for each key Show. 図8は、テーブルTのキーK11、テーブルTのキーK22、テーブルTのキーK31の組合せの場合の、各キーの値の範囲毎のアクセス頻度および基準アクセス頻度の一例を示す。8, the key K 11 of table T 1, the key K 22 of table T 2, in the case of a combination of keys K 31 of the table T 3, one example of the access frequency and the reference access frequency for each range of values for each key Show. 図9は、テーブルTのキーK11、テーブルTのキーK21、テーブルTのキーK32の組合せの場合の、各キーの値の範囲毎のアクセス頻度および基準アクセス頻度の一例を示す。9, the key K 11 of table T 1, the key K 21 of table T 2, in the case of a combination of keys K 32 of the table T 3, one example of the access frequency and the reference access frequency for each range of values for each key Show. 図10は、テーブルTのキーK11、テーブルTのキーK22、テーブルTのキーK32の組合せの場合の、各キーの値の範囲毎のアクセス頻度および基準アクセス頻度の一例を示す。Figure 10 is a key K 11 of table T 1, the key K 22 of table T 2, in the case of a combination of keys K 32 of the table T 3, one example of the access frequency and the reference access frequency for each range of values for each key Show. 図11は、本実施形態の変形例に係る決定装置20の処理例を説明するための図を示す。FIG. 11 is a diagram for explaining a processing example of the determination device 20 according to the modification of the present embodiment. 図12の(A)は、データベースリクエストの一つとして外部の装置から発行されたSQL文の一例を示す。図12の(B)は、図12の(A)のSQL文が発行された場合におけるテーブルのアクセス範囲を取得するための範囲特定用のSQL文の一例を示す。FIG. 12A shows an example of an SQL statement issued from an external device as one of the database requests. FIG. 12B shows an example of a range specifying SQL statement for acquiring the access range of the table when the SQL statement of FIG. 12A is issued. 図13は、本実施形態に係るコンピュータ1900のハードウェア構成の一例を示す。FIG. 13 shows an example of a hardware configuration of a computer 1900 according to the present embodiment.

符号の説明Explanation of symbols

10 データベース装置
12 データベースサーバ
14 記憶装置
16 ネットワーク
20 決定装置
30 テーブル記憶領域
40 分割テーブル
52 取得部
54 特定部
56 算出部
58 決定部
62 選択部
64 調整部
66 分割部
68 配置決定部
1900 コンピュータ
2000 CPU
2010 ROM
2020 RAM
2030 通信インターフェイス
2040 ハードディスクドライブ
2050 フレキシブルディスク・ドライブ
2060 CD−ROMドライブ
2070 入出力チップ
2075 グラフィック・コントローラ
2080 表示装置
2082 ホスト・コントローラ
2084 入出力コントローラ
2090 フレキシブルディスク
2095 CD−ROM
DESCRIPTION OF SYMBOLS 10 Database apparatus 12 Database server 14 Storage apparatus 16 Network 20 Determination apparatus 30 Table storage area 40 Partition table 52 Acquisition part 54 Identification part 56 Calculation part 58 Determination part 62 Selection part 64 Adjustment part 66 Division part 68 Arrangement determination part 1900 Computer 2000 CPU
2010 ROM
2020 RAM
2030 Communication interface 2040 Hard disk drive 2050 Flexible disk drive 2060 CD-ROM drive 2070 Input / output chip 2075 Graphic controller 2080 Display device 2082 Host controller 2084 Input / output controller 2090 Flexible disk 2095 CD-ROM

Claims (12)

データベース内のテーブルを分割した複数の分割テーブルのそれぞれを、複数のテーブル記憶領域のいずれに配置するかを決定する決定装置であって、
前記テーブルに対するアクセス要求を取得する取得部と、
取得したアクセス要求から、前記テーブル内のアクセス範囲を特定する特定部と、
各アクセス要求のアクセス範囲から前記テーブルのレコード範囲毎のアクセス頻度を算出する算出部と、
前記テーブルのレコード範囲毎のアクセス頻度に基づいて、それぞれの前記分割テーブルを配置するべき前記テーブル記憶領域を決定する決定部と、
を備える決定装置。
A determination device that determines in which of a plurality of table storage areas each of a plurality of divided tables obtained by dividing a table in a database,
An acquisition unit for acquiring an access request for the table;
A specifying unit for specifying an access range in the table from the acquired access request;
A calculation unit that calculates an access frequency for each record range of the table from the access range of each access request;
Based on the access frequency for each record range of the table, a determination unit that determines the table storage area in which each of the divided tables is to be placed;
A determination device comprising:
前記決定部は、
前記テーブルのレコード範囲毎のアクセス頻度に基づいて、前記テーブルを前記複数の分割テーブルに分割する分割部と、
前記テーブルのレコード範囲毎のアクセス頻度に基づいて、それぞれの前記分割テーブルを配置するべき前記テーブル記憶領域を決定する配置決定部と、
を有する請求項1に記載の決定装置。
The determination unit is
A dividing unit that divides the table into the plurality of divided tables based on an access frequency for each record range of the table;
Based on the access frequency for each record range of the table, an arrangement determining unit that determines the table storage area in which each of the divided tables is to be arranged;
The determination apparatus according to claim 1, comprising:
前記取得部は、複数の前記テーブルのそれぞれに対するアクセス要求を取得し、
前記特定部は、それぞれの前記テーブルについて取得したアクセス要求から、それぞれの前記テーブル内のアクセス範囲を特定し、
前記算出部は、それぞれの前記テーブルに対する各アクセス要求のアクセス範囲から、それぞれの前記テーブルのレコード範囲毎のアクセス頻度を算出し、
前記分割部は、少なくとも1つの前記テーブルのレコード範囲毎のアクセス頻度に基づいて、当該少なくとも1つのテーブルを複数の分割テーブルに分割し、
前記配置決定部は、それぞれの前記テーブルのレコード範囲毎のアクセス頻度に基づいて、それぞれの前記分割テーブル、および、分割していないそれぞれの前記テーブルを配置すべき前記テーブル記憶領域を決定する
請求項2に記載の決定装置。
The acquisition unit acquires an access request for each of the plurality of tables,
The specifying unit specifies an access range in each table from the access request acquired for each table,
The calculation unit calculates the access frequency for each record range of the table from the access range of each access request for the table,
The dividing unit divides the at least one table into a plurality of divided tables based on an access frequency for each record range of the at least one table,
The arrangement determination unit determines the table storage area in which each of the divided tables and each of the non-divided tables should be arranged based on an access frequency for each record range of each of the tables. 2. The determination device according to 2.
前記決定部は、前記複数のテーブルにおける基準アクセス頻度以上のアクセス頻度を有するレコード範囲の総データサイズが、予め指定された前記テーブル記憶領域の使用可能サイズ以内となるように前記基準アクセス頻度を調整する調整部を更に有し、
前記分割部は、前記複数のテーブルのそれぞれから、前記基準アクセス頻度以上のアクセス頻度を有するレコード範囲を分割して前記分割テーブルを生成し、
前記配置決定部は、前記基準アクセス頻度以上のアクセス頻度を有するレコード範囲を分割した前記分割テーブルを、前記予め指定されたテーブル記憶領域に配置すべきことを決定する
請求項3に記載の決定装置。
The determining unit adjusts the reference access frequency so that a total data size of a record range having an access frequency equal to or higher than a reference access frequency in the plurality of tables is within a usable size of the table storage area specified in advance. And an adjustment unit
The dividing unit generates the divided table by dividing a record range having an access frequency equal to or higher than the reference access frequency from each of the plurality of tables.
The determination apparatus according to claim 3, wherein the arrangement determination unit determines that the division table obtained by dividing a record range having an access frequency equal to or higher than the reference access frequency should be arranged in the pre-specified table storage area. .
前記複数のテーブル記憶領域は、それぞれの前記テーブル記憶領域が割り当てられた記憶装置のアクセス性能が高い順に優先順位付けられており、
前記決定部は、前記テーブル記憶領域を優先順位がより高い順に選択する選択部を更に有し、
前記調整部は、前記複数のテーブルにおける基準アクセス頻度以上のアクセス頻度を有する、レコード範囲の総データサイズが、選択された前記テーブル記憶領域の使用可能サイズ以内となるように前記基準アクセス頻度を調整し、
前記分割部は、前記複数のテーブルのそれぞれから、前記基準アクセス頻度以上のアクセス頻度を有するレコード範囲を分割して前記分割テーブルを生成し、
前記配置決定部は、前記基準アクセス頻度以上のアクセス頻度を有するレコード範囲を分割した前記分割テーブルを、選択された前記テーブル記憶領域に配置すべきことを決定する
請求項4に記載の決定装置。
The plurality of table storage areas are prioritized in descending order of access performance of storage devices to which the respective table storage areas are allocated,
The determination unit further includes a selection unit that selects the table storage area in descending order of priority,
The adjustment unit adjusts the reference access frequency so that the total data size of the record range having an access frequency equal to or higher than the reference access frequency in the plurality of tables is within the usable size of the selected table storage area. And
The dividing unit generates the divided table by dividing a record range having an access frequency equal to or higher than the reference access frequency from each of the plurality of tables.
The determination apparatus according to claim 4, wherein the arrangement determination unit determines that the division table obtained by dividing a record range having an access frequency equal to or higher than the reference access frequency should be arranged in the selected table storage area.
前記分割部は、それぞれの前記テーブルを、キーの値の範囲に応じて分割し、
前記調整部は、少なくとも1つの前記テーブルについて、当該テーブルの各レコードをキーの値順に配列した場合に前記基準アクセス頻度以上のアクセス頻度を有するレコード範囲が基準数以上に分断されないことを条件として、当該テーブルの分割に用いるキーを選択する
請求項5に記載の決定装置。
The dividing unit divides each table according to a range of key values,
The adjustment unit, for at least one of the tables, on condition that the record range having an access frequency equal to or higher than the reference access frequency is not divided above the reference number when the records of the table are arranged in the order of key values, The determination device according to claim 5, wherein a key used for dividing the table is selected.
前記分割部は、それぞれの前記テーブルを、キーの値の範囲に応じて分割し、
前記調整部は、調整した前記基準アクセス頻度がより低くなるように前記複数のテーブルのそれぞれの分割に用いるキーの組合せを選択する請求項5に記載の決定装置。
The dividing unit divides each table according to a range of key values,
The determination device according to claim 5, wherein the adjustment unit selects a key combination used for dividing each of the plurality of tables so that the adjusted reference access frequency is lower.
前記調整部は、予め指定された優先順位の前記テーブル記憶領域に対して調整した前記基準アクセス頻度がより低くなるように前記複数のテーブルのそれぞれの分割に用いるキーの組合せを選択する請求項7に記載の決定装置。   The said adjustment part selects the combination of the key used for each division | segmentation of these tables so that the said reference | standard access frequency adjusted with respect to the said table storage area of the priority designated beforehand may become lower. Determining device according to. 前記特定部は、取得したアクセス要求の対象となる前記テーブル中の当該アクセス要求により指定された検索条件を満たす少なくとも1つのレコードの中からキーの値の最大値および最小値を求める範囲特定用アクセス要求をデータベースサーバに対して発行することにより、当該テーブル内のアクセス範囲を特定する請求項1に記載の決定装置。   The specifying unit obtains a maximum and minimum value of a key value from at least one record satisfying a search condition specified by the access request in the table as a target of the acquired access request. The determination device according to claim 1, wherein an access range in the table is specified by issuing a request to a database server. データベース内のテーブルを分割した複数の分割テーブルのそれぞれを、複数のテーブル記憶領域のいずれに配置するかを決定する決定装置であって、
複数の前記テーブルのそれぞれに対するアクセス要求を取得する取得部と、
それぞれの前記テーブルについて取得したアクセス要求から、それぞれの前記テーブル内のアクセス範囲を特定する特定部と、
それぞれの前記テーブルに対する各アクセス要求のアクセス範囲から、それぞれの前記テーブルのレコード範囲毎のアクセス頻度を算出する算出部と、
前記テーブルのレコード範囲毎のアクセス頻度に基づいて、それぞれの前記分割テーブルを配置するべき前記テーブル記憶領域を決定する決定部と、
を備え、
前記複数のテーブル記憶領域は、それぞれの前記テーブル記憶領域が割り当てられた記憶装置のアクセス性能が高い順に優先順位付けられており、
前記決定部は、
前記テーブル記憶領域を優先順位がより高い順に選択する選択部と、
前記複数のテーブルにおける基準アクセス頻度以上のアクセス頻度を有するレコード範囲の総データサイズが、選択された前記テーブル記憶領域の使用可能サイズ以内となるように前記基準アクセス頻度を調整する調整部と、
前記複数のテーブルのそれぞれから、前記基準アクセス頻度以上のアクセス頻度を有するレコード範囲を分割して前記分割テーブルを生成する分割部と、
前記基準アクセス頻度以上のアクセス頻度を有するレコード範囲を分割した前記分割テーブルを、選択された前記テーブル記憶領域に配置すべきことを決定する配置決定部と、
を有する決定装置。
A determination device that determines in which of a plurality of table storage areas each of a plurality of divided tables obtained by dividing a table in a database,
An acquisition unit that acquires an access request for each of the plurality of tables;
A specifying unit for specifying an access range in each table from the access request acquired for each table;
From the access range of each access request for each table, a calculation unit that calculates an access frequency for each record range of the table;
Based on the access frequency for each record range of the table, a determination unit that determines the table storage area in which each of the divided tables is to be placed;
With
The plurality of table storage areas are prioritized in descending order of access performance of storage devices to which the respective table storage areas are allocated,
The determination unit is
A selection unit that selects the table storage areas in descending order of priority;
An adjustment unit that adjusts the reference access frequency so that the total data size of the record range having an access frequency equal to or higher than the reference access frequency in the plurality of tables is within the usable size of the selected table storage area;
A dividing unit that generates a divided table by dividing a record range having an access frequency equal to or higher than the reference access frequency from each of the plurality of tables;
An arrangement determining unit for determining that the division table obtained by dividing the record range having an access frequency equal to or higher than the reference access frequency should be arranged in the selected table storage area;
Determining device.
データベース内のテーブルを分割した複数の分割テーブルのそれぞれを、複数のテーブル記憶領域のいずれに配置するかを決定する決定装置として、コンピュータを機能させるプログラムであって、
前記コンピュータを、
前記テーブルに対するアクセス要求を取得する取得部と、
取得したアクセス要求から、前記テーブル内のアクセス範囲を特定する特定部と、
各アクセス要求のアクセス範囲から前記テーブルのレコード範囲毎のアクセス頻度を算出する算出部と、
前記テーブルのレコード範囲毎のアクセス頻度に基づいて、それぞれの前記分割テーブルを配置するべき前記テーブル記憶領域を決定する決定部と
して機能させるプログラム。
A program that causes a computer to function as a determining device that determines in which of a plurality of table storage areas each of a plurality of divided tables obtained by dividing a table in a database,
The computer,
An acquisition unit for acquiring an access request for the table;
A specifying unit for specifying an access range in the table from the acquired access request;
A calculation unit that calculates an access frequency for each record range of the table from the access range of each access request;
A program that functions as a determining unit that determines the table storage area in which each of the divided tables is to be arranged based on an access frequency for each record range of the table.
データベース内のテーブルを分割した複数の分割テーブルのそれぞれを、複数のテーブル記憶領域のいずれに配置するかを決定する決定方法であって、
前記テーブルに対するアクセス要求を取得し、
取得したアクセス要求から、前記テーブル内のアクセス範囲を特定し、
各アクセス要求のアクセス範囲から前記テーブルのレコード範囲毎のアクセス頻度を算出し、
前記テーブルのレコード範囲毎のアクセス頻度に基づいて、それぞれの前記分割テーブルを配置するべき前記テーブル記憶領域を決定する
決定方法。
A determination method for deciding which of a plurality of divided tables obtained by dividing a table in a database is to be placed in a plurality of table storage areas,
Obtain an access request for the table;
From the acquired access request, specify the access range in the table,
Calculate the access frequency for each record range of the table from the access range of each access request,
A determination method for determining the table storage area in which each of the divided tables is to be arranged based on an access frequency for each record range of the table.
JP2008126519A 2008-05-13 2008-05-13 Determination device, program, and determination method Pending JP2009276941A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008126519A JP2009276941A (en) 2008-05-13 2008-05-13 Determination device, program, and determination method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008126519A JP2009276941A (en) 2008-05-13 2008-05-13 Determination device, program, and determination method

Publications (1)

Publication Number Publication Date
JP2009276941A true JP2009276941A (en) 2009-11-26

Family

ID=41442329

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008126519A Pending JP2009276941A (en) 2008-05-13 2008-05-13 Determination device, program, and determination method

Country Status (1)

Country Link
JP (1) JP2009276941A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP7412974B2 (en) 2019-01-16 2024-01-15 株式会社東芝 Computers, database systems, calculation systems, calculation methods, programs, and storage media

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH05242049A (en) * 1991-07-10 1993-09-21 Hitachi Ltd Method for sorting distributed data base and method for making access to the same
JPH10326215A (en) * 1998-06-22 1998-12-08 Hitachi Ltd Data base management system and inquiry processing method
JP2006221513A (en) * 2005-02-14 2006-08-24 Hitachi Ltd Setting of arrangement of data in computer system
JP2006302307A (en) * 2006-06-08 2006-11-02 Hitachi Ltd Storage device management method
JP2007293442A (en) * 2006-04-21 2007-11-08 Hitachi Ltd Storage system and its control method

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH05242049A (en) * 1991-07-10 1993-09-21 Hitachi Ltd Method for sorting distributed data base and method for making access to the same
JPH10326215A (en) * 1998-06-22 1998-12-08 Hitachi Ltd Data base management system and inquiry processing method
JP2006221513A (en) * 2005-02-14 2006-08-24 Hitachi Ltd Setting of arrangement of data in computer system
JP2007293442A (en) * 2006-04-21 2007-11-08 Hitachi Ltd Storage system and its control method
JP2006302307A (en) * 2006-06-08 2006-11-02 Hitachi Ltd Storage device management method

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP7412974B2 (en) 2019-01-16 2024-01-15 株式会社東芝 Computers, database systems, calculation systems, calculation methods, programs, and storage media

Similar Documents

Publication Publication Date Title
JP5408600B2 (en) Determination apparatus, database apparatus, program, and determination method
US10826980B2 (en) Command process load balancing system
US8161240B2 (en) Cache management
US8356154B2 (en) Storage system, data relocation method thereof, and recording medium that records data relocation program
US7890675B2 (en) Apparatus, system, and method for real time job-specific buffer allocation
US8516488B1 (en) Adjusting a resource estimate in response to progress of execution of a request
US9495396B2 (en) Increased database performance via migration of data to faster storage
US11132383B2 (en) Techniques for processing database tables using indexes
US20180107590A1 (en) Information processing apparatus
JP6707797B2 (en) Database management system and database management method
US20200285510A1 (en) High precision load distribution among processors
JP6885193B2 (en) Parallel processing device, job management method, and job management program
JP5697195B2 (en) Management system, program and method for controlling table mirroring based on access prediction
CA2987731A1 (en) Database memory monitoring and defragmentation of database indexes
US20150381520A1 (en) Data set multiplicity change device, server, data set multiplicity change method and computer redable medium
US20210349918A1 (en) Methods and apparatus to partition a database
JP6823626B2 (en) Database management system and method
JP5790755B2 (en) Database management apparatus and database management method
JP2009276941A (en) Determination device, program, and determination method
CN115576924A (en) Data migration method
JP2009199367A (en) Computer system, i/o scheduler and i/o scheduling method
JP7024432B2 (en) Database management system, data conversion program, data conversion method and data conversion device
US20160335321A1 (en) Database management system, computer, and database management method
Ghandour et al. User-based Load Balancer in HBase.
CN116414296A (en) Data hierarchical storage method and device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20110222

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20121207

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20121211

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20130618

RD14 Notification of resignation of power of sub attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7434

Effective date: 20130624