IP Library Granted Patent US 10,664,476
Granted Patent B2
US 10,664,476 · App. 15/352,131 · Granted May 26, 2020

Bushy joins to improve computer efficiency executing queries

Inventors: Rajkumar Sen (San Mateo, CA); Samir Jindel (San Francisco, CA); Jack Chen (Cambridge, MA)
Assignee: MemSQL, Inc.
G06F16/24544G06F16/245G06F16/24542G06F16/24557
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 10,664,476
App. No.
15/352,131
Granted
May 26, 2020
Kind
B2
Abstract

A received query is analyzed to provide a set of potential bushy tree operation plans that include the creation of one or more “sub-joins” that provide intermediate resultant “sub-tables”, and using these sub-tables as operands in the other predicates of the query. The received query is analyzed to identify “satellite” tables and “seed” tables. A satellite table is a table of the database that is filtered by a selective predicate, and is connected to only one other table in the database via at least one linking predicate, and a seed table is a table of the database that is connected to a satellite table and at least one other table. Multiple candidate operation plans are formulated as bushy trees that include a sub-join of each seed table and its connected satellite table. A least cost operation plan is selected for execution from among these candidate operation plans and the conventional least cost linear operation plan based on the costs associated with each operation plan.

Claims (47)

1. A method for improving performance of a computer system that executes queries related to a database, comprising:

receiving a first query that identifies a plurality of tables in the database, and a plurality of predicates that are to be applied to the tables to select particular records in the database;

estimating a first cost corresponding to the first query using a linear join operation plan,

analyzing the first query to identify one or more satellite tables, each satellite table being a table of the database that is filtered by a selective predicate in the first query, and is connected to only one other table in the database via at least one linking predicate of the first query;

identifying one or more seed tables, each seed table being a table of the database that is connected to a satellite table and at least one other table,

identifying a plurality of candidate operation plans corresponding to the first query, each candidate operation plan being a bushy tree join plan that includes a sub join of a corresponding seed table and its connected satellite table,

estimating a cost associated with each operation plan of the plurality of operation plans;

selecting a least-cost operation plan based on the first cost and the cost associated with each operation plan; and

executing the least-cost operation plan on the computer system in response to the receiving of the first query.

2. The method of claim 1 , wherein analyzing the first query includes building a join graph of the tables in the first query in which each table is a vertex, and each join predicate between a pair of the tables is an edge.

3. The method of claim 1 , wherein each sub-join of each seed table and its connected satellite table includes forming a sub-table corresponding to a join of the seed table and its connected satellite table, and the corresponding bushy join of the operation plan includes a join of the sub-table to a join of other tables of the plurality of tables.

4. The method of claim 3 , wherein the join of the other tables of the plurality of tables is a least cost linear join.

5. The method of claim 3 , wherein each sub-join is a least cost linear join.

6. The method of claim 1 , including identifying at least one sub-join of the seed table and its connected satellite table as another satellite table and including a cost of an operation plan that includes another sub-join of the at least one sub-join and another table of the plurality of tables.

7. A database access system, comprising:

a communication interface that receives a first query that identifies a plurality of tables in a database, and a plurality of predicates that are to be applied to the tables to select particular records in the database;

a processing system coupled to the communication interface that:

estimates a first cost corresponding to the first query using a linear join operation plan,

analyzes the first query to identify one or more satellite tables, each satellite table being a table of the database that is filtered by a selective predicate in the first query, and is connected to only one other table in the database via at least one linking predicate of the first query;

identifies one or more seed tables, each seed table being a table of the database that is connected to a satellite table and at least one other table,

identifies a plurality of candidate operation plans corresponding to the first query, each candidate operation plan being a bushy tree join plan that includes a sub-join of a corresponding seed table and its connected satellite table,

estimates a cost associated with each operation plan of the plurality of operation plans;

selects a least-cost operation plan based on the first cost and the cost associated with each operation plan; and

executes the least-cost operation plan on the computer system;

wherein the communication interface provides results of the execution of the least-cost operation plan by the processing system in response to the receiving of the first query.

8. The database access system of claim 7 , wherein the processing system analyzes the first query by building a join graph of the tables in the first query in which each table is a vertex, and each join predicate between a pair of the tables is an edge.

9. The database access system of claim 7 , wherein the processing system identifies each operation plan by forming a sub-table corresponding to a join of the seed table and its connected satellite table, and forming a join of the sub-table to a join of other tables of the plurality of tables.

10. The database access system of claim 9 , wherein the join of the other tables of the plurality of tables is a least cost linear join.

11. The database access system of claim 9 , wherein each sub join is a least cost linear join.

12. The database access system of claim 7 , wherein the processing system identifies at least one sub-join of the seed table and its connected satellite table as another satellite table and determines a cost of an operation plan that includes another sub-join of the at least one sub-join and another table of the plurality of tables.

13. The database access system of claim 7 , wherein the processing system comprises a server, and the communication interface couples the server to a network.

14. The database access system of claim 7 , wherein the processing system comprises a client device.

15. The database access system of claim 7 , including the database.

16. A non-transitory computer-readable medium that includes a program that, when executed by a processing system, causes the processing system to:

receive a first query that identifies a plurality of tables in the database, and a plurality of predicates that are to be applied to the tables to select particular records in the database;

estimate a first cost corresponding to the first query using a linear join operation plan,

analyze the first query to identify one or more satellite tables, each satellite table being a table of the database that is filtered by a selective predicate in the first query, and is connected to only one other table in the database via at least one linking predicate of the first query;

identify one or more seed tables, each seed table being a table of the database that is connected to a satellite table and at least one other table,

identify a plurality of candidate operation plans corresponding to the first query, each candidate operation plan being a bushy tree join plan that includes a sub join of a corresponding seed table and its connected satellite table,

estimate a cost associated with each operation plan of the plurality of operation plans;

select a least-cost operation plan based on the first cost and the cost associated with each operation plan; and

execute the least-cost operation plan on the computer system in response to the receiving of the first query.

17. The medium of claim 16 , wherein the program causes the processing system to analyze the first query by a process that includes building a join graph of the tables in the first query in which each table is a vertex, and each join predicate between a pair of the tables is an edge.

18. The medium of claim 16 , wherein each sub-join of each seed table and its connected satellite table includes forming a sub-table corresponding to a join of the seed table and its connected satellite table, and the corresponding bushy join of the operation plan includes a join of the sub-table to a join of other tables of the plurality of tables.

19. The medium of claim 18 , wherein the join of the other tables of the plurality of tables is a least cost linear join.

20. The medium of claim 18 , wherein each sub-join is a least cost linear join.

21. The medium of claim 16 , wherein the program also causes the processing system to identify at least one sub-join of the seed table and its connected satellite table as another satellite table and determine a cost of an operation plan that includes another sub-join of the at least one sub-join and another table of the plurality of tables.

Assignments (9)
PATENT SECURITY AGREEMENT Recorded Oct 20, 2025
From: SINGLESTORE, INC.
To: MONROE CAPITAL MANAGEMENT ADVISORS, LLC, AS AGENT
Reel/Frame 073122/0161 →
RELEASE OF SECURITY INTEREST Recorded Oct 9, 2025
From: SILICON VALLEY BANK
To: SINGLESTORE, INC.
Reel/Frame 072524/0652 →
SECURITY INTEREST Recorded Jul 9, 2021
From: SINGLESTORE, INC.
To: SILICON VALLEY BANK
Reel/Frame 056805/0312 →
RELEASE OF SECURITY INTEREST Recorded Jun 30, 2021
From: HERCULES CAPITAL, INC.
To: SINGLESTORE, INC.; MEMSQL USG, INC.
Reel/Frame 056723/0449 →
CHANGE OF NAME Recorded Nov 13, 2020
From: MEMSQL, INC.
To: SINGLESTORE, INC.
Reel/Frame 054414/0655 →
RELEASE OF SECURITY INTEREST Recorded Apr 29, 2020
From: SILICON VALLEY BANK, AS AGENT
To: MEMSQL, INC.
Reel/Frame 052528/0577 →
INTELLECTUAL PROPERTY SECURITY AGREEMENT Recorded Apr 29, 2020
From: MEMSQL, INC.
To: HERCULES CAPITAL, INC., AS COLLATERAL AND ADMINISTRATIVE AGENT
Reel/Frame 052523/0977 →
SECURITY INTEREST Recorded Oct 17, 2019
From: MEMSQL, INC.
To: SILICON VALLEY BANK
Reel/Frame 050754/0688 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Nov 15, 2016
From: SEN, RAJKUMAR; JINDEL, SAMIR; CHEN, JACK
To: MEMSQL, INC.
Reel/Frame 040329/0469 →
Continuity (2)
Provisional Application 62258086 · Nov 20, 2016
Related Publication 20170147647A1 · May 25, 2017