System and method for an asynchronous queue in a database management system
First Claim
1. A method for performing asynchronous statistics updates in a database management system, the method comprising:
- receiving a first query against a database;
determining if present statistics related to the first query are stale;
entering on a queue, a request to acquire updated statistics related to the first query if the present statistics related to the first query are stale;
developing a first query plan using the present statistics related to the first query;
executing the first query plan; and
processing the request to acquire updated statistics related to the first query asynchronously with respect to the input query.
2 Assignments
0 Petitions
Accused Products
Abstract
A method for performing asynchronous statistics updates in a database management system includes receiving a first query against the database, determining if present statistics related to the first query are stale and entering on a queue a request to acquire updated statistics if the present statistics are stale. The queue jobs are executed asynchronously with respect to the query request. As a result, a first query plan may be developed using the present statistics related to the first query. Thus, no delay in processing the query due to statistics updates is incurred. The first query plan may be executed and results given to the requester. At some later time, the request to acquire updated statistics related to the first query is processed asynchronously from the query request. If subsequent queries are received, the queue can delete duplicate requests to update the same statistics. Those subsequent queries can benefit from the updated statistics.
-
Citations
20 Claims
-
1. A method for performing asynchronous statistics updates in a database management system, the method comprising:
-
receiving a first query against a database;
determining if present statistics related to the first query are stale;
entering on a queue, a request to acquire updated statistics related to the first query if the present statistics related to the first query are stale;
developing a first query plan using the present statistics related to the first query;
executing the first query plan; and
processing the request to acquire updated statistics related to the first query asynchronously with respect to the input query. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8)
-
-
9. A system for performing database statistics updates, the system comprising;
-
a database management system (DBMS) for accepting and evaluating queries against a database, the DBMS having a query optimizer;
a queue for accepting asynchronous jobs entered from the optimizer;
a processor having access to memory, the memory having instructions which when executed, perform a method comprising;
receiving a first query against the database;
determining if present statistics related to the first query are stale;
entering on the queue, a request to acquire updated statistics related to the first query if the present statistics related to the first query are stale;
developing a first query plan using the optimizer and the present statistics related to the first query;
executing the first query plan; and
processing the request to acquire updated statistics related to the first query asynchronously with respect to the input query. - View Dependent Claims (10, 11, 12, 13, 14)
-
-
15. A computer-readable medium having computer-executable instructions for performing a method for asynchronously creating indexes in a database, the method comprising:
-
receiving a first query against the database;
determining if an index related to the first query is missing;
entering on a queue, a request to create a first index related to the first query if the index related to the first query is missing;
developing a first query plan;
executing the first query plan; and
processing the request to create a first index related to the first query asynchronously with respect to the input query. - View Dependent Claims (16, 17, 18, 19, 20)
-
Specification