[go: up one dir, main page]

JPH10312325A - Database index utilization program creation method - Google Patents

Database index utilization program creation method

Info

Publication number
JPH10312325A
JPH10312325A JP9123767A JP12376797A JPH10312325A JP H10312325 A JPH10312325 A JP H10312325A JP 9123767 A JP9123767 A JP 9123767A JP 12376797 A JP12376797 A JP 12376797A JP H10312325 A JPH10312325 A JP H10312325A
Authority
JP
Japan
Prior art keywords
program
database
index
access
source
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
JP9123767A
Other languages
Japanese (ja)
Inventor
Masaya Shozui
雅也 勝瑞
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.)
Hitachi Ltd
Original Assignee
Hitachi 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 Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP9123767A priority Critical patent/JPH10312325A/en
Publication of JPH10312325A publication Critical patent/JPH10312325A/en
Pending legal-status Critical Current

Links

Landscapes

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

Abstract

(57)【要約】 【課題】データベースをアクセスするプログラムを作成
するに当たり、データベース管理システムに設定されて
いるインデックス情報と、プログラム実行時トレースを
基にして、データベースアクセス効率を向上させる。 【解決手段】図1のデータベースインデックス解析情報
格納装置12と、プログラム実行トレース情報格納装置
14を基に行うインデックス利用プログラム一覧作成処
理において、アクセス開始時間、アクセス終了時間を基
にして、アクセスしているテーブル情報、インデックス
情報、ソースプログラム開始行、ソースプログラム終了
行、アクセス時間や、アクセス時間の平均を求め、平均
時間よりも時間がかかっているアクセス部を特定するイ
ンデックス利用プログラム一覧表を作成し、画面入力装
置18によりプログラム作成者が直接再作成対象となる
ソースプログラムを選択でき、選択項目を基にして、プ
ログラムソース自動修正装置19によりソースプログラ
ムを自動修正し、実行モジュール自動作成装置20によ
り修正されたプログラムを実行モジュールまで自動的に
再作成する。
(57) [Summary] To create a program for accessing a database, the database access efficiency is improved based on the index information set in the database management system and the program execution trace. In an index utilization program list creation process performed based on a database index analysis information storage device 12 and a program execution trace information storage device 14 of FIG. 1, access is performed based on an access start time and an access end time. Table information, index information, source program start line, source program end line, access time and average of access time are calculated, and an index-using program list is created to identify the access section that is taking longer than the average time. The program creator can directly select a source program to be re-created by the screen input device 18, automatically correct the source program by the program source automatic correcting device 19 based on the selected item, and Modified Pro To automatically re-create the ram until the execution module.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、データベース処理
システムに関し、特にリレーショナルデータベース管理
システムに適したプログラムを作成する業務、及び性能
向上を行う業務に関するものである。
[0001] 1. Field of the Invention [0002] The present invention relates to a database processing system, and more particularly to a task of creating a program suitable for a relational database management system and a task of improving performance.

【0002】[0002]

【従来の技術】一般に、データベース管理システムなど
を用いたシステムを構築するには、システム要件をまと
め、業務システムを遂行するに足りるデータ項目を出
し、データ項目の関連を示す論理設計をおこない、作成
された論理情報を基にして、実業務システムに適用可能
な処理効率時間を達成するために物理設計を行う。この
ような、データベース管理システムを用いたシステム
で、業務処理を一定の処理効率に保つためには、データ
ベース管理システムにインデックスを作成し、ソースプ
ログラム中からデータベース管理システムに登録されて
いるインデックスを有効に使い処理(データアクセス)
速度を向上させることが不可欠である。
2. Description of the Related Art In general, in order to construct a system using a database management system or the like, system requirements are summarized, data items sufficient for executing a business system are output, and a logical design showing a relation between the data items is performed and created. Based on the logical information obtained, a physical design is performed to achieve a processing efficiency time applicable to a real business system. In such a system using a database management system, in order to maintain business processing at a constant processing efficiency, create an index in the database management system and enable the index registered in the database management system from the source program. Processing (data access)
Improving speed is essential.

【0003】従来のデータベース設計では、データベー
スの設計及び、データベース管理システムのインデック
ス設計を行った後、インデックスを意識してソースプロ
グラムの作成を行ってきた。また、インデックス設計
は、1つのテーブルが複数のソースプログラムから使わ
れることから、各処理に適したインデックスを作成し、
2次インデックス、3次インデックスとして作成してき
た。そのため、ソースプログラムからアクセスするテー
ブルに対して、複数のインデックスが作成されていた場
合、データベースアクセス時の使用するインデックス
は、データベース管理システム側で制御しているため、
ソースプログラム作成者が意識したインデックスを用い
ずにテーブルにアクセスすることがあった。そのため、
設計段階で想定した業務処理に対する処理効率が得られ
ないことがあった。
In the conventional database design, after designing a database and designing an index of a database management system, a source program has been created in consideration of an index. In addition, the index design creates an index suitable for each process because one table is used from multiple source programs,
It has been created as a secondary index and a tertiary index. Therefore, if multiple indexes have been created for the table accessed from the source program, the index used when accessing the database is controlled by the database management system side.
In some cases, tables were accessed without using an index that the source program creator was aware of. for that reason,
In some cases, the processing efficiency for the business process assumed in the design stage could not be obtained.

【0004】新規ソースプログラム作成に関し、データ
ベース検索文の自動作成に関する特許としては、特開平
7―287652号、特開平7―160558号があ
る。また、データベースのテーブル構成変更に際して、
検索式の変更を行う特許としては特開平6―68155
号がある。既存の検索処理に対して、データベースのイ
ンデックス定義変更に対して、プログラムの変更をなく
す特許としては、特開平6―110933号がある。し
かし、これら従来技術は、ソースプログラムを作成する
際に、データベースのインデックスを考慮した上で、S
QL(Structured Query Langu
age)文の生成を行うものではない。そのため、イン
デックスを定義したデータベースをアクセスする処理を
おこなうソースプログラムの作成および、データベース
アクセス効率に関して、効率的なSQL文の作成が行え
ないという困難があった。
[0004] Patents relating to automatic creation of a database search statement relating to creation of a new source program include JP-A-7-287652 and JP-A-7-160558. Also, when changing the database table configuration,
A patent that changes the search formula is disclosed in Japanese Patent Laid-Open No.
There is a number. Japanese Patent Application Laid-Open No. Hei 6-110933 discloses a patent that eliminates a change in a program in response to a change in the index definition of a database in an existing search process. However, these conventional techniques take into account the index of the database when creating a source program.
QL (Structured Query Langu)
age) It does not generate a sentence. For this reason, there is a difficulty that it is not possible to create a source program for performing a process of accessing a database in which an index is defined and to efficiently create an SQL statement with respect to database access efficiency.

【0005】[0005]

【発明が解決しようとする課題】従来の技術は、インデ
ックスを考慮しないプログラムの検索処理に対する検索
文の自動生成をおこない、プログラムの作成に関して検
索文の自動生成を行うことによるコーディングミスを減
らし、プログラムコードを作成しないことで、作業工数
の削減に有効であった。
The conventional technique automatically generates a search sentence for a search process of a program that does not consider an index, reduces coding errors caused by automatically generating a search sentence for program creation, and reduces a program error. Not creating code was effective in reducing the number of work steps.

【0006】また、従来技術はインデックス変更時のプ
ログラムへの影響を無くすことで、プログラム自体のリ
コンパイルを行う必要がなく、データベースのインデッ
クス変更時にプログラム変更を行う必要がないため、デ
ータベース構成変更時の検索処理手順を変更することが
なく、ソースプログラム変更に伴う作業工数の削減に有
効であったが、システムの処理効率を考慮したものでな
く、処理効率を向上させる方式ではなかった。
Further, the prior art eliminates the influence on the program when the index is changed, so that the program itself does not need to be recompiled and the program does not need to be changed when the database index is changed. Although the search processing procedure was not changed, it was effective in reducing the number of man-hours due to the change of the source program. However, this method did not consider the processing efficiency of the system and was not a method for improving the processing efficiency.

【0007】本発明の目的は、これら従来技術の課題を
解決し、データベースにアクセスするプログラムを作成
するにあたり、データベース管理システムに定義された
インデックス構成を評価したインデックス利用プログラ
ム一覧を作成することにより、データベースアクセスに
関して、ソースプログラム中のどのコードがプログラム
実行時に使われているか、特に処理効率が悪いソースコ
ードを一覧表示することにより効率のよいプログラムを
作成することを支援し、従来システム開発で行っていた
チューニング作業を軽減するものである。
[0007] An object of the present invention is to solve the problems of the prior art and, when creating a program for accessing a database, create an index-using program list that evaluates an index configuration defined in a database management system. With regard to database access, which code in the source program is used at the time of program execution, especially by displaying a list of source codes with low processing efficiency, it is supported to create an efficient program, and it has been used in conventional system development. Tuning work.

【0008】また、発明の他の目的は、データベースを
アクセスするプログラムを作成するにあたり、アクセス
するテーブルに定義されている複数のインデックス定義
の内、使用されているインデックスを明らかにすること
で、データベースアクセス効率を向上させるため、自動
的にSQL文を再作成し、プログラムの作成工数を減ら
すものである。
Another object of the present invention is to clarify an index used among a plurality of index definitions defined in a table to be accessed when creating a program for accessing the database. In order to improve access efficiency, an SQL statement is automatically re-created to reduce the number of steps for creating a program.

【0009】[0009]

【課題を解決するための手段】上記目的を達成するため
には、次のようにすれば良い。
The above object can be achieved by the following method.

【0010】データベースのアクセス状況を、データベ
ース管理システムよりSQLトレースとして出力したト
レース情報を格納するデータベースインデックス解析情
報格納装置と、プログラムを実行する際にデータベース
アクセスするソースコードをトレース情報として格納し
たプログラム実行トレース情報格納装置より、それぞ
れ、データベースインデックス解析情報格納装置のSQ
Lトレース情報とプログラム実行トレース情報格納装置
のプログラム実行トレース情報を読み込み、インデック
ス利用プログラム一覧を作成する。上記に際し、インデ
ックス利用プログラム一覧作成でデータベースアクセス
時間を、参照テーブル毎にトレース情報として表示する
ことにより、インデックスが有効に使用されていないプ
ログラムソースの当該行を特定できる。
A database index analysis information storage device for storing trace information outputted as a SQL trace from a database management system as a database access status, and a program execution for storing, as trace information, a source code for accessing the database when executing the program From the trace information storage device, the SQ of the database index analysis information storage device
The L trace information and the program execution trace information in the program execution trace information storage device are read, and a list of index-using programs is created. At this time, by displaying the database access time as trace information for each reference table in creating the index-using program list, it is possible to specify the relevant line of the program source where the index is not used effectively.

【0011】また、処理効率向上を行うチューニング工
数の削除を行うには、インデックス利用プログラム一覧
を基にして、処理速度が全平均よりも遅いものに対し
て、検索条件を自動的に再構成することにより、データ
ベースアクセス効率を向上させるプログラムソース自動
修正装置を持たせればよい。
Further, in order to delete the tuning man-hours for improving the processing efficiency, the search conditions are automatically reconfigured for those whose processing speed is lower than the overall average, based on the index utilization program list. Thus, it is sufficient to provide a program source automatic correction device for improving the database access efficiency.

【0012】さらに、プログラムソース変更により、プ
ログラム作成の効率を向上させるには、プログラムソー
ス自動修正装置により、作成されたプログラムソースコ
ードを基にして、自動的に再コンパイルを行うことを可
能とする実行モジュール自動作成装置により、変更プロ
グラムの自動修正、自動再コンパイルが行えることにな
り、プログラムの自動修正が可能となる。
Further, in order to improve the efficiency of program creation by changing the program source, it is possible to automatically recompile the program source code based on the created program source code by the automatic program source correction device. With the automatic execution module creating apparatus, the modified program can be automatically modified and automatically recompiled, so that the program can be automatically modified.

【0013】インデックスを用いるデータベースアクセ
スにおいてデータベース管理システムより、出力させる
SQLトレース情報を格納したデータベースインデック
ス解析情報格納装置と、プログラムを実行する際にデー
タベースアクセスするソースコードをトレースしたプロ
グラム実行トレース情報格納装置を基にして作成された
インデックス利用プログラム一覧により、実行プログラ
ムからデータベースアクセスの時間がわかり、かつ、平
均アクセス時間よりも時間がかかっているアクセスプロ
グラムのソースコードの行番号が明らかになることによ
り、プログラム中でデータベース管理システムで設定さ
れているインデックスを有効に使われていない個所を特
定し、検索条件を新たに設定する対象としてプログラム
作成者にたいして知らせることから、プログラム修正の
効率向上となる。また、システム処理性能の向上(チュ
ーニング)作業の工数削減となる。
A database index analysis information storage device that stores SQL trace information to be output from a database management system in a database access using an index, and a program execution trace information storage device that traces a source code that accesses a database when executing a program By using the index-based program list created based on the above, the time of database access can be known from the execution program, and the line number of the source code of the access program that takes longer than the average access time can be clarified. Identify places where the index set in the database management system is not used effectively in the program, and provide the program creator with a new search condition. Since thereby al, the efficiency of the fix. In addition, the number of man-hours for improving (tuning) the system processing performance can be reduced.

【0014】また、プログラムソース自動修正装置は、
インデックス利用プログラム一覧を基にして、処理速度
が全平均よりも遅いものに対して、プログラム作成者の
指示により、検索条件を自動的に再構成することにが出
来るため、プログラム作成者が、ソースプログラムを変
更する必要なく、データベースアクセス効率を向上させ
ることができる。
Further, the program source automatic correction device includes:
Based on the list of programs using the index, if the processing speed is slower than the overall average, the search conditions can be automatically reconfigured according to the instructions of the program creator. The database access efficiency can be improved without having to change the program.

【0015】さらに、プログラムソース自動修正装置に
より、変更プログラムの自動修正、自動再コンパイルが
行えることにより、プログラム変更に伴うコンパイルの
作業が無くなるため、工数を削減することが可能とな
る。
Further, since the automatic modification and automatic recompilation of the changed program can be performed by the automatic program source modifying device, the compiling work accompanying the program modification is eliminated, and the man-hour can be reduced.

【0016】[0016]

【発明の実施の形態】以下、本発明の実施例を図面によ
り詳細に説明する。
Embodiments of the present invention will be described below in detail with reference to the drawings.

【0017】図1は本発明の1実施例のシステム構成を
説明するための図であり、図2はデータベースインデッ
クス解析装置により解析されたデータベースアクセス時
のインデックス利用状況や、SQL文を解析した解析情
報を格納したデータベースインデックス解析情報格納装
置内の一覧表を表し、図3はプログラム実行トレース装
置により、プログラムを実行する際にデータベースアク
セスするソースコードをトレースした情報を格納したプ
ログラム実行トレース情報格納装置内の一覧表を表し、
図4は、データベースインデックス解析情報格納装置の
情報とプログラム実行トレース情報格納装置のを読み込
み、作成されたインデックス利用プログラム一覧を表
し、図5は、インデックス利用プログラム一覧作成と、
プログラムソース自動修正のフローチャートを示す。
FIG. 1 is a diagram for explaining a system configuration according to one embodiment of the present invention. FIG. 2 is a diagram illustrating an analysis of an index usage state at the time of database access analyzed by a database index analysis apparatus and an SQL statement. FIG. 3 shows a list in a database index analysis information storage device storing information, and FIG. 3 shows a program execution trace information storage device storing information obtained by tracing a source code for accessing a database when a program is executed by a program execution trace device. Represents the list in the
FIG. 4 shows information on the database index analysis information storage device and the program execution trace information storage device, and shows a list of created index-using programs. FIG.
4 shows a flowchart of a program source automatic correction.

【0018】図1において、11はデータベースのアク
セス状況を、データベース管理システムより、アクセス
しているテーブル名称、インデックス名称、アクセス開
始時間、アクセス終了時間、SQL番号等、データベー
スアクセスに関する情報を取得し、得られたデータをデ
ータベースインデックス解析情報格納装置に格納するた
めのデータベース解析装置、12は、11のデータベー
スインデックス解析情報格納装置より得られた情報を表
構造として格納するためのデータベースインデックス解
析情報格納装置、13は、データベースアクセスをする
プログラムで、ソースプログラムのデータベースアクセ
スコードに対してプログラム中で1意に識別できるアク
セスIDを生成し、プログラム実行時にトレース情報と
してデータベースアクセスコードを出力するし、アクセ
スするテーブル名称、アクセスID、アクセス開始時
間、アクセス終了時間、プログラムソースコードの開始
行、終了行等、プログラム実行時にデータベースにたい
してアクセスする情報を取得するプログラム実行トレー
ス装置、14は、13のプログラム実行トレース装置に
より得られた情報を表構造として格納するためのプログ
ラム実行トレース情報格納装置、15は、12のデータ
ベースインデックス解析情報格納装置より、データベー
スアクセス情報を読み込み、14のプログラム実行トレ
ース情報格納装置よりプログラム実行情報を読み込み、
各表よりアクセス開始時間、アクセス終了時間を基にし
て、アクセスしているテーブル情報、インデックス情
報、ソースプログラム開始行、ソースプログラム終了
行、アクセス時間や、アクセス時間の平均を求め、平均
時間よりも時間がかかっているアクセス部を特定するイ
ンデックス利用プログラム一覧表を作成するインデック
ス利用プログラム一覧作成装置、16は、15のインデ
ックス利用プログラム一覧作成装置により作成された情
報を表構造として格納するためのインデックス利用プロ
グラム一覧格納装置、17は、15のインデックス利用
プログラム一覧作成装置により作成された情報を一覧情
報として出力する出力部、18は、15のインデックス
利用プログラム一覧作成装置により作成された一覧情報
を画面に表示し、19のプログラムソースの自動修正装
置の処理対象を選択することを可能とする、入力部、1
9は、16のインデックス利用プログラム一覧格納装置
を基にして、18の画面入力部により再作成対象として
選択されたアクセス条件に対して、アクセス条件式を自
動的に変更するプログラムソース自動修正装置、20
は、19のプログラムソース自動修正装置より作成され
た変更後のソースプログラムを自動的に再コンパイルす
る実行モジュール自動作成装置から構成される。
In FIG. 1, reference numeral 11 denotes information on database access, such as a table name, an index name, an access start time, an access end time, and an SQL number, which are accessed from a database management system. A database analysis device for storing the obtained data in a database index analysis information storage device; and a database index analysis information storage device for storing information obtained from the database index analysis information storage device as a table structure. , 13 are programs for accessing the database, generate an access ID that can be uniquely identified in the program with respect to the database access code of the source program, and use the database as trace information when executing the program. A program execution tracing device that outputs an access code and obtains information for accessing a database at the time of program execution, such as a table name to be accessed, an access ID, an access start time, an access end time, and a start line and an end line of a program source code; 14 is a program execution trace information storage device for storing information obtained by the 13 program execution trace devices as a table structure, 15 is a database read information read from the 12 database index analysis information storage device, Reads program execution information from the program execution trace information storage device,
Based on the access start time and access end time from each table, the table information being accessed, index information, source program start line, source program end line, access time, and average of access time are calculated. An index-using program list creating device that creates an index-using program list that specifies an access unit that takes a long time, and an index for storing information created by the index-using program list creating device as a table structure. A use program list storage device, 17 is an output unit that outputs information created by the 15 index use program list creation devices as list information, and 18 is a screen that displays the list information created by the 15 index use program list creation devices. And 19 It makes it possible to select the processing target of the automatic correction device program source, an input unit, 1
9 is an automatic program source correction device for automatically changing an access condition expression for an access condition selected as a re-creation target by the screen input unit of 18 based on 16 index-using program list storage devices; 20
Is composed of an automatic execution module creating apparatus that automatically recompiles the changed source program created by the 19 automatic program source modifying apparatuses.

【0019】図2において、21はデータベースにアク
セスするプログラム名称XXXを示している。プログラ
ムXXXに対するデータベースのアクセス状況を、一覧
表として管理する。
In FIG. 2, reference numeral 21 denotes a program name XXX for accessing the database. The access status of the database to the program XXX is managed as a list.

【0020】22は、データベース管理システムより得
られた、アクセスしているテーブル名称 23は、プログラムで実行中に使用しているインデック
ス名称 24は、プログラム実行時のアクセス開始時間 25は、プログラム実行時のアクセス終了時間 26は、データベース管理システムで、管理しているS
QL番号で、アクセスする毎の番号が振られるため、デ
ータベース管理システムから得られる番号を示してい
る。これら情報は既存の商用データベースシステムにも
用いられ、日立のHiRDBでも実装されている。
Reference numeral 22 denotes a table name being accessed obtained from the database management system. Reference numeral 23 denotes an index name used during execution of the program. Reference numeral 24 denotes an access start time at the time of execution of the program. The access end time 26 of S is managed by the database management system.
Since the QL number is assigned every time an access is made, the number is obtained from the database management system. Such information is used in existing commercial database systems, and is also implemented in Hitachi's HiRDB.

【0021】これら情報を表構造として表示することに
より、従来では文字の羅列として扱われていたSQL番
号毎のアクセス状況を一覧表示できることから、データ
ベースアクセス状況の管理が容易になる。
By displaying these pieces of information as a table structure, a list of access statuses for each SQL number, which has been conventionally handled as a list of characters, can be displayed in a list, so that management of database access statuses becomes easy.

【0022】図3において、31はデータベースにアク
セスするプログラム名称XXXを示している。プログラ
ムXXXに対するデータベースのアクセスプログラムの
実行状況を、一覧表として管理する。
In FIG. 3, reference numeral 31 denotes a program name XXX for accessing the database. The execution status of the database access program for the program XXX is managed as a list.

【0023】32は、プログラム実行トレース情報装置
より得られた、アクセスしているテーブル名称、33
は、プログラム実行トレース情報装置によりプログラム
中で1意に設定されたデータベースアクセスIDを示
し、 34は、プログラム実行時のアクセス開始時間 35は、プログラム実行時のアクセス終了時間 36は、プログラムトレース情報で設定されたアクセス
IDに対する、ソースプログラム中での当該プログラム
開始行番号 37は、プログラムトレース情報で設定されたアクセス
IDに対する、ソースプログラム中での当該プログラム
終了行番号を示している。
Reference numeral 32 denotes the name of the table being accessed, obtained from the program execution trace information device;
Indicates a database access ID uniquely set in the program by the program execution trace information device, 34 indicates an access start time at the time of program execution 35, an access end time at the time of program execution 36 indicates a program trace information The program start line number 37 in the source program with respect to the set access ID indicates the program end line number in the source program with respect to the access ID set in the program trace information.

【0024】ソースプログラム中に作成されているデー
タベースアクセスコードは、データベース管理システム
で提供されているプリプロセッサにより、実装プログラ
ム言語(例えばCOBOLやC)に展開されるため、実
行されるプログラムではプログラム作成者が作成したコ
ードよりも行数が増えている。そのため、単純に実行時
トレース情報を作成しても、プログラム中の行番号と、
実行時の行番号情報が一致しているとは限らない。しか
し、本発明により、ソースプログラムでデータベースア
クセスコードに対して1意となる番号を作成することに
より、データベース管理システムのプリプロセッサによ
り実行コードの行数が増えた場合でも、作成したソース
コードでの行番号をトレース情報として作成するため、
データベースアクセス効率が悪い箇所の特定が容易に行
えるようになる。
The database access code created in the source program is expanded into an implementation program language (for example, COBOL or C) by a preprocessor provided by the database management system. Has more lines than the code created by. Therefore, even if you simply create runtime trace information, the line number in the program and the
Line number information at the time of execution does not always match. However, according to the present invention, by creating a unique number for the database access code in the source program, even if the number of lines of the execution code is increased by the preprocessor of the database management system, the number of lines in the created source code is increased. To create numbers as trace information,
It is possible to easily identify a portion where the database access efficiency is low.

【0025】図4において、一覧表の情報は、データベ
ースインデックス解析情報格納装置より読み込んだ情報
と、プログラム実行トレース情報格納装置より読み込ん
だ情報を、アクセス開始時間、アクセス終了時間を基に
して、プログラムが実行されているときに、読まれたテ
ーブル、使用されたインデックス、実行されたプログラ
ム行の特定を行う。
In FIG. 4, the information in the list is based on the information read from the database index analysis information storage device and the information read from the program execution trace information storage device based on the access start time and the access end time. Identifies the table that was read, the index that was used, and the program line that was executed when was executed.

【0026】41はデータベースにアクセスするプログ
ラム名称XXXを示している。
Reference numeral 41 denotes a program name XXX for accessing the database.

【0027】42は、データベースインデックス利用プ
ログラム一覧作成装置において各データベースアクセス
処理が行ったアクセス時間の平均時間を示している。
Reference numeral 42 denotes an average access time of each database access process in the database index utilization program list creation device.

【0028】43は、プログラムがアクセスしているテ
ーブル名称の表示 44は、プログラムが使用したインデックス名称の表示 45は、プログラムが実行されたデータベースアクセス
コード開始行の表示 46は、プログラムが実行されたデータベースアクセス
コード終了行の表示 47は、データベースアクセスが行われた実行総時間の
表示、48は、42の平均時間との評価を示すプログラ
ムソース自動修正対象選択欄を示す。これには、平均時
間よりも長いものに関しては、画面表示の際には、他と
背景色を変える等認識しやすい一覧表表示を行う。ま
た、印刷時には、網掛け等の表示を行う。
Reference numeral 43 denotes the name of the table accessed by the program. Reference numeral 44 denotes the name of the index used by the program. Reference numeral 45 denotes the start line of the database access code in which the program was executed. Display of the end line of the database access code 47 indicates the total execution time during which the database access was performed, and 48 indicates a program source automatic correction target selection column indicating the evaluation with the average time of 42. For this purpose, a list that is longer than the average time is displayed in an easily recognizable list such as by changing the background color when displaying the screen. At the time of printing, display such as shading is performed.

【0029】また、本一覧表は印刷が可能である。ま
た、本一覧表は、画面表示可能で、プログラム作成者に
より画面より48のプログラムソース自動修正対象選択
欄を選ぶことが可能で、選択されてものに対してはプロ
グラムソース自動修正が行われる。
The list can be printed. This list can be displayed on the screen, and the program creator can select 48 program source automatic correction target selection fields from the screen, and the program source automatic correction is performed for the selected item.

【0030】図5において、インデックス利用プログラ
ム一覧の作成と、プログラムソース自動修正対象選択欄
選択時のソースプログラム検索条件自動再編成のフロー
チャートを示す。
FIG. 5 is a flow chart showing the creation of an index-using program list and the automatic reorganization of source program search conditions when selecting a program source automatic correction target selection field.

【0031】51は、プログラム実行トレース情報格納
装置に格納されているプログラム実行トレース情報を読
み込む処理を行う。
A processing unit 51 reads the program execution trace information stored in the program execution trace information storage device.

【0032】52は、51にて読み込んだ情報でデータ
ベースをアクセスする処理が行われたどうかの有無を判
定する。これは、実行したプログラムがデータベースの
アクセスを行わないことがある可能性があるために判定
処理を行う。
At 52, it is determined whether or not the process for accessing the database has been performed with the information read at 51. This is because the executed program may not access the database in some cases.

【0033】53は、52のデータベースアクセス処理
判定処理にてデータベースアクセス処理があった場合
に、データベースインデックス解析情報格納装置より、
データベースインデックス解析情報を読み込む処理を行
う。
Reference numeral 53 denotes a case where a database access process is performed in the database access process determination process in 52,
Perform processing to read database index analysis information.

【0034】54は、51にて読み込んだプログラム実
行トレース情報と、53にて読み込んだデータベースイ
ンデックス解析情報をアクセス開始時間、アクセス終了
時間を基にしてプログラムで参照されているプログラム
のテーブル名称、インデックス名称、プログラム開始
行、プログラム終了行を一覧表として作成する。また、
作成に際して各処理のアクセス終了時間―アクセス開始
時間としてアクセス実行時間を求め、平均アクセス処理
時間を求める。また、平均アクセス時間よりも長いアク
セス時間をもつデータベースアクセスについては、プロ
グラムソース自動修正対象選択欄に選択情報をデフォル
トとして設定する。
Reference numeral 54 denotes the program execution trace information read in 51 and the database index analysis information read in 53, based on the access start time and the access end time, based on the table name and index of the program referred to by the program. Create a name, program start line, and program end line as a list. Also,
Upon creation, an access execution time is obtained as an access end time-access start time of each process, and an average access processing time is obtained. For a database access having an access time longer than the average access time, the selection information is set as a default in the program source automatic correction target selection column.

【0035】55は、54にて求められた平均アクセス
時間よりも長い項目に対して、インデックス利用プログ
ラム一覧表示のプログラムソース自動修正対象選択欄に
選択情報を設定された項目があるかないかの判定を行
う。プログラムソース自動修正対象選択欄に選択情報が
設定されていない場合は、終了処理を行う。
A determination is made at 55 as to whether or not there is an item for which selection information has been set in the program source automatic correction target selection column of the index-based program list display for an item longer than the average access time obtained at 54. I do. If the selection information is not set in the program source automatic correction target selection column, an end process is performed.

【0036】56は、プログラムソース自動修正対象選
択欄に選択情報が設定された場合に、選択されたデータ
ベースアクセス条件を見直し、プログラムソース検索条
件自動再編成処理を行う。例えば、SQL文では、検索
条件式としてWHERE句が使われるが、WHERE句
の設定条件の並びにより、データベースアクセス時のイ
ンデックスが異なることがあり、予想されていた処理性
能がでない場合がある。このような場合に平均アクセス
時間を超える処理となる。そこで、WHERE句の並び
の再編成、あるいは、検索条件の追加を行うことによ
り、データベースアクセス処理時間の向上が期待でき
る。
When the selection information is set in the program source automatic correction target selection column, the selected database access condition is reviewed, and the program source search condition automatic reorganization process is performed. For example, in a SQL sentence, a WHERE clause is used as a search condition expression. However, an index at the time of database access may be different depending on a sequence of setting conditions of the WHERE clause, and an expected processing performance may not be obtained. In such a case, the processing exceeds the average access time. Therefore, by rearranging the arrangement of the WHERE phrases or adding search conditions, it is expected that the database access processing time will be improved.

【0037】[0037]

【発明の効果】本発明によれば、データベースアクセス
を行うソースプログラムの実行トレースを行え、プログ
ラム中の平均アクセス時間を自動集計し、アクセス時間
が平均アクセス時間よりも長いものは、インデックス等
のアクセス条件がソースプログラム中で適切に設定され
ていない可能性があること、及び、ソースプログラムコ
ードの行数を表示することにより、アクセス効率の悪い
個所が特定できることから、処理効率の向上に関する修
正対象調査の工数の削減が期待できる。また、アクセス
効率の悪いものを一覧表示された表から選択することに
より、自動的にプログラムソースのアクセス条件が再編
成されるため、処理効率向上の関するプログラム修正の
工数が削減できる。
According to the present invention, the execution trace of the source program for accessing the database can be traced, the average access time in the program is automatically totaled, and if the access time is longer than the average access time, the access such as the index is performed. Investigation of correction targets for improvement of processing efficiency because conditions may not be set properly in the source program and locations of inefficient access can be identified by displaying the number of lines of source program code Can be reduced. In addition, by selecting a program with poor access efficiency from the list displayed, the access conditions of the program source are automatically reorganized, so that the number of program correction steps for improving the processing efficiency can be reduced.

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

【図1】本発明の一実施例のシステム構成図、FIG. 1 is a system configuration diagram of an embodiment of the present invention;

【図2】データベースインデックス解析装置により作成
されたデータベースインデックス解析情報格納装置内の
データ構造、
FIG. 2 shows a data structure in a database index analysis information storage device created by the database index analysis device;

【図3】プログラム実行トレース装置により作成された
プログラム実行トレース情報格納装置内のデータ構造、
FIG. 3 shows a data structure in a program execution trace information storage device created by the program execution trace device;

【図4】インデックス利用プログラム一覧画面、FIG. 4 is an index utilization program list screen,

【図5】インデックス利用プログラム一覧の作成と、プ
ログラムソース自動修正対象選択欄選択時のソースプロ
グラム検索条件自動再編成のフローチャートを表す。
FIG. 5 shows a flowchart of creation of a list of index-based programs and automatic reorganization of source program search conditions when a program source automatic correction target selection field is selected.

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

11 データベースインデックス解析装置 12 データベースインデックス解析情報格納装置 13 プログラム実行トレース装置 14 プログラム実行トレース情報格納装置 15 インデックス利用プログラム一覧作成装置 16 インデックス利用プログラム一覧情報格納装置 17 インデックス利用プログラム一覧情報出力部 18 インデックス再編成対象入力部 19 プログラムソース自動修正装置 20 実行モジュール自動作成装置 21 データベースインデックス解析装置対象プログラ
ム名 22 データベースインデックス解析装置対象テーブル
名欄 23 データベースインデックス解析装置対象インデッ
クス名欄 24 データベースインデックス解析装置対象アクセス
開始時間欄 25 データベースインデックス解析装置対象アクセス
終了時間欄 26 データベースインデックス解析装置対象SQL番
号欄 31 プログラム実行トレース装置対象プログラム名 32 プログラム実行トレース装置対象テーブル欄 33 プログラム実行トレース装置対象アクセス番号欄 34 プログラム実行トレース装置対象アクセス開始時
間欄 35 プログラム実行トレース装置対象アクセス終了時
間欄 36 プログラム実行トレース装置対象プログラム開始
行欄 37 プログラム実行トレース装置対象プログラム終了
行欄 41 インデックス利用プログラム一覧情報対象プログ
ラム名 42 インデックス利用プログラム一覧情報平均時間 43 インデックス利用プログラム一覧情報テーブル欄 44 インデックス利用プログラム一覧情報インデック
ス番号欄 45 インデックス利用プログラム一覧情報プログラム
開始行欄 46 インデックス利用プログラム一覧情報プログラム
終了行欄 47 インデックス利用プログラム一覧情報処理時間欄 48 インデックス利用プログラム一覧情報ソースプロ
グラム自動修正対象選択欄 51 プログラム実行情報読込ステップ 52 データベース検索処理判定部 53 データベースインデックス解析結果読込ステップ 54 インデックス利用プログラム一覧作成ステップ 55 実行効率判定部 56 プログラムソースデータベースアクセス条件自動
再編成ステップ
11 Database Index Analysis Device 12 Database Index Analysis Information Storage Device 13 Program Execution Trace Device 14 Program Execution Trace Information Storage Device 15 Index Use Program List Creation Device 16 Index Use Program List Information Storage Device 17 Index Use Program List Information Output Unit 18 Index Knitting target input unit 19 Automatic program source correction device 20 Automatic execution module creation device 21 Database index analyzer target program name 22 Database index analyzer target table name column 23 Database index analyzer target index name column 24 Database index analyzer target access start Time column 25 At the end of access to the database index analyzer Column 26 SQL number column for database index analysis device 31 Program name for program execution trace device 32 Table table for program execution trace device 33 Access number column for program execution trace device 34 Access start time column for program execution trace device 35 Program execution trace device Target access end time column 36 Program execution trace device target program start line column 37 Program execution trace device target program end line column 41 Index use program list information target program name 42 Index use program list information average time 43 Index use program list information table column 44 Index use program list information index number column 45 Index use program list information program Program start line field 46 index use program list information program end row field 47 index use program list information processing time field 48 index use program list information source program automatic correction target selection field 51 program execution information reading step 52 database search processing judgment section 53 database Index analysis result reading step 54 Index utilization program list creation step 55 Execution efficiency judgment unit 56 Program source database access condition automatic reorganization step

Claims (3)

【特許請求の範囲】[Claims] 【請求項1】データベースをアクセスするプログラム作
成において、プログラム実行トレース情報を基にして、
ソースプログラム中で宣言されたデータベースアクセス
条件文と、データベース管理システムより収集されたデ
ータベースインデックス利用情報を基にして、プログラ
ム実行時のデータベースアクセス処理において使用され
ているインデックスとソースプログラム行の関係を明ら
かにし、一覧表として作成し、インデックスプログラム
利用一覧として一覧表示する事、及び出力機能を有する
出力部を特徴とするデータベースインデックス利用プロ
グラム作成方式。
In creating a program for accessing a database, based on program execution trace information,
Based on the database access condition statement declared in the source program and the database index usage information collected from the database management system, the relationship between the index used in the database access processing at the time of program execution and the source program line is clarified A database index utilization program creation method characterized by creating a list and displaying it as an index program utilization list, and an output unit having an output function.
【請求項2】請求項1で作成し一覧表として表示したイ
ンデックス利用プログラム一覧表示画面上で、データベ
ースアクセス条件式の変更対象とするプログラムソース
を選択あるいは非選択をプログラム作成者が直接画面上
から入力することを特徴とした画面入力方式。
2. A program creator directly selects or deselects a program source for which a database access conditional expression is to be changed on an indexed program list display screen created and displayed as a list in claim 1. Screen input method characterized by input.
【請求項3】請求項1で作成された一覧表上で画面より
プログラム作成者により任意に選択されたソースプログ
ラム自動変更対象プログラムに対して、データベースに
作成されているインデックスを有効に使えるように検索
条件の並び替えを自動的に行うことを特徴としたプログ
ラム自動修正方式。
3. An index created in a database can be effectively used for a source program automatic change target program arbitrarily selected by a program creator from a screen on the list created in claim 1. An automatic program modification method that automatically sorts search conditions.
JP9123767A 1997-05-14 1997-05-14 Database index utilization program creation method Pending JPH10312325A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP9123767A JPH10312325A (en) 1997-05-14 1997-05-14 Database index utilization program creation method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP9123767A JPH10312325A (en) 1997-05-14 1997-05-14 Database index utilization program creation method

Publications (1)

Publication Number Publication Date
JPH10312325A true JPH10312325A (en) 1998-11-24

Family

ID=14868786

Family Applications (1)

Application Number Title Priority Date Filing Date
JP9123767A Pending JPH10312325A (en) 1997-05-14 1997-05-14 Database index utilization program creation method

Country Status (1)

Country Link
JP (1) JPH10312325A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7548916B2 (en) 2003-04-30 2009-06-16 Canon Kabushiki Kaisha Calculating image similarity using extracted data

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7548916B2 (en) 2003-04-30 2009-06-16 Canon Kabushiki Kaisha Calculating image similarity using extracted data

Similar Documents

Publication Publication Date Title
US7254810B2 (en) Apparatus and method for using database knowledge to optimize a computer program
US5048018A (en) Debugging parallel programs by serialization
EP0643851B1 (en) Debugger program which includes correlation of computer program source code with optimized objet code
US6961924B2 (en) Displaying variable usage while debugging
US5446900A (en) Method and apparatus for statement level debugging of a computer program
US6964036B2 (en) Descriptive variables while debugging
US9164742B2 (en) Method and a system for searching for parts of a computer program which affects a given symbol
US7028291B2 (en) Debugging method and debugging device
Hueske et al. Peeking into the optimization of data flow programs with mapreduce-style udfs
US11893011B1 (en) Data query method and system, heterogeneous acceleration platform, and storage medium
RU2001102589A (en) DATA SEARCH METHOD AND DEVICE ALLOWING TO WORK WITH MANY SOURCES
DeMillo et al. A grammar based fault classification scheme and its application to the classification of the errors of TEX
Kamkar et al. Interprocedural dynamic slicing
CN112948419A (en) Query statement processing method and device
CN115510361A (en) Data chart page generation method based on visual configuration and related equipment
US20040010780A1 (en) Method and apparatus for approximate generation of source code cross-reference information
JPH10312325A (en) Database index utilization program creation method
CN110895529B (en) Processing method of structured query language and related device
CN113157726A (en) Database processing method and device
CN117290355B (en) Metadata map construction system
CA2144483A1 (en) Methods and apparatus for reverse engineering a program and generating an object-oriented redesign
JP2820184B2 (en) Load module unit test support device
Kinloch A combined Representation for the Maintenance of C Programs
CN114385664A (en) Splitting method, system, device and storage medium for single project micro-service
CN118981474A (en) A view object mapping method and related products