Deferred compilation of stored procedures
AssigneeSybase, Inc.
InventorAndrzej Sarapuk
Life of this patent
Estimating the term…
Abstract
A system, method, and computer program product are provided for compiling a stored procedure in a database. The compiling includes the steps of invoking the stored procedure, the stored procedure comprising one or more statements, substituting run-time values for one or more variables in the statements, and creating an access plan for the statements having the substituted run-time values.
Claims15
A method comprising:
- invoking a stored procedure in a database, the stored procedure comprising one or more uncompiled database query statements marked for deferred compilation until the stored procedure is invoked at run-time, wherein at least one of the uncompiled database query statements includes one or more variables, and wherein statements marked for deferred compilation are selected for marking based on deferred compilation criteria;
- substituting, at run-time, run-time values for the one or more variables in the statements;
- and
- creating, at run-time, an access plan for the statements, wherein the access plan accounts for the statements having the substituted run-time values.
A system comprising:
- a memory configured to store modules comprising:
- an invoking module to invoke a stored procedure in a database, the stored procedure comprising one or more uncompiled database query statements marked for deferred compilation until the stored procedure is invoked at run-time, wherein at least one of the uncompiled database query statements includes one or more variables, and wherein statements marked for deferred compilation are selected for marking based on deferred compilation criteria,
- a substituting module to substitute, at run-time, run-time values for one or more variables in the statements, and
- creating, at run-time, an access plan for the statements, wherein the access plan accounts for the statements having the substituted run-time values;
- and
- one or more processors configured to process the modules.
A computer-usable medium having computer-executable instructions stored thereon for compiling a stored procedure in a database, execution of which, by a computing device, causes the computing device to perform operations comprising:
- invoking the stored procedure, the stored procedure comprising one or more uncompiled database query statements marked for deferred compilation until the stored procedure is invoked at run-time, wherein at least one of the uncompiled database query statements includes one or more variables, and wherein statements marked for deferred compilation are selected for marking based on deferred compilation criteria;
- substituting, at run-time, run-time values for one or more variables in the statements;
- and
- creating, at run-time, an access plan for the statements, wherein the access plan accounts for the statements having the substituted run-time values.
Dependencies are inferred from the claim text.