Patent ID: 8311989

Claim:
A method for logging query processing statistics in a multi-database system containing a plurality of system databases, comprising: temporarily storing in a database query log (DBQL) a plurality of query log entries generated using information regarding the execution of a plurality of queries, the information being received from a plurality of system databases, each query log entry being generated using information regarding execution of one query by the plurality of system databases and each query log entry including a field identifying a system database that was the source of the information in that entry; creating an express request upon occurrence of a triggering event by selecting a query log entry to be included in the express request based on applying a hash function to a plurality of fields in the query log entry, the plurality of fields including the field identifying the system database that was the source of the information in that entry, the express request containing a subset of the query log entries temporarily stored in the DBQL cache; transmitting the created express request to a plurality of system databases transmitting the one created express request from a parsing engine responsible for maintaining the DBQL cache and for issuing commands to a plurality of subordinate parsing engines to one of a plurality of parsing engines associated with one of the plurality of system databases to which the created express request is to be transmitted; and storing the contents of the transmitted express request in each of plurality of system databases to which it was transmitted by determining where in one of the plurality of databases to which the transmitted express request was transmitted to store a query log entry in the transmitted express request based on applying a hash function to a plurality of fields in the query loci entry, the plurality of fields including the field identifying the system database that was the source of the information in that entry.