Browse Prior Art Database

A Method for Describing Static SQL Statements at Execution Time Disclosure Number: IPCOM000014855D
Original Publication Date: 2000-Dec-01
Included in the Prior Art Database: 2003-Jun-20

Publishing Venue



This disclosure shows a method to support SQL DESCRIBE requests for static SQL statements at execution time and how the results of these requests can be cached, if such facilities exist, in order to speed up future DESCRIBE requests for the same statement. This method allows for ad hoc DESCRIBE requests on any static SQL statement without any setup or coordination prior to execution while keeping the system overhead to a minimum. With the addition of a caching capability, the impact of requesting describe information for static SQL statements is further minimized. An SQL DESCRIBE request returns detailed information, referred to as describe information, on the output of an SQL statement such as the column names and column data types of the result set. Traditionally, this information is not available for static SQL statements due to the excessive catalog storage requirements required to contain the describe information. By providing the capability to DESCRIBE static SQL statements at execution time, the describe information does not have to be collected at compilation time and stored in the system catalogs. This latter action significantly increases the size of the system catalogs since it is not known at compilation time which static SQL statements will need to be described in the future so describe information must be collected for all static SQL statements. The method outlined in this disclosure only provides describe information for those static SQL statements for which it has been specifically requested. The implementation of this disclosure is based upon an extension of existing DESCRIBE processing for dynamic SQL statements and the introduction of a new mode for the SQL Compiler. When a DESCRIBE request for a static SQL statement is received, the following processing will occur: Look in the cache (if available) for an existing set of describe information for the specified package and section entry combination which represents the static SQL statement to be described. If there is no cached entry for the specified statement