Patent Document ID: 9535953
Application ID: 12950397

Base Claim:
1. A database management system comprising: a memory for storing computer executable instructions; and a processing unit for accessing the memory and executing the computer executable instructions, the computer executable instructions comprising: a compiler comprising a query optimizer to generate query plans, the compiler to: generate a cache key based on a first received query; generate a first query plan based on the first received query; generate the cache key based on a second received query, the second received query having a different parameter than the first received query; access a query repository table to change at least one of heuristic and logic functions of the query optimizer for generating the query plans, the changing of the at least one of the heuristic and logic functions of the query optimizer being based on runtime statistics stored in the query repository table, wherein the query repository table includes a plurality of query records with annotated query plans, each annotated query plan comprising text sufficient to generate a query plan of a certain form; and generate a second query plan, different than the first query plan based on a given annotated query plan stored with a given query record of the plurality of query records in the query repository table, wherein the annotated query plan is stored in the query repository table before the generating of the cache key based on the second received query; and a query data collector to access the query repository table to determine if the first query plan for a first configuration executed on a relational database has a lower resource cost of execution than the second query plan for a second configuration executed on the relational database.

---

Claim 3:
3. The database management system of claim 1 , wherein the computer executable instructions further comprise an update control to detect hardware and software changes in the database management system, wherein upon detecting a hardware or software change, the update control sets a status indicator of the plurality of query records in the query repository table.