Patent ID: 9552392
Date: 2017-01-24
CPC Classifications: G06F

Claim:
1. A computer-implemented method of optimizing a nested database query that includes at least one inner sub-query, at least one outer subquery, one or more window functions in the at least one inner sub-query, and one or more filtering operations in the at least one outer sub-query, wherein evaluation of the inner and outer sub-queries requires construction of one or more intermediate tables, and wherein the computer-implemented method comprises: obtaining the nested database query for processing by a database system; evaluating the obtained nested database query by at least the following: obtaining a modified database query which is equivalent to the nested database query but is evaluated with intermediate tables that are reduced in size with respect to the one or more intermediate tables that are required to evaluate the database query in its original form and; evaluating the modified database query with the intermediate tables that are reduced in size with respect to the one or more intermediate tables that are required to evaluate the database query in its original form, in order to process that obtained nested database query.