Splitting of a join operation to allow parallelization
AssigneeSybase, Inc.
InventorsXun Cheng, Peter Schneider
Life of this patent
Estimating the term…
Abstract
A system and method for processing a database query is described. In response to detection that a database query involves a star or snowflake join operation, a join operator in a preliminary query plan can be split into a build operator and a probe operator. The probe operator can be placed in a final query plan in the same place as the join operator in the preliminary query plan, while the build operator can be placed beneath the probe operator in the final query plan, between an exchange operator and the exchange operator's child from the preliminary query plan.
Claims20
A method for optimizing a database query, comprising:
- accessing a fact table and a plurality of dimension tables referenced by the database query;
- creating a preliminary query plan based on the database query;
- detecting that the database query involves a star join or snowflake join operation using the fact table and the plurality of dimension tables;
- in response to detecting that the database query involves a star join or snowflake join operation:
- splitting a join operator in the preliminary query plan into a build operator and a probe operator;
- placing the probe operator in a final query plan in a same place as the join operator in the preliminary query plan;
- and
- placing the build operator beneath the probe operator in the final query plan.
A system comprising:
- at least one processor;
- memory to store instructions that, when executed by the at least one processor cause the at least one processor to perform operations comprising:
- parsing a database query;
- normalizing the parsed database query;
- creating a preliminary query plan for the database query;
- detecting that the database query involves a star or snowflake join operation using a determined fact table and a plurality of dimension tables referenced by the database query;
- and
- in response to detection that the database query involves a star or snowflake join operation:
- splitting a join operator in the preliminary query plan into a build operator and a probe operator;
- placing the probe operator in a final query plan in the same place as the join operator in the preliminary query plan;
- and
- placing the build operator beneath the probe operator in the final query plan, between an exchange operator and the exchange operator's child from the preliminary query plan.
A non-transitory machine-readable storage medium comprising instructions, which when implemented by one or more machines, cause the one or more machines to perform operations comprising:
- accessing a fact table and a plurality of dimension tables referenced by the database query;
- creating a preliminary query plan based on the database query;
- detecting that the database query involves a star or snowflake join operation using the determined fact table and plurality of dimension tables;
- in response to detection that the database query involves a star or snowflake join operation:
- splitting a join operator in the preliminary query plan into a build operator and a probe operator;
- placing the probe operator in a final query plan in the same place as the join operator in the preliminary query plan;
- and
- placing the build operator beneath the probe operator in the final query plan.
Dependencies are inferred from the claim text.