Database management program, a database managing method and an apparatus therefor
Database optimizing method and system are provided to optimally locate data. Only data satisfying conditions desired by a user is extracted among an access log. Values of a part of the data are translated on the basis of a translation table, and aggregated on the basis of aggregation condition rules. The obtained aggregation result is presented to the user. In addition, data in the database are optimally relocated on the basis of the obtained aggregation result.
Latest Patents:
The present invention relates to a database, and particularly relates to a database management program, a database managing method and a database managing system for carrying out rearrangement of a database or the like on the basis of log information showing access status to data.
As a conventional database optimizing system based on trace information, there is a database optimizing/rearranging system as disclosed in JP-A-5-2515. In this system, information of a method for gaining access to a database at data operation requests issued from respective user programs is accumulated as trace information. When the database is rearranged at regular time intervals, the optimum storage order of data in the database and the necessity of an index are determined with reference to the accumulated trace information. Thus, buffer quantity assignment parameters are created for securing a buffer quantity required for rearranging the database.
SUMMARY OF THE INVENTIONIn the above-mentioned conventional technique, description is made on a method for optimizing and storing the order of columns, the order of lines and the necessity of creating an index in a database on the basis of access frequency. Such processing is carried out automatically routinely, and information is not disclosed to any user. Therefore, the user does not know what standard is used and what is optimized. Thus, classification between the case to optimize and the case not to optimize about one item cannot be defined by the judgement of the user. In addition, for the optimization of the database, the order of columns or the order of lines is merely changed or creation of an index is merely designated. That is, only static optimization is carried out, and description is not made on any dynamic optimization method in which optimization is carried out in accordance with the behavior of the system always undergoing a variation.
It is an object of the present invention to provide a method and a system for supporting user's database management to optimize the system dynamically, and a program for carrying out the support.
Further, it is another object of the invention to provide a database optimizing method which can optimize various conditions such as priorities of data, storage places, storage methods, management of resources, indexes, priorities of jobs, and so on, in accordance with optimization rules defined by a user on the basis of a disclosed optimization criterion (reference).
In order to achieve the foregoing objects, database managing means according to one aspect of the invention has a function to extract log information satisfying predetermined conditions from among log information of application programs having accessed to a database, and a function to rearrange data in the database in accordance with predetermined rules on the basis of commands included in the extracted log information.
Other objects, features and advantages of the present invention will become apparent from the description of the embodiments of the invention taken in conjunction with the accompanying drawings.
BRIEF DESCRIPTION OF THE DRAWINGS
Embodiments of the present invention will be described below with reference to the drawings.
Upon reception of the access log from the computer 2, the computer 3 starts to execute the access log edition/aggregation processing program 104.
It is confirmed whether a translation table is present or absent (711). If absent, a translation table is created (113). If the user prepares a translation table, or if a translation table has been created before, the values of the extracted access log data are translated with reference to the translation table (713).
Next, values corresponding to the translation keys (for example, user ID and object ID) are obtained from the extracted access log data so as to create a list of values of translation sources (812).
Next, the translation source list is used to access the computer 1, and values of accessible translation destinations are obtained to create a translation table (813).
First, specified data is read as input data, and an access table (
If the access table has been created, an aggregation filter is created along aggregation condition rules and an aggregation template (1212).
Each of
Each of
Each of
Returning to the description of
Next, as a result of judgement (2314), the location of an object judged to be high in access frequency is optimized (2315). Some examples will be shown about such optimized location. First, an object judged to be high in access frequency is stored from the database into a cache memory or a buffer memory in the computer 1. Thus, it is possible to provide high-speed access to the object judged to be high in access frequency.
In addition, the priority of a process for the object judged to be high in access frequency is increased. For example, this is effective in the case where the computer 1 is designed to receive access requests from a plurality of computers 2, and the computer 1 executes a process in accordance with priority given thereto in order to carry out processing efficiently. In this case, the access log edition/aggregation program sends the computer 1 the object judged to be high in access frequency and the priority for the object. In the computer 1, the priority and the object sent thereto are stored. Then, when a command for the object is sent, processing is carried out in accordance with the stored priority.
In addition, the computer 1 may be requested to create an index for the object judged to be high in access frequency. Alternatively, in another method, an object column or line judged to be high in access frequency may be relocated. When a plurality of objects are accessed with a high frequency by one application, the access is gained at a high speed if these objects are stored together. If data is distributed and stored in a plurality of databases, these plurality of objects may be stored in different databases. In such a case, databases to be accessed are distributed, and there is no fear that accesses are concentrated on one database. Thus, data can be read at a high speed.
On the contrary, an object judged to be low in access frequency is subject to processing of optimized location, such as decreasing the stored order of the object, storing the object in a lower-rank storage, or reducing the priority of a process (2316). Thus, the priority of a process or the stored position of an object is changed in accordance with the access frequency so that the efficiency is improved in the database system as a whole.
Incidentally, the whole of the above-mentioned processing may be carried out as a batch job automatically at predetermined time intervals.
It has been known that an access log usually has an enormous volume of data beyond gigabytes. By the extraction process in this embodiment, processing can be performed on only required data extracted from a large volume of access log information. Accordingly, there is an effect that the processing can be carried out at a high speed or resources can be saved.
In addition, any identifier inside the database is defined uniquely in order to enhance the processing performance, and the value of the identifier is often a string of characters undecipherable for users. By the translation process in this embodiment, the access log information can be outputted to be replaced by expression decipherable for users. Thus, there is an effect that the visibility for the users is enhanced, and the access log information can be replaced by various properties desired by the users.
Further, by the aggregation process, the access log can be aggregated for every item, arranged in accordance with classification defined by the users, and presented to the users. Thus, there is an effect that it is possible to provide an interface with which accessed data or access frequency can be grasped intuitively with good visibility by the users.
Next, description will be made of a second embodiment of the present invention.
According to the second embodiment, in the access log edition/aggregation processing program 104, access log data is extracted, translated and aggregated in a period from the time when an object was created till the time when the object was deleted. Thus, optimization of the access to a database is supported to reflect the result of analyzing the life cycle of the object.
In the life cycle analyzing process, an extraction process is carried out while the start time of the extraction process is set to be the time when an object was created and the end time of the extraction process is set to be the time when the object was deleted. This is followed by a translation process (112) and an aggregation process (114). Here, in order to analyze the object over its life cycle, aggregation is carried out upon the number of document processing commands accessed in a period from the time when each object was created to the time when the object was deleted. On the basis of the result of the aggregation, the average life of the objects is obtained in an analysis process (2613). The average life and the aggregation result of the number of command issues are compared, analyzed, and statistically analyzed. Thus, the result is outputted.
Further,
Thus, according to the second embodiment, in addition to the effects described in the first embodiment, it is further possible for a user to manage a database and access data optimally and efficiently in accordance with the life cycle of each object.
As described above, according to this embodiment, access information such as access frequency to data and access categories is edited, aggregated and analyzed with an access log to a database as input. Thus, this information can be presented to a user in a way easy to be understood, so that the user can be supported on database management.
Further, according to this embodiment, it is possible to provide a database optimizing method for locating data optimally in accordance with optimization judgement rules defined by the user.
According to the present invention, a user obtains an aggregation result of access frequency to data, access categories, and so on, using an access log to a database. Thus, the user can carry out optimal management of the database.
It will be further understood by those skilled in the art that the foregoing description has been made on embodiments of the invention and that various changes and modifications may be made in the invention without departing from the spirit of the invention and scope of the appended claims.
Claims
1-16. (Canceled).
17. A computer-executable database management program implementing a method for managing a database, said method comprising the steps of:
- extracting log information satisfying predetermined conditions from among log information of an application program having accessed a database; and
- creating an index for an object in accordance with predetermined rules on the basis of commands included in said extracted log information.
18. The computer-executable database management program according to claim 17, wherein said method further comprises the step of obtaining an existence time of data to be accessed by said commands included in said extracted log information, and change stored positions of data to be accessed by said application program in accordance with said existence time and commands to be executed in said existence time.
19. A computer-executable database management program implementing a method for managing a database, said method comprising the steps of:
- extracting log information satisfying predetermined conditions from among log information of an application program having accessed a database; and
- relocating an object column or line in accordance with predetermined rules on the basis of commands included in said extracted log information.
20. The computer-executable database management program according to claim 19, wherein said method further comprises the step of obtaining an existence time of data to be accessed by said commands included in said extracted log information, and change stored positions of data to be accessed by said application program in accordance with said existence time and commands to be executed in said existence time.
21. A method for managing a database comprising the steps of:
- extracting log information satisfying predetermined conditions from among log information of an application program having accessed a database; and
- creating an index for an object in accordance with predetermined rules on the basis of commands included in said extracted log information.
22. The method according to claim 21, further comprising the step of obtaining an existence time of data to be accessed by said commands included in said extracted log information, and change stored positions of data to be accessed by said application program in accordance with said existence time and commands to be executed in said existence time.
23. A method for managing a database comprising the steps of:
- extracting log information satisfying predetermined conditions from among log information of an application program having accessed a database; and
- relocating an object column or line in accordance with predetermined rules on the basis of commands included in said extracted log information.
24. The method according to claim 23, further comprising the step of obtaining an existence time of data to be accessed by said commands included in said extracted log information, and change stored positions of data to be accessed by said application program in accordance with said existence time and commands to be executed in said existence time.
25. A system comprising:
- a client terminal which executes applications;
- a database managing terminal which accesses a database in accordance with a command sent from said client terminal;
- a database managing portion which extracts log information satisfying predetermined conditions from among log information of an application program executed by said client terminal and having accessed a database and creates an index for an object in accordance with predetermined rules on the basis of commands included in said extracted log information.
26. A system:
- a client terminal which executes applications;
- a database managing terminal which accesses a database in accordance with a command sent from said client terminal;
- a database managing portion which extracts log information satisfying predetermined conditions from among log information of an application program executed by said client terminal having accessed a database; and
- relocating an object column or line in accordance with predetermined rules on the basis of commands included in said extracted log information.
Type: Application
Filed: Sep 3, 2004
Publication Date: Feb 10, 2005
Applicant:
Inventors: Yumiko Seki (Toyonaka), Masami Kameda (Yokohama), Takeshi Fujii (Yokohama), Yoshifumi Yamashita (Yokohama)
Application Number: 10/933,393