JP2000076288A - Database management system - Google Patents

Database management system

Info

Publication number
JP2000076288A
JP2000076288A JP10246876A JP24687698A JP2000076288A JP 2000076288 A JP2000076288 A JP 2000076288A JP 10246876 A JP10246876 A JP 10246876A JP 24687698 A JP24687698 A JP 24687698A JP 2000076288 A JP2000076288 A JP 2000076288A
Authority
JP
Japan
Prior art keywords
inquiry
item
query
optimizing
registration
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Withdrawn
Application number
JP10246876A
Other languages
Japanese (ja)
Inventor
Suguru Kawakami
英 川上
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.)
Oki Electric Industry Co Ltd
Original Assignee
Oki Electric Industry Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Oki Electric Industry Co Ltd filed Critical Oki Electric Industry Co Ltd
Priority to JP10246876A priority Critical patent/JP2000076288A/en
Publication of JP2000076288A publication Critical patent/JP2000076288A/en
Withdrawn legal-status Critical Current

Links

Landscapes

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

Abstract

PROBLEM TO BE SOLVED: To shorten processing time against an inquiry. SOLUTION: A database management system is provided with an inquiry reception means 10, an inquiry registration means 12, a plural inquiries optimizing means 14, a registration inquiry starting means 16, an inquiry optimizing means 18, an inquiry execution means 20 and a data accumulation means 22. The inquiry reception means receives a started inquiry. The inquiry registration means 12 registers the received inquiry. The plural inquiries optimizing means 14 optimizes the execution of plural registered inquires and registers an optimum execution procedure. The registration inquiry starting means 16 starts plural registered inquires in accordance with the registered execution procedure at designated time. The inquiry optimizing means 18 optimizes the processing system of the started inquiry. The inquiry execution means 20 retrieves and updates data stored in the data accumulation means in accordance with the optimized processing system and processes the started inquiry.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】この発明は、データベース管
理システムの問い合わせ処理方式に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an inquiry processing method for a database management system.

【0002】[0002]

【従来の技術】データベース管理システムは、複数の利
用者が同時にデータベースを更新、検索しても効率よく
処理し、矛盾が起こらないよう管理するものである。図
6に示すように、従来のデータベース管理システムは、
問い合わせ受付手段100、問い合わせ登録手段10
2、登録問い合わせ起動手段104、問い合わせ最適化
手段106、問い合わせ実行手段108およびデータ蓄
積手段110から構成されている。問い合わせ受付手段
100は、起動された問い合わせ(データベースに対す
る命令、要求、照会)を受け付ける。問い合わせ登録手
段102は、受け付けされた問い合わせを登録する。登
録問い合わせ起動手段104は、指定された時刻に、登
録された実行手順に従って、登録された問い合わせを起
動する。問い合わせ最適化手段106は、起動された問
い合わせの処理方式を個別に最適化する。問い合わせ実
行手段108は、最適化された処理方式に従って、デー
タ蓄積手段110に格納されているデータの検索および
更新を行い、起動された問い合わせを処理する。
2. Description of the Related Art A database management system manages a database efficiently even when a plurality of users update and search the database at the same time, so that no inconsistency occurs. As shown in FIG. 6, a conventional database management system includes:
Inquiry receiving means 100, Inquiry registration means 10
2. It is composed of a registration query activation unit 104, a query optimization unit 106, a query execution unit 108, and a data storage unit 110. The inquiry receiving means 100 receives the activated inquiry (command, request, inquiry to the database). The inquiry registration unit 102 registers the received inquiry. The registration inquiry activation unit 104 activates the registered inquiry at a designated time according to the registered execution procedure. The inquiry optimizing means 106 individually optimizes the processing method of the activated inquiry. The inquiry execution unit 108 searches and updates data stored in the data storage unit 110 according to the optimized processing method, and processes the activated inquiry.

【0003】[0003]

【発明が解決しようとする課題】しかしながら、上記構
成では、定期的に処理すべき複数の問い合わせに対する
個々の処理を最適化するために、各々の問い合わせで同
じ処理を繰り返し実行する場合には、多大な処理時間を
要するという問題点があった。
However, in the above-described configuration, in order to optimize individual processes for a plurality of queries to be processed periodically, the same process is repeatedly performed for each query. This requires a long processing time.

【0004】従って、従来より、問い合わせに対する処
理時間の短縮化が可能なデータベース管理システムの出
現が望まれていた。
Therefore, there has been a demand for a database management system that can shorten the processing time for an inquiry.

【0005】[0005]

【課題を解決するための手段】そこで、この発明のデー
タベース管理システムによれば、起動された問い合わせ
を受け付ける問い合わせ受付手段と、受け付けされた問
い合わせを登録する問い合わせ登録手段と、登録された
複数の問い合わせの実行を最適化し、最適な実行手順を
登録する複数問い合わせ最適化手段と、指定された時刻
に、登録された実行手順に従って、登録された複数の問
い合わせを起動する登録問い合わせ起動手段と、起動さ
れた問い合わせの処理方式を最適化する問い合わせ最適
化手段と、最適化された処理方式に従って、データ蓄積
手段に格納されているデータの検索および更新を行い、
起動された問い合わせを処理する問い合わせ実行手段と
を具えることを特徴とする。
Therefore, according to the database management system of the present invention, an inquiry receiving means for receiving an activated inquiry, an inquiry registering means for registering the received inquiry, and a plurality of registered inquiries are provided. Query optimization means for optimizing the execution of a query and registering an optimal execution procedure, and registration query activation means for activating a plurality of registered queries at a specified time in accordance with the registered execution procedure. Query optimizing means for optimizing the processing method of the query, and searching and updating the data stored in the data storage means according to the optimized processing method,
Query execution means for processing the activated query.

【0006】このように、複数問い合わせ最適化手段を
具え、定期的に実施される複数の問い合わせの処理およ
び複数の問い合わせの実行順序を最適化するので、個々
の問い合わせの処理としては処理時間が多くなる場合が
あるが、複数の問い合わせの処理時間の合計を少なくす
るという効果が得られる。
As described above, since a plurality of query optimizing means are provided to optimize the processing of a plurality of queries and the execution order of the plurality of queries periodically, the processing time for each query is long. However, the effect of reducing the total processing time of a plurality of inquiries can be obtained.

【0007】また、データベース管理システムでは、関
係(リレーショナル)データモデルが多用される。関係
データモデルでは、行と列からなる2次元の表でデータ
を表現する。例えば、行は通常のファイルのレコードに
対応し、列は項目(フィールド)に対応する。データの
検索や更新は表に対する操作になる。
In a database management system, a relational (relational) data model is frequently used. In the relational data model, data is represented by a two-dimensional table including rows and columns. For example, rows correspond to records in a regular file, and columns correspond to items (fields). Searching and updating data are operations on the table.

【0008】この発明のデータベース管理システムにお
いて、好ましくは、複数問い合わせ最適化手段は、複数
の問い合わせが同じ複数の表に関係するものである場
合、これら複数の表を結合した一時表を生成するように
構成すると良い。
In the database management system according to the present invention, preferably, when a plurality of queries relate to the same plurality of tables, the plurality of query optimizing means generates a temporary table combining the plurality of tables. It is good to configure.

【0009】このように構成してあるので、一時表を利
用することにより、問い合わせ実行時間の短縮化が図れ
る。
With this configuration, the query execution time can be reduced by using the temporary table.

【0010】また、この発明のデータベース管理システ
ムにおいて、好ましくは、複数問い合わせ最適化手段
は、複数の問い合わせの中から同じ項目に関係する問い
合わせを見つけ出し、この項目でグループ化された問い
合わせを生成するように構成すると良い。
In the database management system according to the present invention, preferably, the multiple query optimizing means finds a query related to the same item from a plurality of queries, and generates a query grouped by the item. It is good to configure.

【0011】このように、共通の項目でグループ化され
た問い合わせを生成するので、問い合わせ実行時間の短
縮化が図れる。
As described above, since queries grouped by common items are generated, it is possible to reduce the query execution time.

【0012】[0012]

【発明の実施の形態】以下、図を参照して、この発明の
実施の形態につき説明する。尚、図は、この発明の構
成、接続関係および配置関係が理解できる程度に概略的
に示されているに過ぎない。また、以下に記載される数
値等の条件は単なる一例に過ぎない。従って、この発明
は、この実施の形態に何ら限定されることがない。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment of the present invention will be described below with reference to the drawings. It should be noted that the drawings are only schematically shown to the extent that the configuration, connection relation, and arrangement relation of the present invention can be understood. The conditions such as numerical values described below are merely examples. Therefore, the present invention is not limited to this embodiment.

【0013】この実施の形態のデータベース管理システ
ムの構成につき、図1を参照して説明する。図1は、こ
の実施の形態のデータベース管理システムの構成を示す
ブロック図である。
The configuration of the database management system according to this embodiment will be described with reference to FIG. FIG. 1 is a block diagram showing the configuration of the database management system according to the embodiment.

【0014】図1に示すように、この実施の形態のデー
タベース管理システムは、問い合わせ受付手段10、問
い合わせ登録手段12、複数問い合わせ最適化手段1
4、登録問い合わせ起動手段16、問い合わせ最適化手
段18、問い合わせ実行手段20およびデータ蓄積手段
22により構成されている。問い合わせ受付手段10
は、起動された問い合わせを受け付ける。問い合わせ登
録手段12は、受け付けされた問い合わせを登録する。
複数問い合わせ最適化手段14は、登録された複数の問
い合わせの実行を最適化し、最適な実行手順を登録す
る。登録問い合わせ起動手段16は、指定された時刻
に、登録された実行手順に従って、登録された複数の問
い合わせを起動する。問い合わせ最適化手段18は、起
動された問い合わせの処理方式を最適化する。問い合わ
せ実行手段20は、最適化された処理方式に従って、デ
ータ蓄積手段22に格納されているデータの検索および
更新を行い、起動された問い合わせを処理する。
As shown in FIG. 1, a database management system according to this embodiment includes an inquiry receiving unit 10, an inquiry registering unit 12, and a multiple inquiry optimizing unit 1.
4, a registration query activation unit 16, a query optimization unit 18, a query execution unit 20, and a data storage unit 22. Inquiry receiving means 10
Accepts the activated query. The inquiry registration unit 12 registers the accepted inquiry.
The multiple inquiry optimizing unit 14 optimizes the execution of the registered multiple inquiries, and registers an optimal execution procedure. The registration inquiry activation means 16 activates a plurality of registered inquiries at a designated time according to the registered execution procedure. The inquiry optimizing unit 18 optimizes the processing method of the activated inquiry. The query execution unit 20 searches and updates the data stored in the data storage unit 22 according to the optimized processing method, and processes the started query.

【0015】また、これら問い合わせ受付手段10、問
い合わせ登録手段12、複数問い合わせ最適化手段1
4、登録問い合わせ起動手段16、問い合わせ最適化手
段18、問い合わせ実行手段20およびデータ蓄積手段
22は、この順序で結合されており、データの受け渡し
が可能になっている。
In addition, these inquiry receiving means 10, inquiry registration means 12, and multiple inquiry optimizing means 1
4. The registration query activation unit 16, the query optimization unit 18, the query execution unit 20, and the data storage unit 22 are connected in this order, and can exchange data.

【0016】問い合わせ受付手段10は、定期的に起動
される問い合わせを受け付ける。例えば、データベース
の利用者は、問い合わせ受付手段10に対して外部から
所要の問い合わせを入力する。入力した問い合わせは、
問い合わせ登録手段12に渡され、この問い合わせ登録
手段12に記憶すなわち登録される。
The inquiry receiving means 10 receives an inquiry periodically started. For example, a user of the database inputs a required inquiry to the inquiry receiving means 10 from outside. The query you entered is
It is passed to the inquiry registration means 12 and stored or registered in the inquiry registration means 12.

【0017】複数問い合わせ最適化手段14では、問い
合わせ登録手段12に登録された複数の問い合わせの実
行を最適化するため、実行手順などが生成される。生成
された実行手順などは、問い合わせ登録手段12に登録
される。
The multiple query optimizing unit 14 generates an execution procedure and the like in order to optimize the execution of the multiple queries registered in the query registration unit 12. The generated execution procedure and the like are registered in the inquiry registration unit 12.

【0018】複数問い合わせ最適化手段14は、最適化
要求を受け付けると、問い合わせ登録手段12に登録さ
れた複数の問い合わせを読み出し、解析する。例えば、
複数問い合わせ最適化手段14は、問い合わせAに対し
て得られた中間結果や最終結果を利用可能な問い合わせ
Bを探して、その問い合わせAに対して生成された中間
結果や最終結果を問い合わせ登録手段12に蓄積する。
そして、問い合わせBに対してはこれら生成された中間
結果や最終結果を利用して処理することにより最適化を
図る。また、問い合わせBは問い合わせAの後に実行さ
れるように、問い合わせの実行手順を生成する。これら
「最適化された問い合わせA」、「最適化された問い合
わせB」、「中間結果や最終結果」および「実行手順」
は、問い合わせ登録手段12にソースコードの形で蓄積
される。
Upon receiving the optimization request, the multiple query optimizing unit 14 reads and analyzes the multiple queries registered in the query registering unit 12. For example,
The multiple query optimizing unit 14 searches for a query B that can use the intermediate result and the final result obtained for the query A, and stores the intermediate result and the final result generated for the query A in the query registration unit To accumulate.
The inquiry B is optimized by processing using the generated intermediate result and final result. Also, the inquiry B generates an inquiry execution procedure so that the inquiry B is executed after the inquiry A. These “optimized query A”, “optimized query B”, “interim result and final result”, and “execution procedure”
Is stored in the inquiry registration means 12 in the form of a source code.

【0019】このように、最適化された定期的に実施さ
れる問い合わせと問い合わせの実行手順とは、それぞれ
「最適化された問い合わせ」として問い合わせ登録手段
12に登録される。
As described above, the optimized and periodically executed inquiry and the execution procedure of the inquiry are respectively registered in the inquiry registration unit 12 as “optimized inquiry”.

【0020】問い合わせ登録手段12に登録された最適
化された問い合わせは、登録問い合わせ起動手段16に
よって、指定された時刻に、登録されている実行手順に
従って、起動される。登録問い合わせ起動手段16は、
定期的に実施される問い合わせの起動時期がくると、登
録された問い合わせの実行手順に従い、最適化された問
い合わせを起動する。
The optimized inquiry registered in the inquiry registration unit 12 is activated by the registration inquiry activation unit 16 at a designated time in accordance with the registered execution procedure. The registration inquiry activation means 16
When the start time of the inquiry that is periodically executed comes, the optimized inquiry is started according to the registered inquiry execution procedure.

【0021】また、起動された問い合わせは、問い合わ
せ最適化手段18によって個々の問い合わせの処理方法
が最適化されてから、問い合わせ実行手段20に渡され
る。問い合わせ最適化手段18では、個々の問い合わせ
の最適化を図るべく、インデックス選択、ジョイン処
理、検索順序の最適化、並列処理などが行われる。
The activated query is passed to the query execution unit 20 after the query optimizing unit 18 optimizes the processing method of each query. The query optimizing unit 18 performs index selection, join processing, optimization of a search order, parallel processing, and the like in order to optimize each query.

【0022】問い合わせ実行手段20は、問い合わせ最
適化手段18から送られた問い合わせを実行し、データ
蓄積手段22に格納されたデータの検索および更新を行
う。問い合わせ実行手段20は、最適化された処理方式
に従って、データ蓄積手段22に格納されているデータ
の検索および更新を行い、問い合わせを処理する。
The query executing means 20 executes the query sent from the query optimizing means 18 and searches and updates the data stored in the data storage means 22. The query execution unit 20 searches and updates data stored in the data storage unit 22 according to the optimized processing method, and processes the query.

【0023】そして、実行された問い合わせの結果がデ
ータベース管理システムから利用者に対し返却される。
利用者は、ディスプレイ等の表示手段を用いることによ
り、問い合わせ結果を取得することになる。
Then, the result of the executed inquiry is returned from the database management system to the user.
The user obtains the inquiry result by using display means such as a display.

【0024】以上説明したように、この構成例では、複
数問い合わせ最適化手段14を具えているため、個々の
問い合わせに対する処理を効率良く実行することができ
る。次に、複数問い合わせ最適化手段14で行われる最
適化の処理アルゴリズム例につき、図2、図3、図4お
よび図5を参照して説明する。図2および図3は、第1
の最適化処理の説明に供する図である。図4は、第2の
最適化処理の説明に供する図である。図5は、第3の最
適化処理の説明に供する図である。尚、以下の説明で
は、データベースの問い合わせ言語として多用されるS
QLをベースにして説明する。
As described above, in this configuration example, since the plural query optimizing means 14 is provided, it is possible to efficiently execute processing for each query. Next, an example of an optimization processing algorithm performed by the multiple query optimizing unit 14 will be described with reference to FIGS. 2, 3, 4, and 5. FIG. FIG. 2 and FIG.
FIG. 9 is a diagram provided for explanation of optimization processing of FIG. FIG. 4 is a diagram provided for explanation of the second optimization process. FIG. 5 is a diagram provided for explanation of the third optimization process. In the following description, S which is frequently used as a query language of the database
A description will be given based on QL.

【0025】<第1の処理例>第1の処理例では、複数
問い合わせ最適化手段14は、複数の問い合わせが同じ
複数の表に関係するものである場合、これら複数の表を
結合した一時表を生成する処理を行う。以下、表1、表
2、表3および表4を参照して説明を行うが、表1には
項目1および5が、表2には項目2および6が、表3に
は項目3が、表4には項目4がそれぞれ含まれている。
<First Processing Example> In the first processing example, when a plurality of queries relate to the same plurality of tables, the multiple query optimizing means 14 sets a temporary table obtained by combining the plurality of tables. Is performed. Hereinafter, description will be made with reference to Table 1, Table 2, Table 3 and Table 4. Table 1 shows items 1 and 5, Table 2 shows items 2 and 6, Table 3 shows item 3, Table 4 includes item 4 respectively.

【0026】(1)最適化前の問い合わせ1 SELECT 項目1、項目2 From 表1、表2、表3 Where 表1、項目1=表2、項目2 And 表1、項目5=表3、項目3 すなわち、問い合わせ1では、表1、表2および表3に
含まれる項目である、項目1および項目2を検索する。
そのとき、表1の項目1と表2の項目2とが対応関係に
あると共に、表1の項目5と表3の項目3とが対応関係
にある(図2(A))。
(1) Query before optimization 1 SELECT Item 1, Item 2 From Table 1, Table 2, Table 3 Where Table 1, Item 1 = Table 2, Item 2 And Table 1, Item 5 = Table 3, Item 3. That is, in the inquiry 1, the items 1 and 2 which are the items included in the tables 1, 2 and 3 are searched.
At this time, item 1 in table 1 and item 2 in table 2 are in a correspondence relationship, and item 5 in table 1 and item 3 in table 3 are in a correspondence relationship (FIG. 2A).

【0027】(2)最適化前の問い合わせ2 SELECT 項目1、項目4 From 表1、表2、表4 Where 表1、項目1=表2、項目2 And 表2、項目6=表4、項目4 すなわち、問い合わせ2では、表1、表2および表4に
含まれる項目である、項目1および項目4を検索する。
そのとき、表1の項目1と表2の項目2とが対応関係に
あると共に、表2の項目6と表4の項目4とが対応関係
にある(図2(B))。
(2) Query before optimization 2 SELECT Item 1, Item 4 From Table 1, Table 2, Table 4 Where Table 1, Item 1 = Table 2, Item 2 And Table 2, Item 6 = Table 4, Item 4 In other words, in the inquiry 2, the items 1 and 4 which are the items included in the tables 1, 2 and 4 are searched.
At this time, item 1 in Table 1 and item 2 in Table 2 are in a correspondence relationship, and item 6 in Table 2 and item 4 in Table 4 are in a correspondence relationship (FIG. 2B).

【0028】(3)表1と表2とを結合した一時表であ
る表5を生成する(図3(A))。この生成のための問
い合わせは、 SELECT 項目1、項目2、項目5、項目6 From 表1、表2 Where 表1、項目1=表2、項目2 と表される。この問い合わせにより検索された結果が表
5として問い合わせ登録手段12に格納される。表5
は、項目1、5、2および6を含む表となる(図3
(A))。
(3) Generate a temporary table, Table 5, by combining Table 1 and Table 2 (FIG. 3A). The inquiry for this generation is expressed as SELECT Item 1, Item 2, Item 5, Item 6 From Table 1, Table 2 Where Table 1, Item 1 = Table 2, Item 2. The result searched by this inquiry is stored in the inquiry registration means 12 as Table 5. Table 5
Is a table containing items 1, 5, 2 and 6 (FIG. 3)
(A)).

【0029】(4)最適化後の問い合わせ1´(表5を
利用した問い合わせ1の変形例) SELECT 項目1、項目2 From 表5、表3 Where 表5、項目5=表3、項目3 すなわち、問い合わせ1´では、表5および表3に含ま
れる項目である、項目1および項目2を検索する。その
とき、表5の項目5と表3の項目3とが対応関係にある
(図3(B))。
(4) Query 1 ′ after optimization (a modification of query 1 using Table 5) SELECT Item 1, Item 2 From Table 5, Table 3 Where Table 5, Item 5 = Table 3, Item 3 Inquiry 1 'retrieves items 1 and 2 which are the items included in Tables 5 and 3. At this time, item 5 in Table 5 and item 3 in Table 3 are in a correspondence relationship (FIG. 3B).

【0030】(5)最適化後の問い合わせ2´(表5を
利用した問い合わせ2の変形例) SELECT 項目3、項目4 From 表5、表4 Where 表5、項目6=表4、項目4 すなわち、問い合わせ2´では、表5および表4に含ま
れる項目である、項目3および項目4を検索する。その
とき、表5の項目6と表4の項目4とが対応関係にある
(図3(C))。
(5) Query 2 'after optimization (a modification of query 2 using Table 5) SELECT Item 3, Item 4 From Table 5, Table 4 Where Table 5, Item 6 = Table 4, Item 4 Inquiry 2 'retrieves items 3 and 4 which are the items included in Tables 5 and 4. At this time, item 6 in Table 5 and item 4 in Table 4 are in a corresponding relationship (FIG. 3C).

【0031】このように、第1の処理例では、一時表と
して所定の項目を結合して合成した表5を生成し、この
表5に対して問い合わせを実行するので、問い合わせに
対する処理時間の短縮化が図れる。
As described above, in the first processing example, Table 5 is generated by combining predetermined items as a temporary table, and an inquiry is performed on Table 5, so that the processing time for the inquiry can be reduced. Can be achieved.

【0032】<第2の処理例>第2の処理例では、複数
問い合わせ最適化手段14は、複数の問い合わせの中か
ら同じ項目に関係する問い合わせを見つけ出し、この項
目でグループ化された問い合わせを生成する処理を行
う。以下、表1、2、3、4を参照して説明を行うが、
表1には項目1、2、3、4、5およびその他(不図
示)が含まれ(図4(A))、表2には項目1、2およ
び3が含まれ(図4(B))、表3には項目4、5およ
び3が含まれ(図4(C))、表4には項目1、2、
3、4および5が含まれている(図4(D))。
<Second Processing Example> In a second processing example, the multiple query optimizing unit 14 finds a query related to the same item from a plurality of queries, and generates a query grouped by this item. Perform the following processing. Hereinafter, description will be made with reference to Tables 1, 2, 3, and 4,
Table 1 includes items 1, 2, 3, 4, 5, and others (not shown) (FIG. 4A), and Table 2 includes items 1, 2, and 3 (FIG. 4B). ), Table 3 includes items 4, 5 and 3 (FIG. 4 (C)), and Table 4 includes items 1, 2,
3, 4, and 5 are included (FIG. 4D).

【0033】(1)最適化前の問い合わせ1 SELECT 項目1、項目2、項目3 From 表1 Group By 項目3 すなわち、問い合わせ1では、表1に含まれる項目であ
る、項目1、項目2および項目3を検索する。そのと
き、項目1と項目2とが項目3によりグループ化されて
いる(図4(B))。この問い合わせにより検索された
結果が表2として問い合わせ登録手段12に格納される
(図4(B))。
(1) Query 1 before optimization 1 SELECT Item 1, Item 2, Item 3 From Table 1 Group By Item 3 That is, in Query 1, items 1, item 2, and item included in Table 1 Search for 3. At this time, item 1 and item 2 are grouped by item 3 (FIG. 4B). The result searched by this inquiry is stored in the inquiry registration means 12 as Table 2 (FIG. 4B).

【0034】(2)最適化前の問い合わせ2 SELECT 項目4、項目5、項目3 From 表1 Group By 項目3 すなわち、問い合わせ2では、表1に含まれる項目であ
る、項目4、項目5および項目3を検索する。そのと
き、項目4と項目5とが項目3によりグループ化されて
いる(図4(C))。この問い合わせにより検索された
結果が表3として問い合わせ登録手段12に格納される
(図4(C))。
(2) Inquiry 2 before optimization: SELECT Item 4, Item 5, Item 3 From Table 1 Group By Item 3 That is, in Query 2, items 4, item 5, and item included in Table 1 Search for 3. At this time, item 4 and item 5 are grouped by item 3 (FIG. 4C). The result searched by this inquiry is stored in the inquiry registration means 12 as Table 3 (FIG. 4C).

【0035】(3)両方の問い合わせの項目3を取得す
る問い合わせを生成する。この問い合わせは、 SELECT 項目1、項目2、項目4、項目5 From 表1 Group By 項目3 と表される。この問い合わせにより検索された結果が表
4として問い合わせ登録手段12に格納される(図4
(D))。
(3) Generate an inquiry for acquiring item 3 of both inquiries. This inquiry is expressed as SELECT item 1, item 2, item 4, item 5 From Table 1 Group By Item 3. The result searched by this inquiry is stored in the inquiry registration means 12 as Table 4 (see FIG. 4).
(D)).

【0036】(4)最適化後の問い合わせ1´(表2を
利用した問い合わせ1の変形例) SELECT 項目1、項目2、項目3 From 表4 すなわち、問い合わせ1´では、表4に含まれる項目で
ある、項目1、項目2および項目3を検索する。
(4) Query 1 'after optimization (a modification of query 1 using Table 2) SELECT Item 1, Item 2, Item 3 From Table 4 That is, in Query 1', items included in Table 4 Are searched for item 1, item 2 and item 3.

【0037】(5)最適化後の問い合わせ2´(表2を
利用した問い合わせ2の変形例) SELECT 項目4、項目5、項目3 From 表4 すなわち、問い合わせ2´では、表4に含まれる項目で
ある、項目4、項目5および項目3を検索する。
(5) Query 2 'after optimization (variation of query 2 using Table 2) SELECT Item 4, Item 5, Item 3 From Table 4 That is, in Query 2', the items included in Table 4 Are searched for item 4, item 5, and item 3.

【0038】このように、第2の処理例では、複数の表
が共通の項目で結合された表4を生成し、この表4に対
して問い合わせを実行することにより、問い合わせに対
する処理時間の短縮化が図れる。
As described above, in the second processing example, a table 4 in which a plurality of tables are joined by common items is generated, and an inquiry is performed on the table 4, thereby shortening the processing time for the inquiry. Can be achieved.

【0039】<第3の処理例>第3の処理例では、複数
問い合わせ最適化手段14は、複数の問い合わせの中か
ら同じ項目に関係する問い合わせを見つけ出し、この項
目でグループ化された問い合わせを生成する処理を行
う。この例では、複数のグループ化項目のUNION
(ユニオン)を取った項目でグループ化を行う。以下、
表1、2、3、4を参照して説明を行うが、表1には項
目1、2、3、4、5およびその他(不図示)が含まれ
(図5(A))、表2には項目1、2、3、4および5
が含まれ(図5(B))、表3には項目1、2および3
が含まれ(図5(C))、表4には項目4、2および5
が含まれている(図5(D))。
<Third Processing Example> In a third processing example, the multiple query optimizing unit 14 finds a query related to the same item from a plurality of queries and generates a query grouped by this item. Perform the following processing. In this example, UNION of multiple grouping items
(Union) is grouped by items. Less than,
The description will be made with reference to Tables 1, 2, 3, and 4. Table 1 includes items 1, 2, 3, 4, 5, and others (not shown) (FIG. 5A), and Table 2 Contains items 1, 2, 3, 4, and 5
(FIG. 5 (B)), and Table 3 shows items 1, 2 and 3
(FIG. 5 (C)), and Table 4, items 4, 2 and 5
(FIG. 5D).

【0040】(1)最適化前の問い合わせ1 SELECT 項目1、項目2、項目3 From 表1 Group By 項目2、項目3 すなわち、問い合わせ1では、表1に含まれる項目であ
る、項目1、項目2および項目3を検索する。そのと
き、項目1が項目2および項目3によりグループ化され
ている。
(1) Inquiry 1 before optimization 1 SELECT Item 1, Item 2, Item 3 From Table 1 Group By Item 2, Item 3 In other words, in Inquiry 1, items 1 and 2 are items included in Table 1. Search for item 2 and item 3. At that time, item 1 is grouped by item 2 and item 3.

【0041】(2)最適化前の問い合わせ2 SELECT 項目4、項目2、項目5 From 表1 Group By 項目2、項目5 すなわち、問い合わせ2では、表1に含まれる項目であ
る、項目4、項目2および項目5を検索する。そのと
き、項目4が項目2および項目5によりグループ化され
ている。
(2) Inquiry 2 before optimization 2 SELECT Item 4, Item 2, Item 5 From Table 1 Group By Item 2, Item 5 In other words, in Query 2, items 4, items included in Table 1 Search for item 2 and item 5. At that time, item 4 is grouped by item 2 and item 5.

【0042】(3)両方の問い合わせに含まれる項目
2、項目3、項目5を取得する問い合わせを生成する。
この問い合わせは、 SELECT 項目1、項目2、項目3、項目4、
項目5 From 表1 Group By 項目2、項目3、項目5 と表される。この問い合わせにより検索された結果が表
2として問い合わせ登録手段12に格納される(図5
(B))。
(3) Generate an inquiry for acquiring items 2, 3, and 5 included in both inquiries.
This query is for SELECT item 1, item 2, item 3, item 4,
Item 5 From Table 1 Group By Item 2, Item 3, Item 5 are represented. The result searched by this inquiry is stored in the inquiry registration unit 12 as Table 2 (see FIG. 5).
(B)).

【0043】(4)最適化後の問い合わせ1´(表2を
利用した問い合わせ1の変形例) SELECT 項目1、項目2、項目3 From 表2 Group By 項目2、項目3 すなわち、問い合わせ1´では、表2に含まれる項目で
ある、項目1、項目2および項目3を検索する。この問
い合わせにより検索された結果が表3として問い合わせ
登録手段12に格納される(図5(C))。
(4) Query 1 'after optimization (a modification of query 1 using Table 2) SELECT Item 1, Item 2, Item 3 From Table 2 Group By Item 2, Item 3, ie, Query 1' , Item 1, item 2 and item 3, which are items included in Table 2. The result searched by this inquiry is stored in the inquiry registration means 12 as Table 3 (FIG. 5C).

【0044】(5)最適化後の問い合わせ2´(表2を
利用した問い合わせ2の変形例) SELECT 項目4、項目2、項目5 From 表2 Group By 項目2、項目5 すなわち、問い合わせ2´では、表2に含まれる項目で
ある、項目4、項目2および項目5を検索する。この問
い合わせにより検索された結果が表4として問い合わせ
登録手段12に格納される(図5(D))。
(5) Query 2 'after optimization (a modification of query 2 using Table 2) SELECT Item 4, Item 2, Item 5 From Table 2 Group By Item 2, Item 5 That is, query 2' , Item 4, item 2, and item 5, which are items included in Table 2. The result searched by this inquiry is stored in the inquiry registration means 12 as Table 4 (FIG. 5 (D)).

【0045】このように、第3の処理例では、複数の表
が共通の項目で結合された表2を生成し、この表2に対
して問い合わせを実行することにより、問い合わせに対
する処理時間の短縮化が図れる。
As described above, in the third processing example, a table 2 in which a plurality of tables are joined by common items is generated, and an inquiry is performed on the table 2, thereby shortening the processing time for the inquiry. Can be achieved.

【0046】[0046]

【発明の効果】この発明のデータベース管理システムに
よれば、複数問い合わせ最適化手段を具え、定期的に実
施される複数の問い合わせの処理および複数の問い合わ
せの実行順序を最適化するので、個々の問い合わせの処
理としては処理時間が多くなる場合があるが、複数の問
い合わせの処理時間の合計を少なくするという効果が得
られる。
According to the database management system of the present invention, a plurality of query optimizing means are provided to optimize the processing of a plurality of queries periodically executed and the execution order of the plurality of queries. In some cases, the processing time increases, but the effect of reducing the total processing time of a plurality of inquiries is obtained.

【図面の簡単な説明】[Brief description of the drawings]

【図1】この実施の形態のデータベース管理システムの
構成を示す図である。
FIG. 1 is a diagram showing a configuration of a database management system according to an embodiment.

【図2】第1の最適化処理の説明に供する図である。FIG. 2 is a diagram provided for explanation of a first optimization process.

【図3】図2に続く、第1の最適化処理の説明に供する
図である。
FIG. 3 is a diagram, following FIG. 2, for explaining a first optimization process;

【図4】第2の最適化処理の説明に供する図である。FIG. 4 is a diagram provided for explanation of a second optimization process.

【図5】第3の最適化処理の説明に供する図である。FIG. 5 is a diagram provided for explanation of a third optimization process.

【図6】従来のデータベース管理システムを示す図であ
る。
FIG. 6 is a diagram showing a conventional database management system.

【符号の説明】[Explanation of symbols]

10:問い合わせ受付手段 12:問い合わせ登録手段 14:複数問い合わせ最適化手段 16:登録問い合わせ起動手段 18:問い合わせ最適化手段 20:問い合わせ実行手段 22:データ蓄積手段 100:問い合わせ受付手段 102:問い合わせ登録手段 104:登録問い合わせ起動手段 106:問い合わせ最適化手段 108:問い合わせ実行手段 110:データ蓄積手段 10: Inquiry receiving means 12: Inquiry registration means 14: Multiple inquiry optimizing means 16: Registration inquiry activating means 18: Inquiry optimizing means 20: Inquiry executing means 22: Data storage means 100: Inquiry receiving means 102: Inquiry registration means 104 : Registration query activation means 106: query optimization means 108: query execution means 110: data storage means

Claims (3)

【特許請求の範囲】[Claims] 【請求項1】 起動された問い合わせを受け付ける問い
合わせ受付手段と、 前記受け付けされた問い合わせを登録する問い合わせ登
録手段と、 前記登録された複数の問い合わせの実行を最適化し、最
適な実行手順を登録する複数問い合わせ最適化手段と、 指定された時刻に前記登録された実行手順に従って、前
記登録された複数の問い合わせを起動する登録問い合わ
せ起動手段と、 前記起動された問い合わせの処理方式を最適化する問い
合わせ最適化手段と、 前記最適化された処理方式に従って、データ蓄積手段に
格納されているデータの検索および更新を行い、前記起
動された問い合わせを処理する問い合わせ実行手段とを
具えることを特徴とするデータベース管理システム。
1. An inquiry receiving means for receiving an activated inquiry; an inquiry registering means for registering the received inquiry; and a plurality of means for optimizing the execution of the plurality of registered inquiries and registering an optimal execution procedure. Query optimizing means, registration query activating means for activating the plurality of registered inquiries in accordance with the registered execution procedure at a specified time, and query optimizing for optimizing a processing method of the activated query. Means for searching and updating data stored in the data storage means according to the optimized processing method, and processing the activated query. system.
【請求項2】 請求項1に記載のデータベース管理シス
テムにおいて、 前記複数問い合わせ最適化手段は、前記複数の問い合わ
せが同じ複数の表に関係するものである場合、これら複
数の表を結合した一時表を生成することを特徴とするデ
ータベース管理システム。
2. The database management system according to claim 1, wherein, when the plurality of queries are related to the same plurality of tables, the plurality of query optimizing means is a temporary table obtained by combining the plurality of tables. A database management system characterized by generating
【請求項3】 請求項1に記載のデータベース管理シス
テムにおいて、 前記複数問い合わせ最適化手段は、前記複数の問い合わ
せの中から同じ項目に関係する問い合わせを見つけ出
し、該項目でグループ化された問い合わせを生成するこ
とを特徴とするデータベース管理システム。
3. The database management system according to claim 1, wherein the multiple query optimizing unit finds a query related to the same item from the plurality of queries and generates a query grouped by the item. A database management system characterized by:
JP10246876A 1998-09-01 1998-09-01 Database management system Withdrawn JP2000076288A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP10246876A JP2000076288A (en) 1998-09-01 1998-09-01 Database management system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP10246876A JP2000076288A (en) 1998-09-01 1998-09-01 Database management system

Publications (1)

Publication Number Publication Date
JP2000076288A true JP2000076288A (en) 2000-03-14

Family

ID=17155061

Family Applications (1)

Application Number Title Priority Date Filing Date
JP10246876A Withdrawn JP2000076288A (en) 1998-09-01 1998-09-01 Database management system

Country Status (1)

Country Link
JP (1) JP2000076288A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001357063A (en) * 2000-04-28 2001-12-26 Internatl Business Mach Corp <Ibm> Execution of database query including filtering
JP2006277642A (en) * 2005-03-30 2006-10-12 Nomura Research Institute Ltd Data transformation system and program
JP2006343798A (en) * 2005-06-07 2006-12-21 Hitachi Ltd Method, device and program for generating materialized view table
US7680784B2 (en) 2007-04-27 2010-03-16 Toru Furuya Query processing system of a database using multi-operation processing utilizing a synthetic relational operation in consideration of improvement in a processing capability of a join operation

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001357063A (en) * 2000-04-28 2001-12-26 Internatl Business Mach Corp <Ibm> Execution of database query including filtering
US6879977B2 (en) 2000-04-28 2005-04-12 International Business Machines Corporation Execution of database queries including filtering
US8825616B2 (en) 2000-04-28 2014-09-02 International Business Machines Corporation Execution of database queries including filtering
JP2006277642A (en) * 2005-03-30 2006-10-12 Nomura Research Institute Ltd Data transformation system and program
JP4603401B2 (en) * 2005-03-30 2010-12-22 株式会社野村総合研究所 Data conversion system and data conversion program
JP2006343798A (en) * 2005-06-07 2006-12-21 Hitachi Ltd Method, device and program for generating materialized view table
US7680784B2 (en) 2007-04-27 2010-03-16 Toru Furuya Query processing system of a database using multi-operation processing utilizing a synthetic relational operation in consideration of improvement in a processing capability of a join operation

Similar Documents

Publication Publication Date Title
Simitsis et al. State-space optimization of ETL workflows
US9886492B2 (en) Self-adjusting database-query optimizer
US6377943B1 (en) Initial ordering of tables for database queries
US7111025B2 (en) Information retrieval system and method using index ANDing for improving performance
US7814042B2 (en) Selecting candidate queries
US7685104B2 (en) Dynamic bitmap processing, identification and reusability
EP1193618A2 (en) Cost based materialized view selection for query optimization
US5903893A (en) Method and apparatus for optimizing a merge-join operation across heterogeneous databases
JPH0683865A (en) Method of database access
JPH09171478A (en) Database management system using access by improved index
JP2003099441A (en) Data retrieving procedure searching method
JPH09319757A (en) Information retrieving system
CN106815258B (en) Data storage method and coordination node
US20100082601A1 (en) Method, database system and computer program for joining temporal database tables
US20230161765A1 (en) System and method for disjunctive joins using a lookup table
CN112732752A (en) Query statement optimization method, device, equipment and storage medium
US7617189B2 (en) Parallel query processing techniques for minus and intersect operators
EP1164508A2 (en) Common spool files for maintaining join indexes
JP2000076288A (en) Database management system
CN110532311B (en) Distributed data export method and system based on queues
US6678701B1 (en) Technique for establishing a point of consistency in a parallel database loading system
CN112069207A (en) Multi-table combined query efficiency improving method
US11615086B2 (en) System and method for disjunctive joins
US6421657B1 (en) Method and system for determining the lowest cost permutation for joining relational database tables
WO2020187021A1 (en) Data model matching method and apparatus

Legal Events

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

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20051101