| CPC G06F 16/24545 (2019.01) [G06F 11/3409 (2013.01); G06F 16/2456 (2019.01)] | 18 Claims |

|
1. A method of incorporating a bloom filter (BF) into cost-based bottom-up query optimization, performed by a database management system (DBMS), the method comprising:
receiving a query that includes a request to join at least two data tables, the at least two data tables including a first data table and a second data table;
determining whether to create one or more additional subplans for scan of the first data table that include application of the BF based on the second data table, based on a target information, wherein the target information includes semantic information of a join predicate between the at least two data tables, and wherein the target information further includes at least one of a filtering capacity represented by the join predicate corresponding to the join or a data amount of a data table associated with the join;
after the determining, generating one or more additional BF subplans for the scan of the first data table, wherein each BF subplan includes directives to:
create the BF based on the second data table; and
apply the BF to the first data table for filtering data of the first data table before the first data table is joined with another data table,
wherein each BF subplan includes a revised estimate of a number of rows and a cost for applying the BF such that the scan of the first data table includes at least two subplans, the at least two subplans include a BF subplan that includes the application of the BF, and a non-BF subplan that includes no BF;
submitting the at least two subplans to a cost-based bottom-up optimizer to obtain a target query plan, wherein the cost-based bottom-up optimizer considers the revised estimate of the number of rows and cost of the one or more additional BF subplans in comparison to non-BF subplans and arrive at the target query plan with a different join order, join method, or other operations had the BF subplan not been included; and
providing, as a response to the query, a set of data that is retrieved from a data retrieval system by executing the target query plan.
|