|6192365||Transaction log management in a disconnectable computer and network||2001-02-20||Draper et al.||707/101|
|6178427||Method of mirroring log datasets using both log file data and live log data including gaps between the two data logs||2001-01-23||Parker||707/202|
|6119128||Recovering different types of objects with one pass of the log||2000-09-12||Courter et al.||707/202|
|6115722||Method for checking tablespaces involved in referential integrity||2000-09-05||Isip, Jr. et al.||707/202|
|6078918||Online predictive memory||2000-06-20||Allen et al.||707/6|
|6002753||Method and apparatus for interfacing computers to exchange telephone call business information||1999-12-14||Morrison et al.||379/113|
|5946486||Apparatus and method for tracing entries to or exits from a dynamic link library||1999-08-31||Pekowski||707/103|
|5907844||Dynamic external control of rule-based decision making through user rule inheritance for database performance optimization||1999-05-25||Guay et al.||707/100|
|5852818||Non-recursive method for parameter evaluation within an information management system||1998-12-22||Guay et al.|
|5778350||Data collection, processing, and reporting system||1998-07-07||Adams et al.|
|5758355||Synchronization of server database with client database using distribution tables||1998-05-26||Buchanan|
|5721915||Interaction between application of a log and maintenance of a table that maps record identifiers during online reorganization of a database||1998-02-24||Sockut et al.||707/200|
|5701471||System and method for testing multiple database management systems||1997-12-23||Subramanyam|
|5430871||Method of dynamically adding and removing DB2 active logs||1995-07-04||Jamoussi et al.||707/202|
|5043866||Soft checkpointing system using log sequence numbers derived from stored data pages and log records for database recovery||1991-08-27||Myre, Jr. et al.|
The present invention is directed to computer databases. More particularly, the present invention is directed to the collection of computer database object statistics.
The performance of databases and database management systems (“DBMS”s) is critical to many corporations to meet the need of their customers. Customers desire timely and accurate information, and this information is frequently retrieved by an application program interfacing with a database. Poor performance of a database is usually due to inefficient structured query language (“SQL”) by the application program, or inefficient access path selection by the database and DBMS.
Most DBMSs, such as the DB
Products are available for collecting statistics of database objects. Examples of these prior art products are “RUNSTATS” from IBM Corp., and the “Database Analyzer” from Platinum technology inc. However, one drawback with these products is that they must be run in batch mode, which is time consuming. A further drawback is that if the highest accuracy is desired, the database objects must be in a read-only state during statistics collection.
Based on the foregoing, there is a need for a system and method for collecting and maintaining database object statistics on a real-time basis without limiting the database objects to read-only status during collection.
One embodiment of the present invention is a system for collecting database object statistics by a database management system. The system selects one or more objects and corresponding one or more object fields and then creates a base set of statistics for the selected object fields. The system further reads active log records and updates the base set of statistics when a change is read in the active log records. Finally, the system begins extracting log records when an end-of-file of the active log records is reached, and updates the updated statistics based on the extracted log records.
Each table in database
After the base set of statistics is established, at step
After the gap has been checked and processed, at step
In another embodiment, instead of waiting for a refresh request at step
As disclosed, the system and method in accordance with one embedment of the present invention allows a user to collect and monitor statistics in real-time or on demand, therefore providing highly accurate and timely statistical information to the user.
Several embodiments of the present invention are specifically illustrated and/or described herein. However, it will be appreciated that modifications and variations of the present invention are covered by the above teachings and within the purview of the appended claims without departing from the spirit and intended scope of the invention.