JPH10283371A - Data base device - Google Patents

Data base device

Info

Publication number
JPH10283371A
JPH10283371A JP9102707A JP10270797A JPH10283371A JP H10283371 A JPH10283371 A JP H10283371A JP 9102707 A JP9102707 A JP 9102707A JP 10270797 A JP10270797 A JP 10270797A JP H10283371 A JPH10283371 A JP H10283371A
Authority
JP
Japan
Prior art keywords
processing
data
data processing
instruction
processing instruction
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
JP9102707A
Other languages
Japanese (ja)
Inventor
Yukio Miyatake
行夫 宮武
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.)
NEC Corp
Original Assignee
NEC 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 NEC Corp filed Critical NEC Corp
Priority to JP9102707A priority Critical patent/JPH10283371A/en
Publication of JPH10283371A publication Critical patent/JPH10283371A/en
Pending legal-status Critical Current

Links

Landscapes

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

Abstract

PROBLEM TO BE SOLVED: To provide a data base device by which even a user unfamiliar with the optimal preparation of the processing instruction of an SQL(structured questioning language) sentence or the like can perform access to a data base without deteriorating large speed deterioration. SOLUTION: The processing content of a processing instruction inputted from an inputting device 1 is analyzed by a decoding device 5, and when the recombination of the processing instruction is impossible, it is outputted to a selecting device 8. When the recombination is impossible, it is inputted to a processing speed estimating device 7 as it is, and the processing speed is estimated, and compared with the estimation of the processing speed of the processing instruction recombined by a recombining device 6. Then, the processing whose processing speed is faster is selected by a selecting device 8, and the processing instruction outputted from the selecting device 8 is executed by a data managing device 4.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、データベース装置
に関し、特に、データベースを備えた情報処理システム
のデータベース・アクセス方式に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a database device, and more particularly to a database access method for an information processing system having a database.

【0002】[0002]

【従来の技術】従来のデータベース装置においては、利
用者が非定型な処理を行う場合、利用者が作成したデー
タベース言語であるSQL(Structured Query La
nguage;構造化問合せ言語、例えばJIS X3005
参照)文をそのまま実行する方式がとられている。この
従来のデータベース装置の構成の一例を図4に示す。図
4を参照して、データベース装置はSQL文等を入力す
る入力装置1と、入力されたSQL文を実行して指定さ
れたデータ操作を行うデータ管理装置4と、を備えて構
成されている。
2. Description of the Related Art In a conventional database device, when a user performs an atypical process, a structured language (SQL), which is a database language created by the user, is used.
nguage; structured query language, for example, JIS X3005
(See) Statement is executed as it is. FIG. 4 shows an example of the configuration of this conventional database device. Referring to FIG. 4, the database device includes an input device 1 for inputting an SQL sentence and the like, and a data management device 4 for executing the input SQL sentence and performing a specified data operation. .

【0003】上記した従来の方式は、利用者がデータベ
ースの構造やデータの格納状況を充分に把握し、問い合
わせを行う場合には、有効な方法であるが、一般の利用
者がこのような知識や技術を持つとは限らず、むしろ一
般の利用者は、データベースの構造、データ格納状況等
について全く理解していない場合が大半である。
The above-mentioned conventional method is an effective method when a user sufficiently grasps the structure of a database and the storage state of data and makes an inquiry, but a general user does not have such knowledge. In general, most users do not have any understanding of the structure of the database, the state of data storage, and the like.

【0004】このような場合、データベースの問い合わ
せを行うために利用者が作成したSQL文は、データ検
索などを効率的に行うために最適化がなされたSQL文
とはならず、通常、専ら利用者が理解しやすいSQL文
として作成される。
In such a case, an SQL statement created by a user for querying a database is not an SQL statement optimized for efficient data retrieval and the like, and is usually exclusively used. It is created as a SQL sentence that is easy for the user to understand.

【0005】このため、例えば、あるデータベースから
一定の条件に合うデータを抽出し、さらに、そのデータ
を利用して、他のデータ処理を行うような場合、最初に
アクセスするデータのデータ量が大きく、このため中間
データベースを作成した方が大幅に処理時間を短縮され
る場合であっても、小規模のデータベースを扱う場合と
同じように、毎回、最初のデータへのアクセスを行い、
そのアクセスの結果、該当したデータを基に、次の処理
を行うといった処理を、何回も繰り返す場合がある。こ
のようなデータ操作は、最初のデータ量が大きくなれば
なるほど、処理時間の増加を引き起こし、他の処理時間
にも大きな影響を与えることになる。
For this reason, for example, in a case where data meeting certain conditions is extracted from a certain database, and the data is used for other data processing, the data amount of the data to be accessed first is large. Therefore, even if the processing time is greatly shortened by creating an intermediate database, the same access to the first database is performed every time, just as with a small database.
As a result of the access, a process of performing the next process based on the corresponding data may be repeated many times. Such data manipulation causes an increase in the processing time as the initial data amount increases, and has a great influence on other processing times.

【0006】すなわち、データベースが保有しているデ
ータ量や記憶状態を無視した処理がシステム全体の処理
能力を大幅に低減させている。
That is, processing that ignores the amount of data and the storage state held in the database greatly reduces the processing capacity of the entire system.

【0007】なお、例えば特開平6−231181号公
報には、分散データベースシステムにおける他サイトに
またがる副問合せの実行を一つのSQL文で可能とする
分散データベース制御方式が提案されている。しかしな
がら、例えば、表等のサイズに依存して処理を最適化す
る手段は開示されてはいない。
[0007] For example, Japanese Patent Laid-Open Publication No. Hei 6-231181 proposes a distributed database control method that enables a single SQL statement to execute a subquery across other sites in a distributed database system. However, for example, means for optimizing processing depending on the size of a table or the like is not disclosed.

【0008】また、例えば特開平8−147200号公
報には、データベースシステム中にデータオブジェクト
を検索する際に、検索結果集合(実効表)の大きさをあ
らかじめ獲得することを可能とし、適用業務プログラム
やデータベースシステムにおける余分な処理を低減し効
率的なデータベース制御の実現を図る方法が提案されて
いる。すなわち、SQL文を解析して実行し、実行結果
の表のサイズを記憶することで効率化を図るものである
が、全ての処理に対して実行結果の表のサイズを記憶す
ることは事実上困難であり、有効利用するには、特定の
処理に限定して、用いることになる。
[0008] For example, Japanese Patent Application Laid-Open No. 8-147200 discloses that when a data object is searched for in a database system, the size of a search result set (effective table) can be obtained in advance. And a method for reducing unnecessary processing in a database system and realizing efficient database control have been proposed. That is, the SQL statement is analyzed and executed, and the efficiency is attained by storing the size of the table of the execution result. However, storing the size of the table of the execution result for all processes is practically impossible. It is difficult, and effective use is limited to specific processing.

【0009】[0009]

【発明が解決しようとする課題】上記したように、デー
タベース装置において、利用者が作成したSQL文をそ
のまま実行するという従来の方式では、データベースの
アクセスを最適化することは困難である、という問題点
を有している。
As described above, it is difficult to optimize access to a database by a conventional method in which a SQL statement created by a user is directly executed in a database device. Have a point.

【0010】その理由は、最適化されたSQL文を作成
することは、一般ユーザにとって困難であることによ
る。
[0010] The reason is that it is difficult for an ordinary user to create an optimized SQL sentence.

【0011】すなわち、一般のユーザが、データベース
の状況を、正確に把握し、且つ、この状況を反映したS
QL文を最適化して作成することは、通常は難しい。ま
た、一般のユーザは、自分が希望するSQL文を作成す
ることは可能であっても、データの配置や検索順序に関
する情報まで、常に、認識すること自体が困難である、
というのが実状であるためである。
That is, a general user can accurately grasp the status of the database and reflect the status of the database.
It is usually difficult to optimize and create a QL sentence. In addition, although it is possible for a general user to create a desired SQL sentence, it is difficult to always recognize information on data arrangement and search order.
That is because it is the actual situation.

【0012】したがって、本発明は、上記した問題点に
鑑みてなされたものであって、その目的は、データ操作
言語であるSQL文等の処理命令を最適に作成すること
に不慣れな利用者に対しても、大幅な速度低下を招くこ
となく、効率よくデータベースにアクセスすることを可
能としたデータベース装置を提供することにある。
Accordingly, the present invention has been made in view of the above-described problems, and has as its object to provide a user who is not accustomed to optimally creating a processing instruction such as a SQL statement as a data manipulation language. On the other hand, an object of the present invention is to provide a database device that can efficiently access a database without causing a significant reduction in speed.

【0013】[0013]

【課題を解決するための手段】前記目的を達成するた
め、本発明のデータベース装置は、利用者の作成したデ
ータ処理命令の投入を受け付けるデータ処理命令入力手
段と、入力されたデータ処理命令を分析し、処理方法を
分割できるか否かを判断し、分割可能なら処理を分割し
たデータ処理命令を作成する解析手段と、データ処理命
令を処理しデータベースを管理するデータ管理装置と、
処理対象となる個々のデータ量や処理速度の情報、及
び、前記データ管理装置における処理方法を記憶してい
る記憶手段と、を備え、前記解析手段が、入力されたデ
ータ処理命令をそのまま実行する場合と、修正されたデ
ータ処理命令で実行する場合とのそれぞれの処理時間の
見積もりを比較し、より高速に処理できる方のデータ処
理命令を選択し、選択されたデータ処理命令を前記デー
タ管理装置で実行する、ことを特徴とする。
In order to achieve the above object, a database apparatus of the present invention comprises a data processing command inputting means for receiving a data processing command created by a user, and analyzing the input data processing command. Analyzing means for determining whether or not the processing method can be divided, and generating a data processing instruction obtained by dividing the processing if the processing method can be divided;
Storage means for storing information on the data amount and processing speed of each data to be processed, and a processing method in the data management device, wherein the analysis means executes the input data processing instruction as it is And a case where the processing is executed with the corrected data processing instruction, the respective processing time estimates are compared, and a data processing instruction that can be processed at higher speed is selected, and the selected data processing instruction is transferred to the data management device. , And is executed.

【0014】また、本発明において、データ処理命令と
して、好ましくはSQL言語を用いる。
In the present invention, SQL language is preferably used as the data processing instruction.

【0015】また、本発明においては、前記解析手段
が、入力されたSQL文を複数の処理を行うSQL文に
分解できるか否かを判断し、分解可能な場合には、元の
SQL文による処理時間と、分解された一連のSQL文
による処理時間を、前記記憶手段の情報を基に算出し、
より高速に処理可能なSQL文のみを選択する、ことを
特徴とする。
Further, in the present invention, the analysis means judges whether or not the input SQL sentence can be decomposed into an SQL sentence for performing a plurality of processes. A processing time and a processing time by a series of decomposed SQL statements are calculated based on the information in the storage unit,
Only SQL statements that can be processed at higher speed are selected.

【0016】[0016]

【発明の実施の形態】本発明の実施の形態について以下
に説明する。本発明は、その好ましい実施の形態におい
て、利用者が投入するSQL文等のデータ処理命令(単
に「処理命令」ともいう)の処理時間を見積もり、処理
結果に変化が生じない範囲内で、SQL文等の処理命令
を変形するか否かを自動で判断し、より高速化が可能な
処理方法を採用することで、処理速度の向上を図り、S
QL文等の処理命令を最適に作成することに不慣れな利
用者に対しても、大幅な速度低下を招くことなくデータ
ベースにアクセス可能としたものである。
Embodiments of the present invention will be described below. According to a preferred embodiment of the present invention, the processing time of a data processing command (also referred to simply as a “processing command”) such as an SQL statement input by a user is estimated, and the SQL is processed within a range where the processing result does not change. It is automatically determined whether or not to modify the processing instruction such as a sentence, and by adopting a processing method capable of higher speed, the processing speed is improved, and
Even if the user is unfamiliar with creating processing instructions such as QL sentences optimally, the database can be accessed without causing a significant speed reduction.

【0017】より詳細には、本発明のデータベース装置
は、その好ましい実施の形態において、利用者の作成し
たデータ処理命令の投入を受け付けるデータ処理命令入
力手段(図1の1)と、入力されたデータ処理命令を分
析し、処理方法を分割できるか否かを判断し、分割可能
と判断された場合には、入力されたデータ処理命令を分
割したデータ処理命令を作成する解析手段(図1の2)
と、データ処理命令を処理しデータベースを管理するデ
ータ管理装置と、処理対象となる個々のデータ量や処理
速度の情報、及び、前記データ管理装置における処理方
法を記憶している記憶手段(図1の3)と、を備え、解
析手段(図1の2)が、入力されたデータ処理命令をそ
のまま実行する場合と、修正されたデータ処理命令で実
行する場合とのそれぞれの処理時間の見積もりを比較検
討し、より高速に処理できる方のデータ処理命令を選択
し、選択されたデータ処理命令をデータ管理装置(図1
の4)で実行する。
More specifically, in a preferred embodiment of the database device of the present invention, the data processing command input means (1 in FIG. 1) for receiving input of a data processing command created by a user is inputted. The data processing instruction is analyzed, it is determined whether or not the processing method can be divided. If it is determined that the processing method can be divided, an analyzing means (FIG. 1) for creating a data processing instruction obtained by dividing the input data processing instruction. 2)
A data management device that processes a data processing instruction and manages a database; storage means for storing information on individual data amounts and processing speeds to be processed; and a processing method in the data management device (FIG. 1). 3), and the analysis means (2 in FIG. 1) estimates the respective processing times when executing the input data processing instruction as it is and when executing the corrected data processing instruction. By comparing and examining, a data processing instruction that can be processed at a higher speed is selected, and the selected data processing instruction is transferred to a data management device (FIG. 1).
Execute in 4).

【0018】本発明の実施の形態においては、解析手段
や記憶手段の情報を基に、ユーザが入力した処理命令を
最適化し、より高速で処理できると考えられる処理命令
をデータ管理装置に渡すようにしているため、ユーザの
知識レベルや習熟度が低い場合には、修正された処理命
令が渡され、そうでない場合には、元の処理命令を渡
し、データ管理装置で処理する。解析手段の入力と出力
が同じ処理命令である場合、データ管理装置には、ユー
ザから与えられたままの処理命令であるか、解析手段で
修正された処理命令であるかは、区別する必要はない。
In the embodiment of the present invention, a processing instruction input by a user is optimized based on information in an analyzing means and a storing means, and a processing instruction considered to be able to be processed at a higher speed is passed to a data management device. Therefore, if the user's knowledge level or proficiency is low, a corrected processing instruction is passed; otherwise, the original processing instruction is passed and processed by the data management device. If the input and output of the analysis means are the same processing instruction, the data management device does not need to distinguish between the processing instruction as given by the user and the processing instruction corrected by the analysis means. Absent.

【0019】また、本発明の実施の形態において、記憶
手段には、好ましくは、データ管理装置で管理している
データのサイズ、物理的な配置等の管理上の基本的な情
報と、物理的な配置に対応した処理時間、例えば、単位
当たりのデータアクセス時間や単位当たりのデータ転送
時間等の情報が記憶されており、さらに、これらと併せ
て、各種のデータをアクセスする場合の処理時間や、デ
ータ管理装置における処理方法に関する情報も記憶され
ている。
In the embodiment of the present invention, the storage means preferably stores basic management information such as the size and physical arrangement of data managed by the data management apparatus, and physical Processing time corresponding to various arrangements, for example, information such as data access time per unit and data transfer time per unit are stored, and in addition to these, the processing time when accessing various data and , Information on the processing method in the data management device is also stored.

【0020】記憶手段に保持されているこれらの情報を
基に、解析手段は、処理命令が明らかに無駄な働きをす
ると判断した場合には、可能な処理命令の組み替え等を
自動で行って、各々を評価し、最適であると考えられる
処理命令を選択する。
Based on these pieces of information held in the storage means, when the analysis means determines that the processing instruction clearly has a useless function, the analysis means automatically performs a possible rearrangement of the processing instruction and the like. Evaluate each and select the processing instruction that is considered optimal.

【0021】また、本発明の実施の形態においては、処
理命令としてSQL言語を用いるデータベース装置に対
して、入力されたSQL文を分解、及び/又は、組み替
えを行うことで、同等の処理を行うSQL文を構成し、
処理時間の見積もりを行う。すなわち、入力されたSQ
L文を複数の処理を行うSQL文に分解できるか否かを
判断し、分解可能な場合には、元のSQL文による処理
時間と、分解された一連のSQL文による処理時間の見
積もりを算出し、より高速に処理可能なSQL文のみを
選択するものである。
Further, in the embodiment of the present invention, the same processing is performed by decomposing and / or rearranging the input SQL sentence with respect to the database device using the SQL language as the processing instruction. Construct an SQL statement,
Estimate the processing time. That is, the input SQ
Judge whether the L sentence can be decomposed into an SQL sentence that performs a plurality of processes, and if it can be decomposed, calculate the processing time for the original SQL sentence and the processing time for a series of decomposed SQL sentences Then, only SQL statements that can be processed at higher speed are selected.

【0022】そして、本発明の実施の形態においては、
(a)利用者の作成したデータ処理命令を入力装置から
受け付け、該入力されたデータ処理命令を分析し、デー
タ処理命令が分解もしくは組み替えできるか否かを判断
する処理手順、(b)分解もしくは組み替えが可能なら
ば分解もしくは組み替えることにより修正したデータ処
理命令を作成する処理手順、(c)処理対象となる個々
のデータ量や処理速度の情報、及び、データ処理命令を
実行するデータ管理装置における処理方法を記憶してい
る記憶部の情報を参照して、入力されたデータ処理命令
をそのまま実行する場合と、修正されたデータ処理命令
で実行する場合とのそれぞれの処理時間の見積もりを算
出する処理手順、及び、(d)これらの見積もりのうち
より高速に処理できる方のデータ処理命令を選択し、選
択されたデータ処理命令を前記データ管理装置に供給す
る処理手順、の各処理手順(a)〜(d)はプログラム
モジュール等で実現され、これらのプログラムを情報処
理装置にロードして実行させることにより、入力した処
理命令に対して最適なデータ処理命令をデータ管理装置
に供給してデータ・アクセスの効率の向上を図ることが
できる。
In the embodiment of the present invention,
(A) a processing procedure for receiving a data processing command created by a user from an input device, analyzing the input data processing command, and determining whether the data processing command can be disassembled or rearranged; A processing procedure for creating a data processing instruction modified by disassembly or rearrangement if possible, (c) information on the amount of data and processing speed to be processed, and a data management apparatus for executing the data processing instruction By referring to information in the storage unit storing the processing method, an estimate of each processing time is calculated for the case where the input data processing instruction is executed as it is and for the case where the input data processing instruction is executed using the corrected data processing instruction. Processing procedure, and (d) selecting a data processing instruction that can be processed at a higher speed among these estimates, and selecting the selected data processing instruction. Each of the processing procedures (a) to (d) of the processing procedure for supplying an instruction to the data management apparatus is realized by a program module or the like. An optimum data processing instruction for the instruction is supplied to the data management device, so that the efficiency of data access can be improved.

【0023】[0023]

【実施例】本発明の実施の形態について更に詳細に説明
するために、本発明の実施例について図面を参照して以
下に説明する。図1は、本発明の一実施例の構成を示す
図である。図1を参照して、1は入力装置、2は解析装
置、3は記憶装置、4はデータ管理装置を示している。
解析装置2は入力装置1、記憶装置3、及びデータ管理
装置4と接続されており、記憶装置3は解析装置2とデ
ータ管理装置4と接続される。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS In order to explain the embodiments of the present invention in more detail, embodiments of the present invention will be described below with reference to the drawings. FIG. 1 is a diagram showing the configuration of one embodiment of the present invention. Referring to FIG. 1, reference numeral 1 denotes an input device, 2 denotes an analysis device, 3 denotes a storage device, and 4 denotes a data management device.
The analysis device 2 is connected to the input device 1, the storage device 3, and the data management device 4, and the storage device 3 is connected to the analysis device 2 and the data management device 4.

【0024】記憶装置3は、データ管理装置4からデー
タベースの状況を示すデータ等を受け取って記憶管理
し、解析装置2からの要請に応じて、関連するデータを
出力する。
The storage device 3 receives data and the like indicating the status of the database from the data management device 4, stores and manages the data, and outputs related data in response to a request from the analysis device 2.

【0025】解析装置2は、入力装置1に入力された処
理命令を受け取り、処理対象となるデータ、例えばテー
ブル等を見つけ、記憶装置3から関連する情報を受け取
る。同時に、解析装置2は、入力された処理命令を解析
し、処理を複数の手順に分解可能な場合には、これらを
組み合わせ、処理結果が変わらない範囲内で、組み替え
処理等を行う。
The analysis device 2 receives a processing instruction input to the input device 1, finds data to be processed, for example, a table, and receives related information from the storage device 3. At the same time, the analysis device 2 analyzes the input processing instruction, and when the processing can be decomposed into a plurality of procedures, combines them and performs a rearrangement processing or the like within a range where the processing result does not change.

【0026】そして、解析装置2は、元の処理と、種々
に変形された処理の各々に対して、処理手順に従って処
理時間を見積もる。
Then, the analyzing apparatus 2 estimates the processing time for each of the original processing and the variously modified processing in accordance with the processing procedure.

【0027】ここで、解析装置2に入力される処理命令
は、入力装置1と同一である必要はなく、中間言語的な
ものでもよく、必ずしも同じものである必要はない。ま
た、解析装置2においても、同様にして、入力される処
理命令と出力される処理命令も、例えば、解析装置2の
入力がSQL言語で、解析装置2からの出力がデータ管
理装置4で用いられる中間言語的なものでもよく、必ず
しも記述や言語レベルが一致する必要はない。
Here, the processing command input to the analysis device 2 does not need to be the same as that of the input device 1, but may be an intermediate language, and does not necessarily have to be the same. Similarly, in the analysis device 2, the input processing command and the output processing command are also used, for example, when the input of the analysis device 2 is in the SQL language and the output from the analysis device 2 is used in the data management device 4. However, the description and language level do not necessarily have to match.

【0028】記憶装置3には、データのサイズや分布状
況等が記憶されており、ある一定間隔でアップデート
(更新)される。アップデートされる間隔は、例えば、
一定時間間隔に確認する処理を行ったり、もしくは、デ
ータベースのアクセスされる度に更新する方法を採って
もよい。あるいは、ある時間間隔で、実際に、データに
アクセスし、処理完了時間を測定した結果を記憶する、
ことも可能である。
The storage device 3 stores data size, distribution status, and the like, and is updated at certain intervals. The update interval is, for example,
It is also possible to adopt a method of performing a process of confirming at a fixed time interval or updating each time the database is accessed. Alternatively, at a certain time interval, actually access the data and store the result of measuring the processing completion time,
It is also possible.

【0029】図2に、本実施例における解析装置2の構
成の一例を示す。図2を参照して、5は解読装置、6は
組み替え装置、7は処理速度見積もり装置、8は選択装
置である。
FIG. 2 shows an example of the configuration of the analyzer 2 in this embodiment. Referring to FIG. 2, 5 is a decoding device, 6 is a rearrangement device, 7 is a processing speed estimation device, and 8 is a selection device.

【0030】図2を参照して、入力装置1から入力され
た処理命令について解読装置5において、その処理内容
を分析し、処理命令の組み替えが不可能であると判別し
た場合には、そのまま選択装置8へ出力される。一方、
組み替えが可能ならば、入力された元の処理命令をその
ままの形で処理速度見積もり装置7へ入力して処理速度
を見積もる。また元の処理命令を組み替え装置6で組み
替えて出力される修正後の処理命令を処理速度見積もり
装置7へ入力して修正後の処理命令の処理速度の見積も
りを行い、これらの見積もりのうち選択装置8で速い方
の処理を選択する。
Referring to FIG. 2, the decoding device 5 analyzes the processing contents of the processing command input from the input device 1 and, when it is determined that the rearrangement of the processing command is not possible, selects the processing command as it is. Output to the device 8. on the other hand,
If the rearrangement is possible, the input original processing instruction is input as it is to the processing speed estimating device 7 to estimate the processing speed. The modified processing instruction output by rearranging the original processing instruction in the rearrangement device 6 is input to the processing speed estimating device 7 to estimate the processing speed of the corrected processing instruction, and the selecting device is selected from among these estimates. 8 selects the faster process.

【0031】ここで、各装置の入力や出力は任意の形態
をとることができ、且つ、各装置もその形態は特に限定
されない。例えば、記憶装置3とデータ管理装置4以外
の全ての装置をクライアント側のフロントエンド装置で
行うことも可能である。この場合、クライアントへの入
力も出力も同じSQL言語等の処理命令とすることがで
きるため、図4に示した従来のデータベース装置の入力
装置を機能的に拡張したことになる。勿論、記憶装置3
も取り込むことも可能である。しかし、その場合には、
データ管理装置4と通信し、記憶されたデータを定期的
に更新する必要がある。
The input and output of each device can take any form, and the form of each device is not particularly limited. For example, all devices other than the storage device 3 and the data management device 4 can be performed by the client-side front-end device. In this case, since the input and output to the client can be the same processing instruction in the SQL language or the like, the input device of the conventional database device shown in FIG. 4 is functionally expanded. Of course, the storage device 3
It is also possible to take in. But in that case,
It is necessary to communicate with the data management device 4 and periodically update the stored data.

【0032】逆に、入力装置1以外を、例えば、サーバ
等のデータベース管理装置上の機能とすることも可能で
ある。これは、従来の組み込み型SQL言語で、C言語
等の他の言語に変換して最適化する場合と異なる点であ
る。
Conversely, a function other than the input device 1 may be a function on a database management device such as a server. This is different from the case where a conventional embedded SQL language is converted into another language such as C language and optimized.

【0033】図3に、SQL文の組み替えの一例を示
す。図3(A)は、入力されたSQL文の一例を示し、
図3(B)は、図3(A)のSQL文を組み替えた後の
SQL文の例を示す図である。
FIG. 3 shows an example of the rearrangement of the SQL sentence. FIG. 3A shows an example of the input SQL sentence.
FIG. 3B is a diagram showing an example of the SQL sentence after rearranging the SQL sentence of FIG.

【0034】図3(A)のSQL文による問い合わせ
(SELECT文)では、テーブルαとテーブルβが存
在し、項Aを抽出するが、その際、テーブルβの項Bを
抽出する処理が必要になる。従来の処理では、この処理
が必要になる度、テーブルβのアクセスが発生する場合
があった。このため、テーブルβが小さい場合は問題は
少ないが、大規模化するにつれて処理時間が急速に増加
する。これを回避するためには、予めテーブルβの規模
や処理時間の見積もりができることが必要となる。
In the query (SELECT sentence) based on the SQL sentence shown in FIG. 3A, the table α and the table β exist, and the term A is extracted. At this time, the process of extracting the term B of the table β is necessary. Become. In the conventional processing, the table β may be accessed each time this processing is required. Therefore, the problem is small when the table β is small, but the processing time rapidly increases as the table becomes larger. In order to avoid this, it is necessary to be able to estimate the size of the table β and the processing time in advance.

【0035】本実施例においては、図3(A)のSQL
文に対して、組み替え装置6にて図3(B)のSQL文
として示したように、中間状態を保持するように組み替
えることで、テーブルβへのアクセスを減少させること
が可能になり、高速化が図れることになる。なお、図3
(B)において、ビュー表を定義するビュー定義命令
は、「CREATE VIEW <表名> (ビュー列
リスト) AS <問い合わせ式>…」の構文をとる。
また、SELECT文は、「SELECT <列名のリ
スト> FROM <表名のリスト> WHERE <
検索条件>…」の構文をとる。
In this embodiment, the SQL shown in FIG.
As shown in the SQL statement of FIG. 3B by the reordering device 6, the statement is rearranged so as to maintain the intermediate state, thereby making it possible to reduce the access to the table β and to increase the speed. Can be achieved. Note that FIG.
In (B), the view definition instruction for defining a view table has a syntax of “CREATE VIEW <table name> (view column list) AS <query expression> ...”.
The SELECT statement is composed of “SELECT <list of column names> FROM <list of table names> WHERE <
Search condition> ... ".

【0036】記憶装置3で保持しているデータは、上記
の例では、テーブルα及びテーブルβのデータ量及びデ
ータアクセス時間等である。
In the above example, the data held in the storage device 3 is the data amount and the data access time of the tables α and β.

【0037】すなわち、ユーザがSQL文を作成した結
果、テーブルβが大規模であるにもかかわらず、図3
(A)で示すSQL文のようなアクセスを実施しようと
した場合、本実施例では、処理速度見積もり装置7で、
図3(A)に示したSQL文と、図3(B)に示した組
み替え後のSQL文との処理速度の見積もりを比較す
る。例えば、図3(A)のSQL文のように、SELE
CT文のネストがある場合には、そのSELECT文単
位で中間状態のビューを作成するように、SQL文の組
み替えを組み替え装置6では検討する。
That is, as a result of the user creating the SQL statement, the table β is large despite the fact that the table β is large.
When an access like an SQL statement shown in (A) is to be performed, in the present embodiment, the processing speed estimation device 7
The estimation of the processing speed of the SQL sentence shown in FIG. 3A and the SQL sentence after the rearrangement shown in FIG. 3B are compared. For example, as shown in the SQL statement of FIG.
When there is a nest of CT statements, the reordering device 6 examines the reordering of the SQL statements so that an intermediate view is created for each SELECT statement.

【0038】ここで問題としているのは、データ量が多
く、データアクセス時間が無視できないレベルでのSQ
L文の組み替えであるため、ディスクアクセス速度とデ
ータ量等から、処理時間の見積もりは比較的容易に行う
ことができる。
The problem here is that the SQ at a level where the data amount is large and the data access time cannot be ignored.
Since the L sentence is rearranged, the processing time can be estimated relatively easily from the disk access speed and the data amount.

【0039】また、この装置の処理に余裕がある時間帯
で実際に処理し、処理時間の実測値等を保持する方法を
採ることも可能である。
It is also possible to adopt a method in which the processing is actually performed in a time zone where there is room for the processing by this apparatus, and the measured value of the processing time is held.

【0040】このように、本実施例においては、データ
ベースで管理しているデータそのものではなく、データ
量等の情報を別途管理する記憶装置3を設けることで、
高速化が可能な処理を同等なSQL文に変更して処理す
ることが可能になる。
As described above, in this embodiment, the storage device 3 that separately manages information such as the data amount, not the data itself managed by the database, is provided.
Processing that can be speeded up can be changed to equivalent SQL statements for processing.

【0041】現状では、テーブルの件数をカウントする
処理も、最新データを反映するために、毎回データアク
セスが必要になっているが、本実施例において、データ
処理量から処理時間を見積もる場合には、それ程の精度
は要求されず、数パーセントの誤差を含んでも影響は少
ない。
At present, the process of counting the number of records in the table also requires data access every time to reflect the latest data. However, in this embodiment, when estimating the processing time from the data processing amount, However, the accuracy is not so required, and even if an error of several percent is included, the influence is small.

【0042】このように、上記実施例によれば、入力し
た処理命令から高速化の余地を検出して最適化を図り、
処理時間の短縮を可能としたものである。
As described above, according to the above-described embodiment, optimization is performed by detecting room for speeding up from the input processing instruction.
The processing time can be shortened.

【0043】[0043]

【発明の効果】以上詳細に説明したように、本発明によ
れば、SQL言語やデータベースの状況を熟知していな
いユーザの利用に対しても、処理の最適化を行い、処理
の効率化を図ることを可能とする、という効果を奏す
る。
As described above in detail, according to the present invention, the processing is optimized even for the use of a user who is not familiar with the SQL language and the situation of the database, and the processing efficiency is improved. It is possible to achieve the effect.

【0044】その理由は、本発明においては、利用者が
投入するSQL文等の処理命令の処理時間を見積もり、
処理結果に変化が生じない範囲内で、SQL文等の処理
命令を変形するか否かを自動で判断し、より高速化が可
能な処理方法を採用することで、処理速度の向上を図
り、その結果、SQL文等の処理命令を最適に作成する
ことに不慣れな利用者に対しても、大幅な速度低下を招
くことなくデータベースにアクセス可能としたことによ
る。
The reason is that, in the present invention, the processing time of a processing instruction such as an SQL statement input by a user is estimated,
Within the range where the processing result does not change, it is automatically determined whether to modify the processing instruction such as an SQL statement or the like, and by adopting a processing method capable of increasing the processing speed, the processing speed is improved, As a result, even a user who is unfamiliar with creating processing instructions such as SQL statements optimally can access the database without causing a significant speed reduction.

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

【図1】本発明の一実施例の構成を示すブロック図であ
る。
FIG. 1 is a block diagram showing the configuration of an embodiment of the present invention.

【図2】本発明の一実施例の解析装置の構成を示すブロ
ック図である。
FIG. 2 is a block diagram illustrating a configuration of an analyzer according to one embodiment of the present invention.

【図3】本発明の一実施例を説明するための図であり、
ネストされたSQL文の組み替えの例を示す図である。
FIG. 3 is a diagram for explaining one embodiment of the present invention;
FIG. 14 is a diagram illustrating an example of rearrangement of nested SQL statements.

【図4】従来のデータベース装置の構成の一例を示すブ
ロック図である。
FIG. 4 is a block diagram illustrating an example of a configuration of a conventional database device.

【符号の説明】 1 入力装置 2 解析装置 3 記憶装置 4 データ管理装置 5 解読装置 6 組み替え装置 7 処理速度見積もり装置 8 選択装置[Explanation of Signs] 1 Input device 2 Analysis device 3 Storage device 4 Data management device 5 Decoding device 6 Rearrangement device 7 Processing speed estimation device 8 Selection device

Claims (6)

【特許請求の範囲】[Claims] 【請求項1】利用者の作成したデータ処理命令の投入を
受け付けるデータ処理命令入力手段と、 入力されたデータ処理命令を分析し、処理方法を分割で
きるか否かを判断し、分割可能なら処理を分割したデー
タ処理命令を作成する解析手段と、 データ処理命令を処理しデータベースを管理するデータ
管理装置と、 処理対象となる個々のデータ量や処理速度の情報、及
び、前記データ管理装置における処理方法を記憶してい
る記憶手段と、 を備え、 前記解析手段が、入力されたデータ処理命令をそのまま
実行する場合と、修正されたデータ処理命令で実行する
場合とのそれぞれの処理時間の見積もりを比較し、より
高速に処理できる方のデータ処理命令を選択し、選択さ
れたデータ処理命令を前記データ管理装置で実行する、 ことを特徴とするデータベース装置。
1. A data processing command input means for accepting input of a data processing command created by a user, analyzing the input data processing command, determining whether or not the processing method can be divided, and processing if the processing method can be divided. Analysis means for creating a data processing instruction obtained by dividing a data processing instruction, a data management device for processing the data processing instruction and managing a database, information on the data amount and processing speed of each processing target, and processing in the data management device Storage means for storing a method, wherein the analysis means estimates the respective processing times for executing the input data processing instruction as it is and executing the corrected data processing instruction. Comparing, selecting a data processing instruction that can be processed at a higher speed, and executing the selected data processing instruction in the data management device. That the database apparatus.
【請求項2】前記データ処理命令としてSQL言語を用
いる、ことを特徴とする請求項1記載のデータベース装
置。
2. The database apparatus according to claim 1, wherein an SQL language is used as said data processing instruction.
【請求項3】前記解析手段が、入力されたSQL文を複
数の処理を行うSQL文に分解できるか否かを判断し、
分解可能な場合には、元のSQL文による処理時間と、
分解された一連のSQL文による処理時間を、前記記憶
手段の情報を基に算出し、より高速に処理可能なSQL
文のみを選択する、ことを特徴とする請求項2記載のデ
ータベース装置。
3. The method according to claim 1, wherein the analyzing unit determines whether or not the input SQL sentence can be decomposed into an SQL sentence for performing a plurality of processes.
If it can be decomposed, the processing time by the original SQL statement and
A processing time based on a series of decomposed SQL statements is calculated based on the information in the storage means, and a SQL that can be processed at a higher speed.
3. The database device according to claim 2, wherein only a sentence is selected.
【請求項4】入力されたデータ処理命令を解読手段にて
その処理内容を分析して、該データ処理命令の組み替え
が可能であるか否かを判別し、組み替え不可能の場合に
は、そのまま出力してデータ管理装置で実行し、 一方、組み替えが可能ならば、前記入力されたデータ処
理命令について、もとのままの形で、処理速度見積もり
手段にて処理速度の見積もりを算出すると共に、前記入
力されたデータ処理命令を組み替え手段で組み替えたデ
ータ処理命令について、前記処理速度見積もり手段にて
処理速度の見積もりを算出し、これらの処理速度の見積
もりのうち最も速い処理速度のデータ処理命令を選択し
て、前記データ管理装置で実行する、ことを特徴とする
データベース装置。
4. An input data processing instruction is analyzed by a decoding means to determine whether or not the data processing instruction can be rearranged. Output and execute by the data management device.On the other hand, if the rearrangement is possible, for the input data processing instruction, the processing speed estimation means calculates the processing speed estimate in the original form, For the data processing instruction obtained by rearranging the input data processing instruction by the rearranging unit, the processing speed estimation unit calculates an estimation of the processing speed, and among these processing speed estimations, the data processing instruction having the fastest processing speed is calculated. A database device, which is selected and executed by the data management device.
【請求項5】前記処理速度見積もり手段が、前記データ
管理装置で扱うデータのサイズ、物理的な配置等の管理
上の情報と、物理的な配置に対応した処理時間、各種の
データをアクセスする場合の処理時間、前記データ管理
装置における処理方法を記憶した記憶手段を参照して、
データ処理命令の処理時間の見積もりを行う、ことを特
徴とする請求項4記載のデータベース装置。
5. The processing speed estimating means accesses management information such as a size of data handled by the data management device, a physical arrangement, a processing time corresponding to the physical arrangement, and various types of data. Processing time in the case, with reference to the storage means storing the processing method in the data management device,
5. The database apparatus according to claim 4, wherein the processing time of the data processing instruction is estimated.
【請求項6】(a)利用者の作成したデータ処理命令を
入力装置から受け付け、該入力されたデータ処理命令を
分析し、該データ処理命令を分解もしくは組み替えでき
るか否かを判断する処理、 (b)分解もしくは組み替え可能ならば入力された前記
データ処理命令を分解もしくは組み替えることにより修
正を施したデータ処理命令を作成する処理、 (c)処理対象となる個々のデータ量や処理速度の情
報、及び、データ処理命令を実行するデータ管理装置に
おける処理方法を記憶している記憶部を参照して、入力
されたデータ処理命令をそのまま実行する場合と、修正
されたデータ処理命令で実行する場合と、のそれぞれの
処理時間の見積もりを、算出する処理、及び、 (d)これらの見積もりのうちより高速に処理できる方
のデータ処理命令を選択し、選択されたデータ処理命令
を前記データ管理装置に供給する処理、 の上記(a)〜(d)の各処理を情報処理装置で実行さ
せるためのプログラムを記録した記録媒体。
6. A process for receiving a data processing command created by a user from an input device, analyzing the input data processing command, and determining whether the data processing command can be disassembled or rearranged. (B) processing for creating a corrected data processing instruction by disassembling or rearranging the input data processing instruction if it can be disassembled or rearranged; (c) information on the amount of individual data to be processed and the processing speed And a case where the input data processing instruction is executed as it is with reference to the storage unit storing the processing method in the data management device that executes the data processing instruction, and when the corrected data processing instruction is executed And (d) the data processing of the faster one of these estimates. Select instructions, processes and supplies the data processing instruction that is selected in the data management apparatus, the (a) ~ a recording medium recording a program for executing each processing in the information processing apparatus of (d).
JP9102707A 1997-04-04 1997-04-04 Data base device Pending JPH10283371A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP9102707A JPH10283371A (en) 1997-04-04 1997-04-04 Data base device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP9102707A JPH10283371A (en) 1997-04-04 1997-04-04 Data base device

Publications (1)

Publication Number Publication Date
JPH10283371A true JPH10283371A (en) 1998-10-23

Family

ID=14334750

Family Applications (1)

Application Number Title Priority Date Filing Date
JP9102707A Pending JPH10283371A (en) 1997-04-04 1997-04-04 Data base device

Country Status (1)

Country Link
JP (1) JPH10283371A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001052027A (en) * 1999-08-17 2001-02-23 Nippon Telegr & Teleph Corp <Ntt> Method for parallel processing retrieval requests and program recording medium to be used for providing the same
JP2008525897A (en) * 2004-12-23 2008-07-17 レイセオン・カンパニー System and method for adaptive query identification and acceleration
CN106844380A (en) * 2015-12-04 2017-06-13 阿里巴巴集团控股有限公司 A kind of database operation method, information processing method and related device

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH05334368A (en) * 1992-06-02 1993-12-17 Hitachi Ltd Data base inquiry processing method
JPH0934760A (en) * 1995-07-24 1997-02-07 Omron Corp Device and method for optimizing retrieving instruction

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH05334368A (en) * 1992-06-02 1993-12-17 Hitachi Ltd Data base inquiry processing method
JPH0934760A (en) * 1995-07-24 1997-02-07 Omron Corp Device and method for optimizing retrieving instruction

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001052027A (en) * 1999-08-17 2001-02-23 Nippon Telegr & Teleph Corp <Ntt> Method for parallel processing retrieval requests and program recording medium to be used for providing the same
JP2008525897A (en) * 2004-12-23 2008-07-17 レイセオン・カンパニー System and method for adaptive query identification and acceleration
CN106844380A (en) * 2015-12-04 2017-06-13 阿里巴巴集团控股有限公司 A kind of database operation method, information processing method and related device

Similar Documents

Publication Publication Date Title
JP4659877B2 (en) Stream data processing control method, stream data processing apparatus, and stream data processing control program
US6834279B1 (en) Method and system for inclusion hash joins and exclusion hash joins in relational databases
US20040236722A1 (en) System and method for cardinality estimation based on query execution feedback
CN107783985B (en) Distributed database query method, device and management system
JP2003099441A (en) Data retrieving procedure searching method
JPH0612452A (en) Group information access system
JP2009181546A (en) Coordinator server, data allocation method and program
US8688612B2 (en) Method and device for saving triple for verifying reason and incremental reasoning, and method and device for reason-dependent indexing appropriate for same
US9342545B2 (en) Using a partially built index in a computer database system
JP2010176319A (en) Structured document-retrieving system, device, and method
US6269359B1 (en) Relational data base system and method for rapidly realizing a query to a database
JPH10283371A (en) Data base device
US9177008B1 (en) Positioned updates in a distributed shared-nothing data store
Malhotra et al. An ingenious pattern matching approach to ameliorate web page rank
US7313553B2 (en) Apparatus and method for using values from a frequent values list to bridge additional keys in a database index
JP2003316811A (en) Inquiry optimization processing device in different kind of database integration system, method and program making computer execute the method
Schkolnick et al. Considerations in developing a design tool for a relational DBMS
KR100597829B1 (en) System and method for providing a service of business rule using ontology
JP2005018430A (en) Database managing system and query optimizing method
JPH04245342A (en) Distributed data base system
CN117971888B (en) Method, device, equipment, storage medium and program product for determining data engine
JP2013125429A (en) Analysis object determination device
JP2008299797A (en) Database system, database retrieval method in database system, and computer program used for database system
JP2010218219A (en) Replica table generating apparatus, replica table generating method, and program
JPH07248915A (en) Program analysis device

Legal Events

Date Code Title Description
A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 19991207