JP6744272B2 - Migration management device and migration management method - Google Patents
Migration management device and migration management method Download PDFInfo
- Publication number
- JP6744272B2 JP6744272B2 JP2017188843A JP2017188843A JP6744272B2 JP 6744272 B2 JP6744272 B2 JP 6744272B2 JP 2017188843 A JP2017188843 A JP 2017188843A JP 2017188843 A JP2017188843 A JP 2017188843A JP 6744272 B2 JP6744272 B2 JP 6744272B2
- Authority
- JP
- Japan
- Prior art keywords
- migration
- target table
- database
- migration target
- query
- 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.)
- Active
Links
Images
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Description
本発明は、移行管理装置及び移行管理方法に関する。 The present invention relates to a migration management device and a migration management method.
従来、データ仮想化技術を用いることにより、複数のデータベースシステム(以下、データベースという。)を仮想的に統合したデータ統合環境を構築することが行われている。 Conventionally, a data integration environment in which a plurality of database systems (hereinafter referred to as databases) are virtually integrated has been constructed by using a data virtualization technique.
データ統合環境では、データベースに格納されているテーブルを示す情報であるスキーマ情報を物理モデルと論理モデルで表現する。物理モデルでは、テーブルの物理的な格納先を示すとともに、テーブルが格納されているデータベースに接続するための接続情報を保持する。論理モデルでは、一以上の物理モデル又は論理モデルに対応する仮想テーブルを構成する。クライアントは仮想テーブルを参照してクエリを実行することにより、テーブルが配置されているデータベースを意識することなくクエリを実行することができる。 In a data integration environment, schema information, which is information indicating a table stored in a database, is represented by a physical model and a logical model. The physical model indicates the physical storage destination of the table and holds connection information for connecting to the database in which the table is stored. The logical model constitutes a virtual table corresponding to one or more physical models or logical models. By referring to the virtual table and executing the query, the client can execute the query without being aware of the database in which the table is arranged.
データ統合環境では、ユーザから受け付けたクエリを処理するクエリ処理装置が、クエリの実行時に必要となるテーブルをデータベースからネットワークを介して取得し、取得したテーブルを用いてクエリを実行する。したがって、データ統合環境におけるクエリの実行性能は、データ通信量に依存する。このため、データ通信量を減らすことにより、データ統合環境におけるクエリの実行性能を改善することができる。 In the data integration environment, a query processing device that processes a query received from a user acquires a table required at the time of executing the query from a database via a network, and executes the query using the acquired table. Therefore, the query execution performance in the data integration environment depends on the data communication amount. Therefore, the query execution performance in the data integration environment can be improved by reducing the data communication amount.
非特許文献1には、データ通信量を減らす方法として、クエリの実行時に、クエリに対応する処理を、当該クエリに対応するテーブルを格納するデータベース上で行う方法が開示されている。 Non-Patent Document 1 discloses, as a method of reducing the amount of data communication, a method of performing a process corresponding to a query on a database that stores a table corresponding to the query when the query is executed.
また、特許公報1では、クエリの実行時に、複数のデータベースのそれぞれに格納されているテーブルを参照する場合、データ量が小さいテーブルを一時的に一方のデータベースに移動した後、非特許文献1に開示される方法を適用し、当該データベース上で、クエリに対応する処理を行う方法が開示されている。 Further, in Patent Document 1, when a table stored in each of a plurality of databases is referred to when a query is executed, a table having a small amount of data is temporarily moved to one database, and then Non-Patent Document 1 A method of applying the disclosed method and performing a process corresponding to a query on the database is disclosed.
特許文献1に記載の方法を用いることで、複数のデータベースのそれぞれに格納されているテーブルを参照する場合のデータ通信量を削減することができる。しかしながら、異なるデータベースに格納されているテーブルがクエリに含まれている場合において、これらのテーブルが同程度のサイズであるとき、テーブルの移動を行うことにより、通信量が増えてしまうという問題が発生する。 By using the method described in Patent Document 1, it is possible to reduce the amount of data communication when referring to the tables stored in each of the plurality of databases. However, if the queries include tables stored in different databases, and if these tables are of the same size, moving the tables causes a problem that communication volume increases. To do.
また、上記の問題を解決するために、複数のテーブルのそれぞれに含まれるデータの関係に基づいて、関連性の高い複数のテーブルを予め一のデータベースに移しておくことが考えられる。しかしながら、このようにテーブルを配置しても、ユーザのテーブルの利用状況が考慮されていないため、ユーザが頻繁に使用するテーブルが、異なるデータベースに格納される場合がある。このため、異なるデータベースに格納されているテーブルがクエリに含まれている場合には、データベース上でクエリを実行することができないことから、クエリの実行性能を改善することができないという問題が発生する。 Further, in order to solve the above-mentioned problem, it is conceivable to move a plurality of highly related tables to one database in advance based on the relation of the data contained in each of the plurality of tables. However, even if the tables are arranged in this way, since the usage status of the user's table is not taken into consideration, the table frequently used by the user may be stored in a different database. For this reason, when a query contains tables stored in different databases, the query execution performance cannot be improved because the query cannot be executed on the database. ..
そこで、本発明はこれらの点に鑑みてなされたものであり、テーブルを適切なデータベースに配置することができる移行管理装置及び移行管理方法を提供することを目的とする。 Therefore, the present invention has been made in view of these points, and an object of the present invention is to provide a migration management device and a migration management method capable of arranging a table in an appropriate database.
本発明の第1の態様に係る移行管理装置は、複数のデータベースのそれぞれに含まれる複数のテーブルの利用状況を特定する利用状況特定部と、特定された前記利用状況に基づいて、前記複数のデータベースのうち、現在格納されているデータベースとは異なるデータベースに移行するテーブルを移行対象テーブルとして特定するテーブル特定部と、特定された前記移行対象テーブルを移行先のデータベースに複製する移行制御部と、前記移行対象テーブルの複製が完了すると、前記複数のテーブルのそれぞれの格納先を管理する物理モデルと、ユーザが参照する仮想テーブルを管理する論理モデルとを記憶し前記ユーザから受け付けたクエリを処理するクエリ処理装置の前記物理モデルが示す前記移行対象テーブルの格納先を前記移行先のデータベースに更新する更新部と、を備える。 A migration management device according to a first aspect of the present invention includes a usage status specifying unit that specifies usage statuses of a plurality of tables included in each of a plurality of databases, and a plurality of the usage status specifying units based on the specified usage statuses. Of the databases, a table specifying unit that specifies a table to be migrated to a database different from the currently stored database as a migration target table, and a migration control unit that replicates the specified migration target table to the migration destination database, When replication of the migration target table is completed, a physical model that manages the storage destination of each of the plurality of tables and a logical model that manages the virtual table referenced by the user are stored and the query received from the user is processed. An updating unit that updates the storage destination of the migration target table indicated by the physical model of the query processing device to the migration destination database.
前記移行制御部は、前記更新部が前記物理モデルを更新すると、移行元のデータベースから前記移行対象テーブルを消去してもよい。 The migration control unit may delete the migration target table from the migration source database when the updating unit updates the physical model.
前記テーブル特定部は、前記移行先のデータベースの空きサイズが前記移行対象テーブルのサイズよりも小さい場合には、前記移行先のデータベースから移行させるテーブルを第2移行対象テーブルとして特定し、前記移行制御部は、前記テーブル特定部が第2移行対象テーブルを特定した場合に、前記移行対象テーブルの一部と、前記第2移行対象テーブルの一部とを、それぞれのテーブルの移行先のデータベースに複製し、前記更新部は、前記移行対象テーブルの一部の複製が完了すると、移行先のデータベースに一部が複製されている前記移行対象テーブルを示す前記物理モデルを新たに生成し、前記移行対象テーブルの前記論理モデルが示すテーブルを、新たに生成された前記物理モデルが示す前記移行対象テーブルのデータと、移行元のデータベースに格納されている複製前の前記移行対象テーブルのデータとを連結するクエリに変更し、前記第2移行対象テーブルの一部の複製が完了すると、移行先のデータベースに一部が複製されている前記第2移行対象テーブルを示す前記物理モデルを新たに生成し、前記第2移行対象テーブルの前記論理モデルが示すテーブルを、新たに生成された前記物理モデルが示す前記第2移行対象テーブルのデータと、移行元のデータベースに格納されている複製前の前記第2移行対象テーブルのデータとを連結するクエリに変更し、前記移行制御部は、前記更新部が前記移行対象テーブル及び前記第2移行対象テーブルの前記論理モデルを変更すると、複製済の前記移行対象テーブルの一部及び前記第2移行対象テーブルの一部を移行元のデータベースから消去し、前記移行対象テーブルの一部と、前記第2移行対象テーブルの一部とを、それぞれのテーブルの移行先のデータベースにさらに複製してもよい。 When the free size of the transfer destination database is smaller than the size of the transfer target table, the table specifying unit specifies a table to be transferred from the transfer destination database as a second transfer target table, and performs the transfer control. Copy the part of the migration target table and the part of the second migration target table to the migration destination database of each table when the table specifying unit specifies the second migration target table. Then, when the copy of a part of the migration target table is completed, the update unit newly generates the physical model indicating the migration target table, a part of which is replicated in the migration destination database. The table indicated by the logical model of the table is linked with the data of the migration target table indicated by the newly generated physical model and the data of the migration target table before replication stored in the migration source database. When the query is changed and a part of the second migration target table is completely replicated, the physical model showing the second migration target table partially replicated in the migration destination database is newly generated, and The table indicated by the logical model of the second migration target table is set to the data of the second migration target table indicated by the newly generated physical model, and the second migration before replication stored in the migration source database. When the updating unit changes the logical models of the migration target table and the second migration target table, the migration control unit changes the logical model of the copied migration target table to a query that links data of the target table. A part and a part of the second migration target table are erased from the migration source database, and a part of the migration target table and a part of the second migration target table are migrated to the respective database migration destination databases. May be further duplicated.
前記移行制御部は、前記第2移行対象テーブルの移行先のデータベースの空きサイズが、前記第2移行対象テーブルのサイズ以上の場合には、前記第2移行対象テーブルの全体を一度に当該移行先のデータベースに複製してもよい。
前記移行制御部は、前記第2移行対象テーブルを、前記移行対象テーブルの移行元のデータベースに移行してもよい。
When the free size of the migration destination database of the second migration target table is equal to or larger than the size of the second migration target table, the migration control unit writes the entire second migration target table at once to the migration destination. May be duplicated in the database.
The migration control unit may migrate the second migration target table to a migration source database of the migration target table.
前記移行制御部は、前記利用状況に基づいて、それぞれ異なるデータベースに格納されているテーブルが結合される結合処理のうち、出現頻度が高いと予測される結合処理を特定し、特定した結合処理の入力データ又は出力データを前記クエリ処理装置の記憶部に生成し、前記更新部は、前記クエリ処理装置の記憶部に生成されたテーブルが参照可能に前記物理モデル及び前記論理モデルを更新してもよい。 The migration control unit identifies, based on the usage status, a join process predicted to have a high appearance frequency from among join processes in which tables stored in different databases are joined together. Input data or output data is generated in the storage unit of the query processing device, and the updating unit updates the physical model and the logical model so that the table generated in the storage unit of the query processing device can be referred to. Good.
本発明の第2の態様に係る移行管理方法は、コンピュータが実行する、複数のデータベースのそれぞれに含まれる複数のテーブルの利用状況を特定するステップと、特定された前記利用状況に基づいて、前記複数のデータベースのうち、現在格納されているデータベースとは異なるデータベースに移行するテーブルを移行対象テーブルとして特定するステップと、特定された前記移行対象テーブルを移行先のデータベースに複製するステップと、前記移行対象テーブルの複製が完了すると、前記複数のテーブルのそれぞれの格納先を管理する物理モデルと、ユーザが参照する仮想テーブルを管理する論理モデルとを記憶し前記ユーザから受け付けたクエリを処理するクエリ処理装置の前記物理モデルが示す前記移行対象テーブルの格納先を前記移行先のデータベースに更新するステップと、を備える。 A migration management method according to a second aspect of the present invention is based on the step of specifying a usage status of a plurality of tables included in each of a plurality of databases, which is executed by a computer, and based on the specified usage status. Among the plurality of databases, a table to be migrated to a database different from the currently stored database is specified as a migration target table; a step of copying the specified migration target table to a migration destination database; When replication of the target table is completed, a query process that stores a physical model that manages the storage destination of each of the plurality of tables and a logical model that manages the virtual table referenced by the user, and that processes the query received from the user Updating the storage destination of the migration target table indicated by the physical model of the device to the migration destination database.
本発明によれば、テーブルを適切なデータベースに配置することができるという効果を奏する。 According to the present invention, it is possible to arrange a table in an appropriate database.
[仮想データベースシステムSの概要]
図1は、本実施形態に係る仮想データベースシステムSの構成を示す図である。仮想データベースシステムSは、データベース11を物理的に格納する複数の記憶装置1と、クエリ処理装置2と、ユーザ端末3と、移行管理装置4とを備え、複数のデータベース11を仮想的に統合するシステムである。なお、図1において、ユーザ端末3は1台のみ示されているが、複数のユーザ端末3がクエリ処理装置2に接続されているものとする。
[Outline of Virtual Database System S]
FIG. 1 is a diagram showing the configuration of a virtual database system S according to this embodiment. The virtual database system S includes a plurality of storage devices 1 that physically store the
クエリ処理装置2は、データベース11に格納されているテーブルを示す情報であるスキーマ情報として、物理モデルと、論理モデルとを記憶している。物理モデルは、テーブルの物理的な格納場所を示すモデルである。論理モデルは、ユーザ端末3が参照可能な仮想的なテーブルを管理するモデルであり、仮想的なテーブルと、物理モデルが示すテーブルとの関連付けを行う。クエリ処理装置2は、ユーザ端末3から論理モデルに対応するクエリを取得すると、物理モデルを参照し、当該クエリに対応する1以上のデータベース11を特定する。
The query processing device 2 stores a physical model and a logical model as schema information that is information indicating a table stored in the
クエリ処理装置2は、特定したデータベース11からデータを取得してクエリに対応する演算を実行し、実行結果をユーザ端末3に出力する。これにより、ユーザは、データベース11の物理的な位置を意識することなく複数のデータベース11に格納されているデータを参照することができる。
The query processing device 2 acquires data from the
クエリ処理装置2は、クエリに対応する複数のテーブルが同一のデータベース11に格納されている場合に、クエリ実行時のデータ通信量を減らすために、クエリに対応する処理を当該データベース11上で行わせる。また、クエリ処理装置2は、クエリに対応する複数のテーブルが同一のデータベース11に格納されていない場合に、クエリに対応するテーブルをクエリ処理装置2が取得し、クエリ処理装置2においてクエリに対応する処理を行う。クエリに対応するテーブルが同一のデータベース11に格納されていない場合には、データ通信量が増加し、クエリの実行性能が悪化するため、ユーザが同時に参照する頻度が高い複数のテーブルが同一のデータベース11に格納されていることが好ましい。
When a plurality of tables corresponding to a query are stored in the
本実施形態では、移行管理装置4が、ユーザが同時に参照する頻度が高い複数のテーブルが同一のデータベース11に格納されるようにテーブルを移行する。移行管理装置4は、図1に示すように、クエリ処理装置2及び記憶装置1から、複数のテーブルの利用状況を示す利用状況情報を取得し、当該利用状況情報に基づいて、他のデータベース11に移行するテーブルTを特定する。
In the present embodiment, the migration management device 4 migrates tables so that a plurality of tables that users frequently refer to at the same time are stored in the
移行管理装置4は、特定したテーブルTを移行させる移行制御を行うとともに、クエリ処理装置2に記憶されている物理モデルを更新する。このようにすることで、移行管理装置4は、テーブルを適切なデータベース11に配置することができる。
続いて、クエリ処理装置2及び移行管理装置4の構成を説明する。
The migration management device 4 performs migration control for migrating the specified table T, and updates the physical model stored in the query processing device 2. By doing so, the migration management device 4 can arrange the table in the
Next, the configurations of the query processing device 2 and the migration management device 4 will be described.
[クエリ処理装置2の構成]
図2は、本実施形態に係るクエリ処理装置2の構成を示す図である。クエリ処理装置2は、コンピュータであり、LAN(Local Area Network)等を介して、複数の記憶装置1と、ユーザ端末3と、移行管理装置4とに通信可能に接続されている。
[Configuration of Query Processing Device 2]
FIG. 2 is a diagram showing the configuration of the query processing device 2 according to the present embodiment. The query processing device 2 is a computer, and is communicably connected to the plurality of storage devices 1, the
クエリ処理装置2は、図2に示すように、記憶部21と、制御部22とを備える。
記憶部21は、例えば、ROM(Read Only Memory)及びRAM(Random Access Memory)等である。記憶部21は、クエリ処理装置2を機能させるための各種プログラムを記憶する。例えば、記憶部21は、クエリ処理装置2の制御部22を、後述するクエリ取得部221、クエリ実行部222、及び出力部223として機能させるクエリ実行プログラムを記憶する。
As shown in FIG. 2, the query processing device 2 includes a
The
また、記憶部21は、データベース11に格納されているテーブルを示す情報であるスキーマ情報として、物理モデルPMと論理モデルLMとを記憶する。物理モデルPMは、複数のデータベース11に格納されている複数のテーブルの格納先を管理する。具体的には、物理モデルPMは、データベース11に格納されているテーブルを識別するテーブル名と、当該テーブルが格納されているデータベース11を識別するデータベース識別情報とを関連付けて記憶する。
Further, the
論理モデルLMは、ユーザが参照する仮想テーブルを管理する。論理モデルLMは、仮想テーブルを識別するテーブル名と、当該仮想テーブルの構成を示す情報とを関連付けて記憶する。ここで、仮想テーブルの構成を示す情報は、物理モデルPMが示すテーブル名、又は、クエリである。 The logical model LM manages the virtual table referenced by the user. The logical model LM stores the table name for identifying the virtual table and the information indicating the configuration of the virtual table in association with each other. Here, the information indicating the configuration of the virtual table is a table name indicated by the physical model PM or a query.
制御部22は、例えばCPU(Central Processing Unit)である。制御部22は、記憶部21に記憶されている各種プログラムを実行することにより、クエリ処理装置2に係る機能を制御する。制御部22は、クエリ実行プログラムを実行することにより、クエリ取得部221、クエリ実行部222、及び出力部223として機能する。
The
クエリ取得部221は、ユーザ端末3から複数のデータベース11の少なくともいずれかに対応するクエリを取得する。
The
クエリ実行部222は、取得されたクエリを解析し、取得されたクエリに対応する処理を行う。例えば、クエリ実行部222は、クエリに対応するテーブルが同一のデータベース11に格納されている場合に、クエリに対応する処理を当該データベース11上で行わせる。また、クエリ実行部222は、クエリに対応するテーブルが同一のデータベース11に格納されていない場合に、クエリに対応するテーブルをデータベース11から取得し、当該テーブルを用いてクエリに対応する処理を行う。
The
出力部223は、クエリ実行部222によって実行されたクエリの実行結果をユーザ端末3に出力する。
The
[移行管理装置4の構成]
図3は、本実施形態に係る移行管理装置4の構成を示す図である。移行管理装置4は、コンピュータであり、LAN等を介して、複数の記憶装置1と、クエリ処理装置2とに通信可能に接続されている。
[Configuration of migration management device 4]
FIG. 3 is a diagram showing the configuration of the migration management device 4 according to the present embodiment. The migration management device 4 is a computer, and is communicably connected to the plurality of storage devices 1 and the query processing device 2 via a LAN or the like.
移行管理装置4は、図3に示すように、記憶部41と、制御部42とを備える。
記憶部41は、例えば、ROM及びRAM等である。記憶部41は、移行管理装置4を機能させるための各種プログラムを記憶する。例えば、記憶部41は、移行管理装置4の制御部42を、後述する利用状況特定部421、テーブル特定部422、移行制御部423、及び更新部424として機能させる移行管理プログラムを記憶する。
As shown in FIG. 3, the migration management device 4 includes a
The
また、記憶部41は、プロファイル情報411を記憶する。プロファイル情報411は、複数のデータベース11のそれぞれに格納されているテーブルの利用状況を示す情報や、記憶装置1の記憶領域の利用可能サイズを示す情報を含む。
The
制御部42は、例えばCPUである。制御部42は、記憶部41に記憶されている各種プログラムを実行することにより、移行管理装置4に係る機能を制御する。制御部42は、移行管理プログラムを実行することにより、利用状況特定部421、テーブル特定部422、移行制御部423、及び更新部424として機能する。
The
[移行管理装置4における処理の流れ]
以下、移行管理装置4における処理の流れを説明しながら、利用状況特定部421、テーブル特定部422、移行制御部423、及び更新部424について説明する。図4は、本実施形態における移行管理装置4における処理の流れを示すフローチャートである。
[Process Flow in Migration Management Device 4]
Hereinafter, the usage
利用状況特定部421は、所定時間おきに複数のデータベース11のそれぞれに含まれる複数のテーブルの利用状況を特定する(S10)。具体的には、利用状況特定部421は、クエリ処理装置2から、クエリ処理装置2で実行されたクエリのログを取得するとともに、スキーマ情報を取得する。また、利用状況特定部421は、複数のデータベース11のそれぞれにおいて実行されたクエリのログを取得する。クエリのログには、クエリを示す文字列、クエリに基づいて生成された実行計画、クエリ実行中に使用する記憶領域のサイズを示す中間コスト、クエリの実行結果を示すデータのサイズを示す情報が含まれる。
The usage
利用状況特定部421は、取得したこれらの情報に基づいて、データベース11に含まれている複数のテーブルの利用頻度、テーブル間の結合関係、結合頻度を含むテーブルの利用状況を特定する。
The usage
また、利用状況特定部421は、複数の記憶装置1のそれぞれから、テーブルに含まれるカラムの構成等を示すテーブル構成情報、テーブルに含まれるデータのサイズやデータの分布を示す統計情報、記憶装置1の記憶領域のサイズを示すサイズ情報、記憶装置1の記憶領域の利用量を示す利用量情報を取得する。利用状況特定部421は、取得したこれらの情報に基づいて、複数の記憶装置1のそれぞれに格納されているデータベース11の利用可能サイズを算出する。
Also, the usage
利用状況特定部421は、特定したテーブルの利用状況を示す利用状況情報と、算出したデータベース11の利用可能サイズを示す情報と、スキーマ情報とを、テーブルに含まれるデータのサイズやデータの分布を示す統計情報とを、プロファイル情報411として記憶部41に記憶させる。
The usage
テーブル特定部422は、利用状況特定部421により特定された利用状況に基づいて、複数のデータベース11のうち、現在格納されているデータベース11とは異なるデータベース11に移行するテーブルを移行対象テーブルとして特定する。また、テーブル特定部422は、移行対象テーブルの移行先のデータベースを特定する(S20)。
The
具体的には、テーブル特定部422は、プロファイル情報411に含まれる利用状況情報を利用して、同じデータベース11にあるべき複数のテーブルを示すテーブルセットを作成する。例えば、テーブル特定部422は、利用状況情報に含まれるクエリのログが示すテーブルの結合関係に基づいて、テーブルをノード、テーブルの結合関係をエッジとしたグラフを生成する。テーブル特定部422は、利用状況情報に含まれる複数のクエリのログが示すテーブルの結合関係に基づいて、テーブル同士の結合回数を算出し、当該結合回数に基づいてエッジの重み付けを行う。
Specifically, the
テーブル特定部422は、エッジの重み付けが行われたグラフに基づいて、グラフに含まれる複数のノードを複数のクラスタに分類する。ここで、テーブル特定部422は、記憶装置1の記憶領域のサイズと、ノードが示すテーブルのサイズとに基づいて、グラフに含まれる複数のノードを複数のクラスタに分類する。そして、テーブル特定部422は、クラスタに含まれる複数のノードを移行後のテーブルセットとして特定する。
The
テーブル特定部422は、複数の記憶装置1のそれぞれに格納されているデータベース11に含まれる複数のテーブルを、移行前のテーブルセットとして特定する。テーブル特定部422は、移行後のテーブルセットに含まれているテーブルと、移行前のテーブルセットに含まれているテーブルとの一致率に基づいて、移行前のテーブルセットに対応する移行後のテーブルセットを特定する。
The
そして、テーブル特定部422は、移行前のテーブルセットに含まれておらず、移行後のテーブルセットに含まれているテーブルを、移行対象テーブルと特定する。また、テーブル特定部422は、移行前のテーブルセットに対応するデータベース11を、移行対象テーブルの移行先と特定する。また、テーブル特定部422は、移行対象テーブルが含まれている移行前のテーブルセットに対応するデータベース11を、移行対象テーブルの移行元と特定する。
Then, the
続いて、移行制御部423は、特定された移行対象テーブルの移行を制御する。具体的には、移行制御部423は、特定された移行対象テーブルの中から1つの移行対象テーブルを選択する(S30)。
Subsequently, the
続いて、移行制御部423は、選択された移行対象テーブルのサイズと、移行先のデータベース11のサイズとに基づいて、移行先のデータベース11の容量が不足しているか否かを判定する(S40)。移行制御部423は、移行先のデータベース11の容量が不足していると判定すると、S90に処理を移し、テーブル交換処理を実行する。テーブル交換処理の詳細については後述する。
Subsequently, the
移行制御部423及び更新部424は、移行先のデータベース11の容量が不足していないと判定すると、S50〜S70に示されるテーブル移行処理を実行する。図5は、テーブル移行処理を実行した場合のクエリ処理装置2の状態と、データベース11におけるテーブルの状態とを示す図である。図5に示す例では、移行対象テーブルがTA、移行元のデータベースが11A、移行先のデータベースが11Bであるものとする。テーブル移行処理が実行される前は、図5(a)に示すように、移行対象テーブルTAがデータベース11Aに格納されている。
When the
移行制御部423は、S50において、特定された移行対象テーブルTAをデータベース11Bに複製する。これにより、図5(b)に示すように、移行元のデータベース11Aと、移行先のデータベース11Bとの双方に移行対象テーブルTAが格納される。
The
続いて、更新部424は、移行対象テーブルの複製が完了したことに応じて、クエリ処理装置2に記憶されている物理モデルを更新する(S60)。具体的には、更新部424は、図5(c)に示すように、クエリ処理装置2に記憶されている物理モデルが示す移行対象テーブルの格納先を、移行元のデータベース11Aから移行先のデータベース11Bに変更する。
Subsequently, the
続いて、移行制御部423は、更新部424が物理モデルを更新すると、図5(d)に示すように、移行元のデータベース11Aから移行対象テーブルTAを消去する(S70)。
Subsequently, when the updating
続いて、移行制御部423は、全ての移行対象テーブルの移行が完了したか否かを判定する(S80)。移行制御部423は、全ての移行対象テーブルの移行が完了したと判定すると、本フローチャートに係る処理を終了し、全ての移行対象テーブルが移行完了していないと判定すると、S30に処理を移し、移行が完了していない移行対象テーブルを選択する。
Subsequently, the
続いて、テーブル交換処理の詳細について説明する。図6は、本実施形態に係るテーブル交換処理に係る処理の流れを示すフローチャートである。また、図7、図8は、本実施形態に係るテーブル交換処理を実行した場合のクエリ処理装置2の状態と、データベース11におけるテーブルの状態とを示す図である。
Next, details of the table exchange process will be described. FIG. 6 is a flowchart showing the flow of processing relating to the table exchange processing according to this embodiment. 7 and 8 are diagrams showing the state of the query processing device 2 and the state of the tables in the
図7、図8に示す例では、移行対象テーブルがTA、移行元のデータベースが11A、移行先のデータベースが11Bであるものとする。テーブル移行処理が実行される前は、図7(a)に示すように、移行対象テーブルTAがデータベース11Aに格納されている。なお、図7、8では、説明を簡単にするため、移行対象テーブルTAに対応する物理モデルPMA及び論理モデルLMAのみを示す。
In the examples shown in FIGS. 7 and 8, it is assumed that the migration target table is TA, the migration source database is 11A, and the migration destination database is 11B. Before the table migration processing is executed, the migration target table TA is stored in the
まず、テーブル特定部422は、移行対象テーブルTAの移行先のデータベース11Bの空きサイズが移行対象テーブルTAのサイズよりも小さい場合には、移行先のデータベース11Bから移行させるテーブルを第2移行対象テーブルとして特定する(S91)。まず、テーブル特定部422は、移行対象テーブルTAのサイズから、移行先のデータベース11Bの空きサイズを減算して得られるサイズよりも大きいサイズのテーブルを選択する。
First, when the free size of the transfer destination database TA of the transfer target table TA is smaller than the size of the transfer target table TA, the
ここで、テーブル特定部422は、移行対象テーブルTAと、選択したテーブルとを交換した後のデータベース間の結合回数や結合処理時の入出力のデータサイズ等を予測する。そして、テーブル特定部422は、当該結合回数や結合処理時の入出力のデータサイズ等に基づいて、移行対象テーブルTAと、選択したテーブルとを交換した後に、交換前に比べてデータ通信量が削減されているか否かを判定する。テーブル特定部422は、交換前に比べてデータ通信量が削減されていると判定すると、移行対象テーブルTAと、選択したテーブルとの交換が、クエリの実行性能の改善に寄与すると判定し、選択したテーブルを第2移行対象テーブルとして特定する。ここで、図7、図8に示す例では、第2移行対象テーブルがTBであるものとする。なお、テーブル特定部422は、複数のテーブルを第2移行対象テーブルとして特定してもよい。
Here, the
続いて、移行制御部423は、データベース11Aの空きサイズ、データベース11Bの空きサイズ、移行対象テーブルTAのサイズ、第2移行対象テーブルTBのサイズに基づいて、1回あたりの移行量を算出する(S92)。図7、図8に示す例では、移行対象テーブルTAと、第2移行対象テーブルTBとが同じサイズであり、1回あたりの移行量が、移行対象テーブルTAの半分のサイズであるものとする。
Subsequently, the
続いて、移行制御部423は、算出された1回あたりの移行量に基づいて、移行対象テーブルTA、及び第2移行対象テーブルTBの一部を複製する(S93)。具体的には、移行制御部423は、データベース11Bにデータが含まれていない移行対象テーブルTAを生成するとともに、データベース11Aにデータが含まれていない第2移行対象テーブルTBを生成する。
Then, the
続いて、移行制御部423は、プロファイル情報411に記憶されている統計情報を参照して、移行対象テーブルTA及び第2移行対象テーブルTBからデータの抽出する際の抽出条件に用いるカラムと、抽出条件とを特定する。ここで、カラムは、移行するレコードの数やサイズの推定精度が高いものが好ましく、数値型の主キーのように一様に分布しているカラムが好ましい。
Subsequently, the
続いて、移行制御部423は、図7(b)に示すように、抽出条件に基づいて移行対象テーブルTAから抽出したデータを、データベース11Bに生成された移行対象テーブルTAに複製する。同様に、移行制御部423は、抽出条件に基づいて移行対象テーブルTBから抽出したデータを、データベース11Aに生成された移行対象テーブルTBに複製する。
Subsequently, the
続いて、更新部424は、クエリ処理装置2に記憶されている論理モデル及び物理モデルを更新する(S94)。具体的には、図7(c)に示すように、更新部424は、移行対象テーブルの一部の複製が完了すると、データベース11Bに一部が複製されている移行対象テーブルTAを示す物理モデルPMBを新たに生成する。
Subsequently, the
そして、更新部424は、図7(c)に示すように、物理モデルPMAが示す複製されていない移行対象テーブルTAのデータと、物理モデルPMBが示すデータベース11Bに複製された移行対象テーブルTAのデータとを連結するクエリを示す論理モデルLMBを新たに生成する。ここで、論理モデルLMBが示すテーブルは、ビューである。
Then, as illustrated in FIG. 7C, the updating
ここで、データベース11Aのデータベース名をA、データベース11Bのデータベース名をBとした場合、論理モデルLMBが示すクエリは、例えば以下に示すクエリである。
SELECT * FROM A.TA WHERE A.TA.x > a
UNION all
SELECT * FROM B.TA WHERE B.TA.x ≦ a
Here, when the database name of the
SELECT * FROM A.TA WHERE A.TA.x >a
UNION all
SELECT * FROM B.TA WHERE B.TA.x ≤ a
論理モデルLMBが示すクエリにおいて、移行先のデータベース11Bの移行対象テーブルTAからデータを抽出する抽出条件は、移行対象テーブルTAの一部のデータを移行する際に使用した抽出条件となる。また、移行元のデータベース11Aの移行対象テーブルTAからデータを抽出する抽出条件は、移行対象テーブルTAの一部のデータを移行する際に使用した抽出条件の逆の論理を示す抽出条件となる。
In the query indicated by the logical model LMB, the extraction condition for extracting data from the migration target table TA of the
また、更新部424は、図7(c)に示すように、移行対象テーブルTAの論理モデルLMAが示すテーブルを、論理モデルLMBが示す、新たに生成された物理モデルPMBが示す移行対象テーブルのデータと、移行元のデータベース11Aに格納されている複製前の移行対象テーブルのデータとを連結したビューに変更する。
Further, as shown in FIG. 7C, the updating
同様に、更新部424は、第2移行対象テーブルの一部の複製が完了すると、データベース11Aに一部が複製されている第2移行対象テーブルTBを示す物理モデルを新たに生成する。
Similarly, when the copy of a part of the second migration target table is completed, the updating
そして、更新部424は、複製されていない第2移行対象テーブルTBのデータと、新たに生成された物理モデルが示すデータベース11Aに複製された第2移行対象テーブルTBのデータとを連結するクエリを示す論理モデルを新たに生成する。ここで、当該論理モデルが示すテーブルは、ビューである。また、更新部424は、第2移行対象テーブルTBの論理モデルが示すテーブルを、新たに生成された論理モデルが示すビューに変更する。
Then, the updating
続いて、移行制御部423は、更新部424が移行対象テーブルTA及び第2移行対象テーブルTBの論理モデルを変更すると、複製済の移行対象テーブルTAの一部及び第2移行対象テーブルTBの一部を、それぞれのテーブルの移行元のデータベースから消去する(S95)。具体的には、移行制御部423は、図7(d)に示すように、データベース11Aから、移行対象テーブルTAの複製済のデータを消去するとともに、データベース11Bから、第2移行対象テーブルTBの複製済のデータを消去する。
Subsequently, when the updating
続いて、移行制御部423は、移行対象テーブルTA及び第2移行対象テーブルTBの移行が完了したか否かを判定する(S96)。移行制御部423は、移行が完了したと判定すると、テーブル交換処理を終了する。
Then, the
また、移行制御部423は、移行が完了していないと判定すると、S93に処理を移し、図8(e)に示すように、複製されていない移行対象テーブルTAの一部のデータと、第2移行対象テーブルTBの一部とを、それぞれのテーブルの移行先のデータベースにさらに複製する。
When the
その後、更新部424は、図8(f)に示すように、データベース11Aに格納されている移行対象テーブルTAを示す物理モデルPMAを消去し、移行対象テーブルTAの論理モデルLMAが示すテーブルを、物理モデルPMBが示す移行対象テーブルTAに変更する。そして、移行制御部423は、図8(g)に示すように、データベース11Aに格納されている移行対象テーブルTAを消去する。
Thereafter, as shown in FIG. 8F, the updating
なお、移行制御部423は、第2移行対象テーブルTBの一部をデータベース11Aに複製する処理を繰り返すことにより、第2移行対象テーブルTBの移行を行ったが、これに限らない。
The
移行制御部423は、第2移行対象テーブルTBの移行先のデータベース11Aの空きサイズが、第2移行対象テーブルTBのサイズ以上の場合には、第2移行対象テーブルTBの全体を一度に当該移行先のデータベース11Aに複製してもよい。そして、移行制御部423は、第2移行対象テーブルTBを移行元のデータベース11Bから消去した後に、複製していない移行対象テーブルTAのデータを、当該テーブルの当該移行先のデータベース11Bに一度に複製してもよい。このようにすることで、移行管理装置4は、移行処理にかかる時間を短縮することができる。
When the free size of the
また、全ての移行対象テーブルの移行が完了しても、依然として複数のデータベース11のテーブルを参照して実行されるクエリは存在する。このため、移行制御部423は、移行対象テーブルの移行完了後に、複数のテーブルの利用状況に基づいて、それぞれ異なるデータベース11に格納されているテーブルを結合する結合処理のうち、出現頻度が高い予測される結合処理を特定する。
Further, even if the migration of all the migration target tables is completed, there are still queries that are executed by referring to the tables of the plurality of
そして、移行制御部423は、特定した結合処理に対応する入力データ又は出力データ(マテリアライズドビュー)のサイズを算出する。移行制御部423は、算出したサイズがクエリ処理装置2の記憶部21の利用可能サイズ以下である場合に、マテリアライズドビューをクエリ処理装置2の記憶部21に生成する。更新部424は、マテリアライズドビューが生成されると、マテリアライズドビューを参照可能なように、物理モデルPM及び論理モデルLMを更新する。
Then, the
クエリ処理装置2のクエリ実行部222は、取得されたクエリを解析し、取得されたクエリに対応する処理に、生成したマテリアライズドビューに対応する結合処理が含まれている場合に、当該マテリアライズドビューにアクセスして処理を実行する。このようにすることで、クエリ処理装置2は、異なるデータベース11に格納されている複数のテーブルを参照することによるクエリの実行性能の悪化を防ぐことができる。なお、移行制御部423は、移行対象テーブルの移行完了後にマテリアライズドビューをクエリ処理装置2の記憶部21に生成したが、これに限らない。移行制御部423は、移行対象テーブルの移行完了前に、複数のテーブルの利用状況に基づいて、マテリアライズドビューをクエリ処理装置2の記憶部21に生成してもよい。
The
[本実施形態における効果]
以上のとおり、本実施形態に係る移行管理装置4は、複数のデータベース11のそれぞれに含まれる複数のテーブルの利用状況に基づいて、複数のデータベース11のうち、現在格納されているデータベースとは異なるデータベースに移行するテーブルを移行対象テーブルとして特定する。そして、移行管理装置4は、特定された移行対象テーブルを移行先のデータベースに複製し、移行対象テーブルの複製が完了すると、クエリ処理装置2の物理モデルが示す移行対象テーブルの格納先を移行先のデータベースに更新する。
[Effects of this embodiment]
As described above, the migration management device 4 according to the present embodiment is different from the currently stored database among the plurality of
このようにすることで、移行管理装置4は、テーブルの利用状況に基づいて、テーブルを適切なデータベースに配置することができる。これにより、クエリ処理装置2が、クエリをデータベース11に実行させる機会が増加するので、クエリ実行時のデータ通信量を削減し、クエリの実行性能を向上させることができる。また、移行管理装置4は、移行対象テーブルの複製が完了すると、クエリ処理装置2の物理モデルが示す移行対象テーブルの格納先を移行先のデータベースに更新することにより、ユーザに影響を与えることなく移行対象テーブルの移行を実施することができる。
By doing so, the migration management device 4 can arrange the table in an appropriate database based on the usage status of the table. As a result, the query processing device 2 increases the chances of causing the
また、移行管理装置4は、移行先のデータベース11の空きサイズが移行対象テーブルのサイズよりも小さい場合には、移行先のデータベースから移行させるテーブルを第2移行対象テーブルとして特定し、移行対象テーブルと、第2移行対象テーブルとを、部分的に移行する処理を複数回実行することにより、移行対象テーブルを移行先のデータベース11に移行させる。このようにすることで、移行管理装置4は、移行先のデータベース11の空きサイズが移行対象テーブルのサイズよりも小さい場合であっても、移行対象テーブルを当該データベース11に移行することができる。
Further, when the free size of the
以上、本発明を実施形態を用いて説明したが、本発明の技術的範囲は上記実施形態に記載の範囲には限定されない。上記実施形態に、多様な変更又は改良を加えることが可能であることが当業者に明らかである。例えば、上述の複数の実施形態を組み合わせてもよい。また、特に、装置の分散・統合の具体的な実施形態は以上に図示するものに限られず、その全部又は一部について、種々の付加等に応じて、又は、機能負荷に応じて、任意の単位で機能的又は物理的に分散・統合して構成することができる。 Although the present invention has been described above using the embodiments, the technical scope of the present invention is not limited to the scope described in the above embodiments. It is apparent to those skilled in the art that various changes or improvements can be added to the above-described embodiment. For example, the plurality of embodiments described above may be combined. Further, in particular, the specific embodiment of the dispersion/integration of the devices is not limited to the one illustrated above, and any or all of them may be arbitrarily added according to various additions or functional loads. The units can be functionally or physically distributed and integrated.
例えば、上述の実施形態では、クエリ処理装置2と、移行管理装置4とが異なる装置であるものとしたが、これに限らない。例えば、クエリ処理装置2が、利用状況特定部421、テーブル特定部422、移行制御部423、更新部424を備え、移行管理装置4として機能してもよい。
For example, in the above embodiment, the query processing device 2 and the migration management device 4 are different devices, but the invention is not limited to this. For example, the query processing device 2 may include the usage
1・・・記憶装置、2・・・クエリ処理装置、21・・・記憶部、22・・・制御部、221・・・クエリ取得部、222・・・クエリ実行部、223・・・出力部、3・・・ユーザ端末、4・・・移行管理装置、41・・・記憶部、42・・・制御部、421・・・利用状況特定部、422・・・テーブル特定部、423・・・移行制御部、424・・・更新部、S・・・仮想データベースシステム 1... Storage device, 2... Query processing device, 21... Storage unit, 22... Control unit, 221... Query acquisition unit, 222... Query execution unit, 223... Output Parts, 3... user terminal, 4... migration management device, 41... storage part, 42... control part, 421... usage status specifying part, 422... table specifying part, 423. ..Transition control unit, 424... Update unit, S... Virtual database system
Claims (7)
特定された前記利用状況に基づいて、前記複数のデータベースのうち、現在格納されている第1データベースとは異なる第2データベースに移行するテーブルを第1移行対象テーブルとして特定し、前記第1移行対象テーブルの移行先の前記第2データベースの空きサイズが前記第1移行対象テーブルのサイズよりも小さい場合に、前記第2データベースから移行させるテーブルを第2移行対象テーブルとして特定するテーブル特定部と、
特定された前記第2移行対象テーブルを前記第2データベースから移行させるとともに、特定された前記第1移行対象テーブルを前記第2データベースに複製する移行制御部と、
前記第1移行対象テーブルの複製が完了すると、前記複数のテーブルのそれぞれの格納先を管理する物理モデルと、ユーザが参照する仮想テーブルを管理する論理モデルとを記憶し前記ユーザから受け付けたクエリを処理するクエリ処理装置の前記物理モデルが示す前記第1移行対象テーブルの格納先を前記第2データベースに更新する更新部と、
を備え、
前記移行制御部は、前記更新部が前記物理モデルを更新すると、前記第1データベースから前記第1移行対象テーブルを消去する、
移行管理装置。 A usage status specifying unit that specifies usage statuses of a plurality of tables included in each of a plurality of databases,
Based on the usage identified, among the plurality of databases, a table for transition to a different second database from the first database which is currently stored and identified as a first transfer target table, the first migration target A table specifying unit that specifies a table to be migrated from the second database as a second migration target table when the free size of the second database of the table migration destination is smaller than the size of the first migration target table ;
A migration control unit that migrates the specified second migration target table from the second database, and replicates the specified first migration target table to the second database,
When the duplication of the first migration target table is completed, a physical model that manages the storage destination of each of the plurality of tables and a logical model that manages the virtual table referred to by the user are stored, and a query accepted from the user is stored. An update unit that updates the storage destination of the first migration target table indicated by the physical model of the query processing device to be processed to the second database;
Equipped with
The migration control unit erases the first migration target table from the first database when the updating unit updates the physical model;
Transition management device.
請求項1に記載の移行管理装置。 The migration management device according to claim 1.
前記更新部は、前記第1移行対象テーブルの一部の複製が完了すると、前記第2データベースに一部が複製されている前記第1移行対象テーブルを示す前記物理モデルである第1物理モデルを新たに生成し、前記第1移行対象テーブルの前記論理モデルが示すテーブルを、前記第1物理モデルが示す前記第1移行対象テーブルのデータと、移行元の前記第1データベースに格納されている複製前の前記第1移行対象テーブルのデータとを連結するクエリに変更し、前記第2移行対象テーブルの一部の複製が完了すると、前記第2移行対象テーブルの移行先のデータベースに一部が複製されている前記第2移行対象テーブルを示す前記物理モデルである第2物理モデルを新たに生成し、前記第2移行対象テーブルの前記論理モデルが示すテーブルを、前記第2物理モデルが示す前記第2移行対象テーブルのデータと、移行元の前記第2データベースに格納されている複製前の前記第2移行対象テーブルのデータとを連結するクエリに変更し、
前記移行制御部は、前記更新部が前記第1移行対象テーブル及び前記第2移行対象テーブルの前記論理モデルを変更すると、複製済の前記第1移行対象テーブルの一部及び前記第2移行対象テーブルの一部を、それぞれのテーブルの移行元のデータベースから消去し、前記第1移行対象テーブルの一部及び前記第2移行対象テーブルの一部を、それぞれのテーブルの移行先のデータベースにさらに複製する、
請求項1又は2に記載の移行管理装置。 The migration control unit is configured such that the free size of the second database of the migration destination of the first migration target table is less than the size of the first migration target table, and the free space of the migration destination database of the second migration target table. When the size is less than the size of the second migration target table, a part of the first migration target table and a part of the second migration target table are duplicated in a migration destination database of each table,
When the copy of a part of the first migration target table is completed, the update unit sets a first physical model, which is the physical model indicating the first migration target table, a part of which is replicated in the second database. newly generated, the logical model shown table of the first migration target table, the data of the first migration target table the first physical model shown, stored in the migration source of the first database replication When the query is changed to connect the data of the previous first migration target table and the replication of a part of the second migration target table is completed, a part of the second migration target table is replicated in the migration destination database. A second physical model, which is the physical model indicating the second migration target table , is newly generated, and the table indicated by the logical model of the second migration target table is changed to the second physical model indicated by the second physical model. 2 Change to a query that connects the data of the migration target table and the data of the second migration target table before replication stored in the migration source second database,
When the update unit changes the logical models of the first migration target table and the second migration target table, the migration control unit, a part of the duplicated first migration target table and the second migration target table Is partially erased from the migration source database of each table, and a part of the first migration target table and a part of the second migration target table are further copied to the migration destination database of each table. ,
The migration management device according to claim 1.
請求項1から3のいずれか1項に記載の移行管理装置。 The migration management device according to any one of claims 1 to 3.
特定された前記利用状況に基づいて、前記複数のデータベースのうち、現在格納されているデータベースとは異なるデータベースに移行するテーブルを移行対象テーブルとして特定するテーブル特定部と、
特定された前記移行対象テーブルを移行先のデータベースに複製し、前記利用状況に基づいて、それぞれ異なるデータベースに格納されているテーブルが結合される結合処理のうち、出現頻度が高いと予測される結合処理を特定し、特定した結合処理の入力データ又は出力データを、前記複数のテーブルのそれぞれの格納先を管理する物理モデルと、ユーザが参照する仮想テーブルを管理する論理モデルとを記憶し前記ユーザから受け付けたクエリを処理するクエリ処理装置の記憶部に生成する移行制御部と、
前記移行対象テーブルの複製が完了すると、前記クエリ処理装置の前記物理モデルが示す前記移行対象テーブルの格納先を前記移行先のデータベースに更新し、前記クエリ処理装置の前記記憶部に生成された前記入力データ又は前記出力データが参照可能に前記物理モデル及び前記論理モデルを更新する更新部と、
を備える移行管理装置。 A usage status specifying unit that specifies usage statuses of a plurality of tables included in each of a plurality of databases,
A table specifying unit that specifies a table to be migrated to a database different from the currently stored database among the plurality of databases based on the identified usage status, as a migration target table,
Of the join processing in which the specified migration target table is duplicated in the migration destination database and the tables stored in different databases are combined based on the usage status, the join that is predicted to have a high appearance frequency is joined. A process is specified, and the input data or output data of the specified join process is stored in a physical model that manages the storage destination of each of the plurality of tables and a logical model that manages the virtual table that the user refers to. A migration control unit that generates a storage unit of the query processing device that processes the query received from
When the replication of the migration target table is completed, the storage destination of the migration target table indicated by the physical model of the query processing device is updated to the migration destination database, and the storage unit of the query processing device is generated. An update unit for updating the physical model and the logical model so that the input data or the output data can be referred to,
A transition management device including.
複数のデータベースのそれぞれに含まれる複数のテーブルの利用状況を特定するステップと、
特定された前記利用状況に基づいて、前記複数のデータベースのうち、現在格納されている第1データベースとは異なる第2データベースに移行するテーブルを第1移行対象テーブルとして特定するステップと、
前記第1移行対象テーブルの移行先の前記第2データベースの空きサイズが前記第1移行対象テーブルのサイズよりも小さい場合に、前記第2データベースから移行させるテーブルを第2移行対象テーブルとして特定するステップと、
特定された前記第2移行対象テーブルを前記第2データベースから移行させるとともに、特定された前記第1移行対象テーブルを前記第2データベースに複製するステップと、
前記第1移行対象テーブルの複製が完了すると、前記複数のテーブルのそれぞれの格納先を管理する物理モデルと、ユーザが参照する仮想テーブルを管理する論理モデルとを記憶し前記ユーザから受け付けたクエリを処理するクエリ処理装置の前記物理モデルが示す前記第1移行対象テーブルの格納先を前記第2データベースに更新するステップと、
前記物理モデルが更新されると、前記第1データベースから前記第1移行対象テーブルを消去するステップと、
を有する移行管理方法。 Computer running,
Identifying the usage of multiple tables in each of the multiple databases,
A step of identifying a table to be migrated to a second database different from the currently stored first database among the plurality of databases based on the identified usage status, as a first migration target table;
A step of identifying a table to be migrated from the second database as a second migration target table when the free size of the second database of the migration destination of the first migration target table is smaller than the size of the first migration target table. When,
Migrating the identified second migration target table from the second database and copying the identified first migration target table to the second database;
When the duplication of the first migration target table is completed, a physical model that manages the storage destination of each of the plurality of tables and a logical model that manages the virtual table referred to by the user are stored, and a query accepted from the user is stored. Updating the storage destination of the first migration target table indicated by the physical model of the query processing device to be processed to the second database;
Deleting the first migration target table from the first database when the physical model is updated;
A transition management method having .
複数のデータベースのそれぞれに含まれる複数のテーブルの利用状況を特定するステップと、 Identifying the usage of multiple tables in each of the multiple databases,
特定された前記利用状況に基づいて、前記複数のデータベースのうち、現在格納されているデータベースとは異なるデータベースに移行するテーブルを移行対象テーブルとして特定するステップと、 A step of identifying a table to be migrated to a database different from the currently stored database among the plurality of databases based on the identified usage status,
特定された前記移行対象テーブルを移行先のデータベースに複製するステップと、 Copying the identified migration target table to the migration destination database;
前記移行対象テーブルの複製が完了すると、前記複数のテーブルのそれぞれの格納先を管理する物理モデルと、ユーザが参照する仮想テーブルを管理する論理モデルとを記憶し前記ユーザから受け付けたクエリを処理するクエリ処理装置の前記物理モデルが示す前記移行対象テーブルの格納先を前記移行先のデータベースに更新するステップと、 When the replication of the migration target table is completed, a physical model that manages the storage destination of each of the plurality of tables and a logical model that manages the virtual table referenced by the user are stored and the query received from the user is processed. Updating the storage destination of the migration target table indicated by the physical model of the query processing device to the migration destination database;
前記利用状況に基づいて、それぞれ異なるデータベースに格納されているテーブルが結合される結合処理のうち、出現頻度が高いと予測される結合処理を特定するステップと、 A step of identifying a join process predicted to have a high appearance frequency out of join processes in which tables stored in different databases are joined based on the usage status;
特定された前記結合処理に対応する入力データ又は出力データを前記クエリ処理装置の記憶部に生成するステップと、 Generating input data or output data corresponding to the identified combining process in a storage unit of the query processing device;
前記記憶部に記憶された前記入力データ又は前記出力データが参照可能に前記物理モデル及び前記論理モデルを更新するステップと、 Updating the physical model and the logical model so that the input data or the output data stored in the storage unit can be referred to;
を備える移行管理方法。 A transition management method comprising.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2017188843A JP6744272B2 (en) | 2017-09-28 | 2017-09-28 | Migration management device and migration management method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2017188843A JP6744272B2 (en) | 2017-09-28 | 2017-09-28 | Migration management device and migration management method |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2019066939A JP2019066939A (en) | 2019-04-25 |
JP6744272B2 true JP6744272B2 (en) | 2020-08-19 |
Family
ID=66339600
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2017188843A Active JP6744272B2 (en) | 2017-09-28 | 2017-09-28 | Migration management device and migration management method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP6744272B2 (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2020024483A (en) * | 2018-08-06 | 2020-02-13 | 京セラドキュメントソリューションズ株式会社 | Data management system and data management program |
CN111694812A (en) * | 2020-05-06 | 2020-09-22 | 五八有限公司 | Data migration method and data migration device |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP4087097B2 (en) * | 2001-11-12 | 2008-05-14 | 株式会社日立製作所 | Data relocation method and data relocation method considering database management system information |
JP4579000B2 (en) * | 2005-02-14 | 2010-11-10 | 株式会社日立製作所 | Data allocation setting in computer system |
JP5597623B2 (en) * | 2011-12-02 | 2014-10-01 | 株式会社日立システムズ | Database processing method |
JP6157004B2 (en) * | 2014-03-19 | 2017-07-05 | Kddi株式会社 | Virtual database system management apparatus, management method, and management program |
JP6554042B2 (en) * | 2016-02-17 | 2019-07-31 | 日本電信電話株式会社 | Data relocation system, data relocation apparatus, and data relocation method |
-
2017
- 2017-09-28 JP JP2017188843A patent/JP6744272B2/en active Active
Also Published As
Publication number | Publication date |
---|---|
JP2019066939A (en) | 2019-04-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8121966B2 (en) | Method and system for automated integrated server-network-storage disaster recovery planning | |
Mahgoub et al. | {OPTIMUSCLOUD}: Heterogeneous configuration optimization for distributed databases in the cloud | |
US11263236B2 (en) | Real-time cross-system database replication for hybrid-cloud elastic scaling and high-performance data virtualization | |
JP6239004B2 (en) | Method, apparatus and computer readable medium for optimized data subsetting | |
US9471657B1 (en) | Range query capacity allocation | |
US9323791B2 (en) | Apparatus and method for expanding a shared-nothing system | |
JP6211631B2 (en) | Identifying workloads and sizing buffers for volume replication purposes | |
US9330158B1 (en) | Range query capacity allocation | |
Long et al. | A toolkit for modeling and simulating cloud data storage: An extension to cloudsim | |
CN108073696B (en) | GIS application method based on distributed memory database | |
US20230085750A1 (en) | Code generator platform for data transformation | |
EP3707614B1 (en) | Redistributing table data in database cluster | |
JP6744272B2 (en) | Migration management device and migration management method | |
JP4945232B2 (en) | Access control method, computer system, and object replication program | |
KR101989074B1 (en) | Migration based on replication log in database sharding environment | |
US20230132117A1 (en) | Handling system-characteristics drift in machine learning applications | |
JP2008225686A (en) | Data arrangement management device and method in distributed data processing platform, and system and program | |
CN109710698A (en) | A kind of data assemblage method, device, electronic equipment and medium | |
KR102354343B1 (en) | Spatial indexing method and apparatus for blockchain-based geospatial data | |
JP6523823B2 (en) | Virtual database system management apparatus, management method and management program | |
JP2013033439A (en) | Database management method | |
KR101919816B1 (en) | Consistency checking in database sharding environment | |
JP6898215B2 (en) | Database management device, database management method and database management program | |
CN111782634A (en) | Data distributed storage method and device, electronic equipment and storage medium | |
Zhang et al. | Improving performance for geo-distributed data process in wide-area |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20190802 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20200423 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20200519 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20200702 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20200721 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20200730 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 6744272 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |