Patent ID: 7051013

Claim:
A diagnostic system for a database system, the diagnostic system comprising: a query optimizer operable to determine a query execution plan corresponding to each query received by the database system; a grouping module operable to generate a corresponding grouping identifier for each query based on the corresponding query execution plan and assign the corresponding grouping identifier to each query; and a statistics collection module coupled to the grouping module, the statistics collection module including, a query processing statistics module operable to obtain processing statistics corresponding to each query; a group statistics compilation module operable to compile the processing statistics for each query by the query's grouping identifier; a group data storage operable to store the compiled processing statistics; and wherein: the group statistics compilation module compiles the processing statistics for each query by the query's grouping identifier including, locating a group within the group data storage sharing a grouping identifier corresponding to the grouping identifier associated with a given query and updating processing statistics for the group sharing the grouping identifier; and if the group statistics compilation module is unable to locate a group within the group data storage sharing a grouping identifier corresponding to the grouping identifier associated with a given query, then the group data storage is operable to create a new group entry within the group data storage to store processing statistics associated with the given query.