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.