Method and system for using dynamically generated code to perform index record retrieval in certain circumstances 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, the method comprising the steps of:
- (a) adding an index processing performance enhancing subroutine to a subroutine library included within the first component layer, the index processing performance enhancing subroutine being designed to execute index processing functions performed by lower component layers substantially faster than if the function were executed by the 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 index processing enhancing subroutine in place of normally included calls to the lower component layers for inserting the index processing enhancing subroutine into the generated code; and
, (c) including logic within the index processing enhancing subroutine for determining if the index processing enhancing subroutine can be reliably invoked based on a predetermined set of conditions.
1 Assignment
0 Petitions
Accused Products
Abstract
A system and method that enhances the index processing performance of a multi-layer relational database manager by expanding the code generation component layer of the database manager to include an index processing performance enhancing subroutine designed to execute functions performed by lower component layers substantially faster than if the functions were executed by such lower component layers. 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 index processing 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.
-
Citations
18 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, the method comprising the steps of:
-
(a) adding an index processing performance enhancing subroutine to a subroutine library included within the first component layer, the index processing performance enhancing subroutine being designed to execute index processing functions performed by lower component layers substantially faster than if the function were executed by the 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 index processing enhancing subroutine in place of normally included calls to the lower component layers for inserting the index processing enhancing subroutine into the generated code; and
,(c) including logic within the index processing enhancing subroutine for determining if the index processing enhancing subroutine can be reliably invoked based on a predetermined set of conditions. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9)
-
-
10. 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, the first component layer further including:
-
(a) a subroutine library including an index processing performance enhancing subroutine designed to execute functions performed by lower component layers substantially faster than if the functions were executed by the lower component layers, the index processing subroutine including coded logic for determining conditions under which the subroutine is to be executed;
(b) the generated output code being stored in memory and including calls to the index processing subroutine stored in the subroutine library in place of normally included calls to a prior index processing subroutine that unconditionally invoked lower component layers; and
,(c) the generated output code when accessed from memory during execution of the query invoking the index processing subroutine to perform the lower layer functions. - View Dependent Claims (11, 12, 13, 14, 15, 16)
-
-
17. 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 first component layer further including:
-
(a) a first group of instructions corresponding to a subroutine library that includes an index processing 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 index processing 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 index processing performance enhancing subroutine in place of normally included calls to lower component layers that inserts the index processing subroutine into the output code; and
,(c) another group of instructions included within the index processing subroutine for causing the execution of the index processing subroutine to perform the second lower layer functions based on a particular set of conditions resulting in increased performance.
-
-
18. 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, the first component layer contained in the memory further including;
(1) a subroutine library including an index processing performance enhancing subroutine designed to execute functions performed by lower component layers substantially faster than if the functions were executed by the lower component layers, the row retrieval performance enhancing subroutine including code for determining conditions under which the particular subroutine is to be invoked during index processing;
(2) generated output code including calls to the index processing performance enhancing subroutine in place of normally included calls to the lower component layers for incorporating the index processing subroutine into the generated output code for execution of the query being processed; and
,(3) a memory area being assigned for storing the output code, the output code accessed during execution of the query causing the index processing subroutine to be executed for performing the lower layer functions as a function of a particular set of conditions so as to result in increased performance.
-
Specification