摘要:
Techniques are provided for supporting versions of a routine. A first version of the routine is created. A second version of the routine is generated in response to receiving an alter statement including an add version clause. The second version of the routine is activated in response to receiving an alter statement including an activate version clause.
摘要:
An SQL procedure deployment system deploys a query procedure comprising a procedural logic component and a database request component from a source system to a target system. At generation of the query procedure, the system generates a query procedure source code, a symbol table, and an encapsulated optimization results to regenerate run-time instructions for query statements of the database request component and make the query statements function with a deployed procedural logic component. The system maintains an association between the procedural logic component and the database request component during deployment. The system copies an internal representation of the procedural logic component to the target system without regeneration. The system regenerates the database request component to recreate the query procedure on the target system and to maintain a consistent interface between the procedural logic component and database request component.
摘要:
A method and system for using a procedure residing and executed entirely within a database system is disclosed. The procedure utilizes at least one variable, which has a plurality of attributes. The method and system include defining the at least one variable as at least one global variable prior to calling of the procedure. Defining the global variable(s) includes informing the database system of the plurality of attributes of the variable(s) and allowing the database system access to the at least one variable. The method and system also include tracking the global variable(s).
摘要:
A method, apparatus, and article of manufacture for optimizing a query in a computer system, wherein the query is performed by the computer system to retrieve data from a database stored on the computer system. The optimization includes: (a) combining join predicates from a query with local predicates from each branch of one or more UNION ALL views referenced by the query; (b) analyzing the combined predicates; and (c) not generating the join when the analysis step indicates that the combined predicates lead to an empty result.
摘要:
A method for generating an execution plan for updating and retrieving data from a database in a single process includes: receiving a statement by a server to update a database with a first set of data and to retrieve a second set of data from the database; building a first execution plan to update the database with the first set of data; building a second execution plan to retrieve the second set of data from the database; and building a single execution plan including a combination of the first and second execution plans. The single execution plan allows for the updating and retrieval of data with a single crossing of an interface between a client and the database. By performing both functions in this manner, the efficiency of performing such tasks on the database is significantly increased.
摘要:
A method, apparatus, and article of manufacture for optimizing a query in a computer system, wherein the query is performed by the computer system to retrieve data from a database stored on the computer system. The optimization is performed by identifying a correlated subquery in the query that qualifies for transformation, transitively closing a local filtering predicate within the identified correlated subquery that is on a same column as a correlation join predicate within the identified correlated subquery, and pulling out or bubbling up the transitively closed predicate from the correlated subquery to a parent query block of the query.