CPC G06F 16/24535 (2019.01) [G06F 16/24537 (2019.01)] | 24 Claims |
1. A computer-executed method, comprising:
a database management system transforming a query to produce a transformed query;
wherein the query includes a plurality of subqueries;
wherein said transforming the query comprises:
determining whether a pair of set operation-based subqueries, of the plurality of subqueries, satisfies join-and-set-operation-based containment criteria at least by:
identifying one or more tables that are not common among the pair of set operation-based subqueries as uncommon one or more tables;
determining the uncommon one or more tables are referenced in a particular subquery of the pair of set operation-based subqueries and are not referenced in any other subquery of the pair of set operation-based subqueries thereby determining a contained subquery and a container subquery of the pair of set operation-based subqueries; and
in response to determining that the uncommon one or more tables are referenced in the particular subquery of the pair of set operation-based subqueries and are not referenced in any other subquery of the pair of set operation-based subqueries, determining that the pair of set operation-based subqueries, satisfies the join-and-set-operation-based containment criteria;
in response to the database management system determining that the pair of set operation-based subqueries, of the plurality of subqueries, satisfies the join-and-set-operation-based containment criteria, performing subquery removal,
wherein the pair of set operation-based subqueries comprises the contained subquery and the container subquery, and
wherein said performing the subquery removal comprises eliminating one or more of the pair of set operation-based subqueries; and
executing the transformed query;
wherein the method is performed by one or more computing devices.
|