IP Library › Granted Patent US 12,737,359
Granted Patent B2
US 12,737,359 · App. 19/014,844 · Granted Sep 15, 2026

Generating an optimized join tree for execution of a plurality of join operations via a database system

Inventors: Knut Stolze (Jena, DE); Jason Arnold (Chicago, IL)
Assignee: Ocient Holdings LLC
G06F16/24544G06F16/24537
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12,737,359
App. No.
19/014,844
Granted
Sep 15, 2026
Kind
B2
Abstract

A database system is operable to generating a query operator execution flow that includes an optimized join tree implementing a plurality of join operations applied to a plurality of input row sets based on: identifying a set of filter predicates indicated by the query expression and generating, based on the plurality of input row sets and the set of filter predicates, cardinality data for each of the plurality of input row sets. The optimized join tree is generated based on generating the optimized join tree based on selecting an ordering for applying the plurality of join operations to the plurality of input row sets based on the cardinality data for the each of the plurality of input row sets. The query operator execution flow is executed in conjunction with executing the query expression based on executing the plurality of join operators of the optimized join tree.

Claims (74)

1 . A query and response sub-system of a database system comprises:

a plurality of computing device clusters, wherein a computing device cluster of the plurality of computing device clusters includes a plurality of computing devices, wherein a computing device of the plurality of computing devices includes a plurality of computing nodes, wherein a computing node of the plurality of computing nodes includes a plurality of processing core resources, wherein a set of processing core resources of the pluralities of processing core resources is operable to optimize memory usage during query execution by:

obtaining an initial query that includes a plurality of join operations involving a plurality of tables, wherein the plurality of join operations has an initial organizational structure of execution;

determining a plurality of cardinality values for the plurality of tables, wherein a first cardinality value of the plurality of cardinality values is regarding a first number of rows of a first table of the plurality of tables to be included in a join operation of the plurality of join operations;

determining an initial cumulative cardinality value for the initial organizational structure of execution of the plurality of join operations based on the plurality of cardinality values;

when the initial cumulative cardinality value compares favorably to an output cardinality threshold:

utilizing the initial organizational structure of execution in an optimized query plan; and

when the initial cumulative cardinality value compares unfavorably to the output cardinality threshold:

utilizing an optimized organizational structure of execution of the plurality of join operations in the optimized query plan.

2 . The query and response sub-system of claim 1 , wherein the set of processing core resources further determine the plurality of cardinality values based on:

metadata of the plurality of tables previously collected by the database system.

3 . The query and response sub-system of claim 1 , wherein the set of processing core resources is further operable to:

assign a plurality of join ID's to the plurality of tables, wherein a join ID of the plurality of join ID's is assigned to a table of the plurality of tables; and

store the plurality of table join ID's in distributed memory resources of the database system.

4 . The query and response sub-system of claim 1 , wherein the set of processing core resources is further operable to:

record the initial organizational structure of execution in metadata; and

access the recorded metadata to determine the optimized organizational structure of execution.

5 . The query and response sub-system of claim 1 , wherein the set of processing core resources is further operable to obtain the initial query by one of:

receiving the initial query;

generating the initial query; and

looking up the initial query from a plurality of stored queries in distributed memory resources of the database system.

6 . The query and response sub-system of claim 1 , wherein the set of processing core resources is further operable to determine the plurality of cardinality values by:

when the query indicates a filter to be applied to a table of the plurality of tables:

applying the filter to a number of rows of the table to produce filtered rows of the table; and

determining a cardinality value for the table based on the filtered rows.

7 . The query and response sub-system of claim 1 , wherein the set of processing core resources is further operable to determine the initial cumulative cardinality value based on:

a cumulative of cardinality values of the plurality of tables of the initial organizational structure of execution.

8 . The query and response sub-system of claim 1 , wherein the set of processing core resources is further operable to determine the initial cumulative cardinality value based on:

a cumulative of cardinality values of the plurality of tables of a layer of a plurality of layers of the initial organizational structure of execution.

9 . The query and response sub-system of claim 1 , wherein the set of processing core resources are further operable to:

create a plurality of alternative organizational structures of execution; and

selecting the most favorable alternative organizational structure of execution of the plurality of alternative organizational structures of execution based on the cardinality value of the plurality of tables.

10 . The query and response sub-system of claim 1 , wherein the set of processing core resources is further operable to:

create an alternative organizational structure of execution;

determine cardinality values of the plurality of tables of the alternative organizational structure of execution; and

when the cardinality values of the plurality of tables of the alternative organizational structure of execution compares favorably to the output cardinality threshold:

utilize the alternative organizational structure of execution of the plurality of join operations in the optimized query plan.

11 . A computer-readable memory comprises:

a first memory section that stores operational instructions that, when executed by a set of processing core resources of pluralities of processing core resources of a query and response sub-system of a database system to optimize memory usage during query execution, causes the set of processing core resources to:

obtain an initial query that includes a plurality of join operations involving a plurality of tables, wherein the plurality of join operations has an initial organizational structure of execution;

determine a plurality of cardinality values for the plurality of tables, wherein a first cardinality value of the plurality of cardinality values is regarding a first number of rows of a first table of the plurality of tables to be included in a join operation of the plurality of join operations;

determine an initial cumulative cardinality value for the initial organizational structure of execution of the plurality of join operations based on the plurality of cardinality values;

when the initial cumulative cardinality value compares favorably to an output cardinality threshold:

utilize the initial organizational structure of execution in an optimized query plan; and

when the initial cumulative cardinality value compares unfavorably to the output cardinality threshold:

utilize an optimized organizational structure of execution of the plurality of join operations in the optimized query plan.

12 . The computer-readable memory of claim 11 , wherein the first memory section further stores operational instructions that, when executed by the set of processing core resources, causes the set of processing core resources to:

determine the plurality of cardinality values based on metadata of the plurality of tables previously collected by the database system.

13 . The computer-readable memory of claim 11 , wherein the first memory section further stores operational instructions that, when executed by the set of processing core resources, causes the set of processing core resources to:

assign a plurality of table join ID's to the plurality of tables, wherein a join ID of the plurality of join ID's is assigned to a table of the plurality of tables; and

store the plurality of table join ID's in distributed memory resources of the database system.

14 . The computer-readable memory of claim 11 , wherein the first memory section further stores operational instructions that, when executed by the set of processing core resources, causes the set of processing core resources to:

record the initial organizational structure of execution in metadata; and

access the recorded metadata to determine the optimized organizational structure of execution.

15 . The computer-readable memory of claim 11 , wherein the first memory section further stores operational instructions that, when executed by the set of processing core resources, causes the set of processing core resources to obtain the initial query by one of:

receiving the initial query;

generating the initial query; and

looking up the initial query from a plurality of stored queries in distributed memory resources of the database system.

16 . The computer-readable memory of claim 11 , wherein the first memory section further stores operational instructions that, when executed by the set of processing core resources, causes the set of processing core resources to further determine the plurality of cardinality values by:

when the query indicates a filter to be applied to a table of the plurality of tables:

applying the filter to a number of rows of the table to produce filtered rows of the table; and

determine a cardinality value for the table based on the filtered rows.

17 . The computer-readable memory of claim 11 , wherein the first memory section further stores operational instructions that, when executed by the set of processing core resources, causes the set of processing core resources to further determine the initial cumulative cardinality value based on:

a cumulative of cardinality values of the plurality of tables of the initial organizational structure of execution.

18 . The computer-readable memory of claim 11 , wherein the first memory section further stores operational instructions that, when executed by the set of processing core resources, causes the set of processing core resources to further determine the initial cumulative cardinality value based on:

a cumulative of cardinality values of the plurality of tables of a layer of a plurality of layers of the initial organizational structure of execution.

19 . The computer-readable memory of claim 11 , wherein the first memory section further stores operational instructions that, when executed by the set of processing core resources, causes the set of processing core resources to:

create a plurality of alternative organizational structures of execution; and

select the most favorable alternative organizational structure of execution of the plurality of alternative organizational structures of execution based on the cardinality value of the plurality of tables.

20 . The computer-readable memory of claim 11 , wherein the first memory section further stores operational instructions that, when executed by the set of processing core resources, causes the set of processing core resources to:

create an alternative organizational structure of execution;

determine cardinality values of the plurality of tables of the alternative organizational structure of execution; and

when the cardinality values of the plurality of tables of the alternative organizational structure of execution compares favorably to the output cardinality threshold:

utilize the alternative organizational structure of execution of the plurality of join operations in the optimized query plan.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jan 9, 2025
From: STOLZE, KNUT; ARNOLD, JASON
To: OCIENT HOLDINGS LLC
Reel/Frame 069803/0416 →
Continuity (2)
Provisional Application 63714297 · Oct 31, 2024
Related Publication 20260119495A1 · Apr 30, 2026
References Cited (65)
US 5548770A · Bridges · 1996 [cited by applicant]
US 6230200B1 · Forecast · 2001 [cited by applicant]
US 6633772B2 · Ford · 2003 [cited by applicant]
US 7499907B2 · Brown · 2009 [cited by applicant]
US 7908242B1 · Achanta · 2011 [cited by applicant]
US 11074261B1 · Pandis · 2021 [cited by examiner]
US 12117986B1 · Veselova · 2024 [cited by applicant]
US 20010051949A1 · Carey · 2001 [cited by applicant]
US 20020032676A1 · Reiner · 2002 [cited by applicant]
US 20040162853A1 · Brodersen · 2004 [cited by applicant]
US 20080133456A1 · Richards · 2008 [cited by applicant]
US 20090063893A1 · Bagepalli · 2009 [cited by applicant]
US 20090183167A1 · Kupferschmidt · 2009 [cited by applicant]
US 20100082577A1 · Mirchandani · 2010 [cited by applicant]
US 20100241646A1 · Friedman · 2010 [cited by applicant]
US 20100274983A1 · Murphy · 2010 [cited by applicant]
US 20100312756A1 · Zhang · 2010 [cited by applicant]
US 20110219169A1 · Zhang · 2011 [cited by applicant]
US 20120109888A1 · Zhang · 2012 [cited by applicant]
US 20120151118A1 · Flynn · 2012 [cited by applicant]
US 20120185866A1 · Couvee · 2012 [cited by applicant]
US 20120254252A1 · Jin · 2012 [cited by applicant]
US 20120311246A1 · Mcwilliams · 2012 [cited by applicant]
US 20130332484A1 · Gajic · 2013 [cited by applicant]
US 20140047095A1 · Breternitz · 2014 [cited by applicant]
US 20140136510A1 · Parkkinen · 2014 [cited by applicant]
US 20140188841A1 · Sun · 2014 [cited by applicant]
US 20150205607A1 · Lindholm · 2015 [cited by applicant]
US 20150244804A1 · Warfield · 2015 [cited by applicant]
US 20150248366A1 · Bergsten · 2015 [cited by applicant]
US 20150293966A1 · Cai · 2015 [cited by applicant]
US 20150310045A1 · Konik · 2015 [cited by applicant]
US 20160034547A1 · Lerios · 2016 [cited by applicant]
US 20200117649A1 · Arnold · 2020 [cited by applicant]
US 20210240713A1 · Kondiles · 2021 [cited by applicant]
US 20210311943A1 · Kondiles · 2021 [cited by examiner]
US 20220043690A1 · Kondiles · 2022 [cited by applicant]
US 20220043755A1 · Kondiles · 2022 [cited by applicant]
US 20220043787A1 · Kondiles · 2022 [cited by applicant]
US 20220382751A1 · Dhuse · 2022 [cited by applicant]
US 20230107652A1 · Veselova · 2023 [cited by applicant]
US 20230385277A1 · Schmidt · 2023 [cited by applicant]
US 20230385278A1 · Bove · 2023 [cited by applicant]
US 20240004882A1 · Bove · 2024 [cited by applicant]
US 20240134858A1 · Schieferstein · 2024 [cited by applicant]
US 20240143595A1 · Bove · 2024 [cited by applicant]
A new high performance fabric for HPC, Michael Feldman, May 2016, Intersect360 Research. [cited by applicant]
Alechina, N. (2006-2007). B-Trees. School of Computer Science, University of Nottingham, http://www.cs.nott.ac.uk/~psznza/G5BADS06/lecture13-print.pdf. 41 pages. [cited by applicant]
Allam, Evaluation of a greedy join-order optimization approach using the IMDB dataset, Master Thesis, Aug. 23, 2018, 79 pages. [cited by applicant]
Amazon DynamoDB: ten things you really should know, Nov. 13, 2015, Chandan Patra, http://cloudacademy. .com/blog/amazon-dynamodb-ten-thing. [cited by applicant]
An Inside Look at Google BigQuery, by Kazunori Sato, Solutions Architect, Cloud Solutions team, Google Inc., 2012. [cited by applicant]
Big Table, a NoSQL massively parallel table, Paul Krzyzanowski, Nov. 2011, https://www.cs.rutgers.edu/pxk/417/notes/contentlbigtable.html. [cited by applicant]
Distributed Systems, Fall2012, Mohsen Taheriyan, http://www-scf.usc.edu/-csci57212011Spring/presentations/Taheriyan.pptx. [cited by applicant]
International Searching Authority; International Search Report and Written Opinion; International Application No. PCT/US2017/054773; Feb. 13, 2018; 17 pgs. [cited by applicant]
International Searching Authority; International Search Report and Written Opinion; International Application No. PCT/US2017/054784; Dec. 28, 2017; 10 pgs. [cited by applicant]
International Searching Authority; International Search Report and Written Opinion; International Application No. PCT/US2017/066145; Mar. 5, 2018; 13 pgs. [cited by applicant]
International Searching Authority; International Search Report and Written Opinion; International Application No. PCT/US2017/066169; Mar. 6, 2018; 15 pgs. [cited by applicant]
International Searching Authority; International Search Report and Written Opinion; International Application No. PCT/US2018/025729; Jun. 27, 2018; 9 pgs. [cited by applicant]
International Searching Authority; International Search Report and Written Opinion; International Application No. PCT/US2018/034859; Oct. 30, 2018; 8 pgs. [cited by applicant]
MapReduce: Simplified Data Processing on Large Clusters, OSDI 2004, Jeffrey Dean and Sanjay Ghemawat, Google, Inc., 13 pgs. [cited by applicant]
Moerkotte, et al., Dynamic Programming Strikes Back, SIGMOD,08, Vancouver, BC, Canada, Jun. 9-12, 2008, 14 pages. [cited by applicant]
Neumann et al., Adaptive Optimization of Very Large Join Queries, Proceedings of 2018 International Conference on Management of Data, Houston, TX (SIGMOD'18), USA, Jun. 10-15, 2018, 16 pages. [cited by applicant]
Neumann, Query Optimization, https://db.in.tum.de/teaching/ws2324/queryopt/main.pdf?lang=en, retrieved from the internet Oct. 2, 2024, 695 pages. [cited by applicant]
Rodero-Merino, L.; Storage of Structured Data: Big Table and HBase, New Trends in Distributed Systems, MSc Software and Systems, Distributed Systems Laboratory; Oct. 17, 2012; 24 pages. [cited by applicant]
Step 2: Examine the data model and implementation details, 2016, Amazon Web Services, Inc., http://docs.aws.amazon.com/amazondynamodb/latestldeveloperguide!Ti . . . . [cited by applicant]