Apparatus and method for reducing data returned for a database query using select list processing
AssigneeInternational Business Machines Corporation
InventorJohn Santosuosso
Life of this patent
Estimating the term…
Abstract
The select statement of a query is processed to determine whether any of the columns in the select statement appear in the predicate of the query. For each column in the select statement that also appears in the predicate of the query, the column may be eliminated from the result set by writing the value for the column in a side data structure. In this manner, the amount of data returned in the result set is reduced, thereby enhancing system performance in running the query.
Claims20
An apparatus comprising:
- at least one processor;
- a memory coupled to the at least one processor;
- a database query residing in the memory and executed by the at least one processor, the database query including a select list and a predicate;
- and
- a select list processing mechanism residing in the memory and executed by the at least one processor, the select list processing mechanism processing the select list in the database query to determine whether the select list references a column referenced in the predicate, and if so, the select list processing mechanism not including the column in a corresponding result set table.
A computer-implemented method for processing a database query that includes a select list and a predicate, the method comprising the steps of:
- (A) processing the select list in the database query to determine whether the select list references a column referenced in the predicate;
- and
- (B) if the select list references a column referenced in the predicate, not including the column in a corresponding result set table.
A program product comprising:
- (A) a select list processing mechanism that processes a select list in a database query to determine whether the select list references a column referenced in the predicate, and if so, the select list processing mechanism not including the column in a corresponding result set table;
- and
- (B) tangible computer-readable signal bearing media bearing the select list processing mechanism.
Dependencies are inferred from the claim text.