Cost-based subquery correlation and decorrelation
First Claim
Patent Images
1. A method for processing a query, comprising:
- determining that the query includes at least one subquery that is to be correlated or decorrelated; and
generating an internal representation of the query that represents the subquery in both correlated and decorrelated form, wherein the internal representation includes at least one virtual table, and the query includes an outer table, and wherein the internal representation represents the query using one or more query blocks and further comprising;
selecting a bottom-most query block;
determining correlated costs of the query block in response to determining that correlated costs are to be determined; and
determining non-correlated costs of the query block in response to determining that non-correlated costs are to be determined, wherein the determining of non-correlated costs further comprises;
joining the virtual table in decorrelated form to the outer table; and
joining the outer table to the virtual table in decorrelated form.
2 Assignments
0 Petitions
Accused Products
Abstract
Techniques are provided that determine that a query includes at least one subquery that may be correlated or decorrelated. An internal representation of the query that represents the subquery in both correlated and decorrelated form is generated, wherein the internal representation includes at least one virtual table.
-
Citations
8 Claims
-
1. A method for processing a query, comprising:
-
determining that the query includes at least one subquery that is to be correlated or decorrelated; and generating an internal representation of the query that represents the subquery in both correlated and decorrelated form, wherein the internal representation includes at least one virtual table, and the query includes an outer table, and wherein the internal representation represents the query using one or more query blocks and further comprising; selecting a bottom-most query block; determining correlated costs of the query block in response to determining that correlated costs are to be determined; and determining non-correlated costs of the query block in response to determining that non-correlated costs are to be determined, wherein the determining of non-correlated costs further comprises; joining the virtual table in decorrelated form to the outer table; and joining the outer table to the virtual table in decorrelated form. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8)
-
Specification