Method and system for using dynamically generated code to perform record management layer functions in a relational database manager
First Claim
1. A method for enhancing the performance of a data manager that manages a relational database, the manager having a number of operatively coupled component layers for performing functions required for accessing the relational database file records in response to user query statements, the number of component layers including a first component layer for generating output code used in executing the query statement in response to input representing an optimized form of the query statement and a number of lower component layers including at least a second lower component layer for performing predetermined functions required for executing the query statement, the method comprising the steps of:
- (a) adding a row retrieval performance enhancing subroutine to a subroutine library included within the first component layer, the row retrieval performance enhancing subroutine being designed to execute a data record management function performed by a lower component layer substantially faster than if the function were executed by the number of lower component layers, and including code for determining conditions under which the particular subroutine is to be invoked during query execution time;
(b) including calls in the generated output code to the row retrieval enhancing subroutine in place of normally included calls to the lower component layer for inserting the row retrieval subroutine into the generated code; and
, (c) including logic within the row retrieval enhanced subroutine for determining if the row retrieval enhanced subroutine is to be invoked as a function of a particular characteristic of the type of row data being accessed.
1 Assignment
0 Petitions
Accused Products
Abstract
A system and method that enhances the row retrieval performance of a multi-layer relational database manager by including in the code generation component layer of the database manager a row retrieval performance enhancing subroutine designed to execute functions performed by a lower component layer substantially faster than if the functions were executed by such lower component layer. The subroutine includes logic for establishing the conditions under which the particular subroutine is invoked during the execution of a SQL request. The output code generated to execute a specific SQL query, including calls to the row retrieval subroutine in place of normally included calls to the lower component layer. This enables the generated code to perform lower component layer functions with specialized code designed to increase performance based on the characteristics of the data being retrieved.
107 Citations
15 Claims
-
1. A method for enhancing the performance of a data manager that manages a relational database, the manager having a number of operatively coupled component layers for performing functions required for accessing the relational database file records in response to user query statements, the number of component layers including a first component layer for generating output code used in executing the query statement in response to input representing an optimized form of the query statement and a number of lower component layers including at least a second lower component layer for performing predetermined functions required for executing the query statement, the method comprising the steps of:
-
(a) adding a row retrieval performance enhancing subroutine to a subroutine library included within the first component layer, the row retrieval performance enhancing subroutine being designed to execute a data record management function performed by a lower component layer substantially faster than if the function were executed by the number of lower component layers, and including code for determining conditions under which the particular subroutine is to be invoked during query execution time;
(b) including calls in the generated output code to the row retrieval enhancing subroutine in place of normally included calls to the lower component layer for inserting the row retrieval subroutine into the generated code; and
,(c) including logic within the row retrieval enhanced subroutine for determining if the row retrieval enhanced subroutine is to be invoked as a function of a particular characteristic of the type of row data being accessed. - View Dependent Claims (2, 3, 4, 5, 6, 7)
-
-
8. A data manager for managing a relational database, the manager having a number of operatively coupled component layers for performing functions required for accessing database file records of the relational database in response to user query statements, the number of component layers including a first component layer for generating output code used in executing the query statement in response to input representing an optimized form of the query statement and a number of lower component layers operatively coupled to the first component layer, to each other and to the relational database, the lower component layers including at least a second lower component layer for performing functions required for executing the query statement, the first component layer further including:
-
(a) a subroutine library including a row retrieval performance enhancing subroutine designed to execute functions performed by a lower component layer substantially faster than if the functions were executed by the lower component layer, the row retrieval subroutine including coded logic for determining conditions under the subroutine is to be executed based on the characteristics of the data being accessed;
(b) the generated output code being stored in memory and including calls to the row retrieval subroutine stored in the subroutine library in place of normally included calls to the lower component layer; and
,(c) the generated output code when accessed from memory during execution of the query invoking the row retrieval subroutine to perform the second lower layer functions based on the characteristics of the row data being retrieved resulting in increased performance. - View Dependent Claims (9, 10, 11, 12, 13)
-
-
14. An RDMS program product including a data manager for managing a relational database stored on a media as groups of program instructions, the instructions corresponding to a number of operatively coupled component layers for performing functions required for accessing database file records of the relational database in response to user query statements, the number of component layers including a first component layer for generating code used in executing the query statement in response to input representing an optimized form of the query statement and a number of lower component layers operatively coupled to the first component layer, to each other and to the relational database, the lower component layers including at least a second lower component layer for performing functions required for executing the query statement, the first component layer further including:
-
(a) a first group of instructions corresponding to a subroutine library that includes a row retrieval performance enhancing subroutine designed to execute functions performed by lower component layers substantially faster than if the functions were executed by the number of lower component layers, the row retrieval performance enhancing subroutine including code containing instructions for determining conditions under which the particular subroutine is to be executed;
(b) a second group of instructions corresponding to a code generation component for providing output code containing calls to the row retrieval performance enhancing subroutine in place of normally included calls to a lower component layer that inserts the row retrieval subroutine into the output code; and
,(c) another group of instructions included within the row retrieval subroutine for causing the execution of the row retrieval subroutine to perform the second lower layer functions based on the characteristics of row data being retrieved from the database resulting in increased performance.
-
-
15. A memory for storing a data manager for accessing data records of a relational database during the execution of a query, the memory comprising:
-
(a) first component layer for generating code used in executing the query statement in response to input representing an optimized form of the query statement and a number of lower component layers operatively coupled to the first component layer, to each other and to the relational database, the lower component layers including at least a second lower component layer for performing functions required for executing the query statement, the first component layer contained in the memory further including;
(1) a subroutine library including a row retrieval performance enhancing subroutine designed to execute functions performed by a lower component layer substantially faster than if the functions were executed by the lower component layer, the row retrieval performance enhancing subroutine including code for determining conditions under which the particular subroutine is to be invoked during a row retrieval operation;
(2) generated output code including calls to the row retrieval performance enhancing subroutine in place of normally included calls to the lower component layer for incorporating the row retrieval subroutine from the generated for execution of the query being processed; and
,(3) a memory area being assigned for storing the output code and for storing information defining the characteristic of the row data being retrieved, the output code accessed during execution of the query causing the row retrieval subroutine to be executed for performing the second lower layer functions as a function of the row data being retrieved so as to result in increased performance.
-
Specification