Database system with methods for improving query performance with cache optimization strategies
First Claim
1. In a system comprising a database for storing and retrieving information from database tables, each database table comprising a plurality of data pages for storing data records, a method for retrieving information from database tables in response to a database query, the method comprising:
- receiving a query specifying retrieval of specific information of interest from a database table, said database table having a clustered index which stores data pages at its terminal nodes; and
retrieving the specific information of interest using a first input/output (I/O) block size and a second I/O block size for retrieving information by;
(i) navigating the clustered index for locating a storage location where said particular information of interest is stored using said first I/O block size to retrieve non-terminal nodes as the clustered index is traversed, and(ii) after navigating to the storage location where said specific information of interest is stored, retrieving data pages storing said specific information of interest using said second I/O block size.
1 Assignment
0 Petitions
Accused Products
Abstract
Database system and methods are described for improving execution speed of database queries (e.g., for transaction processing and for decision support) by optimizing use of buffer caches. The system includes an Optimizer for formulating an optimal strategy for a given query. More particularly, the Optimizer communicates with a Buffer Manager before it formulates the query plan. For instance, the Optimizer may query the Buffer Manager for the purpose of determining whether the object of interest (e.g., table or index to be scanned) exists in its own buffer cache (i.e., whether it has been bound to a particular named cache). If the object exists in its own cache, the Optimizer may inquire as to how much of the cache (i.e., how much memory) the object requires, together with the optimal I/O size for the cache (e.g., 16K blocks). Based on this information, the Optimizer formulates a query strategy or plan with "hints," which are ultimately passed to the Cache or Buffer Manager. By formulating "hints" for the Buffer Manager at the level of the Optimizer, knowledge of the query is, in effect, passed down to the Buffer Manager so that it may service the query using an optimal caching strategy--one based on the dynamics of the query itself. Based on the "hints" received from the Optimizer, the Buffer Manager can fine tune input/output (i.e., cache management) for the query. Specific Optimizer strategies are described for each scan method available to the system, including heap scan, clustered index, and non-clustered index access. Additional strategies are described for multi-table access during processing of join queries.
-
Citations
25 Claims
-
1. In a system comprising a database for storing and retrieving information from database tables, each database table comprising a plurality of data pages for storing data records, a method for retrieving information from database tables in response to a database query, the method comprising:
-
receiving a query specifying retrieval of specific information of interest from a database table, said database table having a clustered index which stores data pages at its terminal nodes; and retrieving the specific information of interest using a first input/output (I/O) block size and a second I/O block size for retrieving information by; (i) navigating the clustered index for locating a storage location where said particular information of interest is stored using said first I/O block size to retrieve non-terminal nodes as the clustered index is traversed, and (ii) after navigating to the storage location where said specific information of interest is stored, retrieving data pages storing said specific information of interest using said second I/O block size. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10)
-
-
11. In a database system comprising a database for storing and retrieving information from database tables, a method for retrieving information from database tables in response to a database query, the method comprising:
-
receiving a query specifying retrieval of specific information of interest from a database table, said database having an index including terminal nodes each of which points to a particular data page; retrieving the specific information of interest using a first input/output (I/O) block size and a second I/O block size for retrieving information by; (i) navigating the index for locating a terminal node which points to a storage location where said information of interest is stored using said first I/O block size to retrieve each node of the index traversed, and (ii) after locating a storage location where said specific information of interest is stored, retrieving data pages storing said specific information of interest using said second I/O block size. - View Dependent Claims (12, 13, 14, 15, 16, 17, 18, 19, 20)
-
-
21. In a database system comprising a database for storing and retrieving information from database tables, each database table comprising a plurality of data pages for storing data records, a method for retrieving information from database tables in response to a database query, the method comprising:
-
receiving a query specifying retrieval of specific information of interest by joining first and second database tables; determining a join order by assigning one of the tables to serve as an outer join table and the other table to serve as an inner join table, such that the system will scan the inner join table for each record of the outer table, for locating said specific information of interest; and retrieving the specific information of interest by using a fetch and discard strategy on the outer join table, such that most-recently used data pages of the outer join table fetched are preferentially discarded from memory. - View Dependent Claims (22, 23, 24, 25)
-
Specification