US 11,874,834 B2
Determining dimension tables for star schema joins
Shine Mathew, Karnataka (IN); Ashish Dange, Karnataka (IN); Harsh Singh, Karnataka (IN); and Javeed Pasha, Karnataka (IN)
Assigned to Hewlett Packard Enterprise Development LP, Spring, TX (US)
Filed by HEWLETT PACKARD ENTERPRISE DEVELOPMENT LP, Houston, TX (US)
Filed on Jan. 31, 2022, as Appl. No. 17/588,543.
Prior Publication US 2023/0244666 A1, Aug. 3, 2023
Int. Cl. G06F 16/245 (2019.01); G06F 16/2453 (2019.01); G06F 16/2455 (2019.01)
CPC G06F 16/24544 (2019.01) [G06F 16/2456 (2019.01)] 20 Claims
OG exemplary drawing
 
1. A computer-implemented method comprising:
accessing, by a computer, a star schema-based query associated with joining a fact table with a plurality of dimension tables in a database, wherein the fact table comprises a primary key comprising a set of columns covered by the plurality of dimension tables; and
generating, by the computer, a query plan for processing the query, wherein the query plan has an associated join order and the generating of the query plan comprises:
determining a plurality of sets of the plurality of dimension tables, wherein each set of the plurality of sets comprises dimension tables that cover the set of columns in the primary key;
evaluating costs associated with joining subsets of the plurality of sets with the fact table; and
based on the costs, selecting a given subset of dimensional tables of the plurality of subsets with a lowest cost;
constraining, by the computer, the associated join order based on the given subset by placing the given subset before the fact table in the query plan; and
executing, by the computer, the query plan to access the database, wherein the query plan comprises joining the dimension tables in the given subset to generate a result set before joining the result set with the fact table and then joining the remaining dimension tables in the plurality of dimension tables with the fact table.