IP Library Granted Patent US 11,704,316
Granted Patent B2
US 11,704,316 · App. 16/520,868 · Granted Jul 18, 2023

Systems and methods for determining peak memory requirements in SQL processing engines with concurrent subtasks

Inventors: Ankit Dixit (Bengaluru, IN); Shubham Tagra (Bangalore, IN)
Assignee: Qubole, Inc.
G06F16/24542G06F9/5016G06F16/24532G06F16/9024G06F2209/5019
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 11,704,316
App. No.
16/520,868
Granted
Jul 18, 2023
Kind
B2
Abstract

The present invention is generally directed to systems and methods of determining and provisioning peak memory requirements in Structured Query Language Processing engines. More specifically, methods may include determining or obtaining a query execution plan; gathering statistics associated with each database table; breaking the query execution plan into one or more subtasks: calculating an estimated memory usage for each subtask using the statistics; determining or obtaining a dependency graph of the one or more subtasks; based at least in part on the dependency graph, determining which subtasks can execute concurrently on a single worker node; and totaling the amount of estimated memory for each subtask that can execute concurrently on a single worker node and setting this amount of estimated memory as the estimated peak memory requirement for the specefic database query.

Claims (39)

1. A method for estimating peak memory requirements of a specific database query scheduled to execute on one or more worker nodes in a Structured Query Language (SQL) processing engine, the method comprising:

determining or obtaining a query execution plan;

gathering statistics associated with each database table;

breaking the query execution plan into one or more subtasks and determining any dependencies between subtasks and which subtasks may execute in parallel;

calculating an estimated memory usage for each subtask using the statistics;

determining or obtaining a directed acyclic dependency graph of the one or more subtasks;

based at least in part on the directed acyclic dependency graph, determining any dependencies between subtasks and which subtasks can execute concurrently on a single worker node, wherein

each node in the directed acyclic graph represents an operator, and wherein each operator can be categorized by its function and general memory cost, the operators comprising:

one or more accumulating operators that accumulate data in underlying data structures, process the data, and return results only after processing all of the input data, accumulating operators having a high memory cost;

one or more partially accumulating operators that accumulate data from one of the input sides and stream data from a second input side, partially accumulating operators having a medium memory cost; and

one or more pipelining operators that operate on one page at a time and has a low memory cost;

totaling the amount of estimated memory for each subtask on a single worker node and setting this amount of estimated memory as the estimated peak memory requirement for the specific database query.

2. The method of claim 1 , wherein the statistics associated with each database table includes the size of the table.

3. The method of claim 1 , wherein the estimated memory usage for each subtask is determined at least in part based on the type of task and the quantity of data to be processed.

4. The method of claim 1 , wherein the step of determining which subtasks can execute concurrently on a single worker node comprises determining which nodes require a completed input from other nodes before beginning a task.

5. A method for estimating peak memory requirements of a specific database query scheduled to execute on one or more worker nodes, the method comprising:

determining or obtaining a query execution plan;

gathering statistics associated with each database table, the statistics comprising the size of the table;

breaking the query execution plan into one or more subtasks;

calculating an estimated memory usage for each subtask using the statistics, wherein the estimated memory usage for each subtask is determined at least in part based on the type of task and the quantity of data to be processed;

determining or obtaining a directed acyclic dependency graph of the one or more subtasks, wherein the directed acyclic dependency graph may identify nodes as being pipelining operators, accumulating operators, or partially accumulating operators;

based at least in part on the directed acyclic dependency graph, determining which subtasks can execute concurrently on a single worker node, at least in part by determining which nodes require a completed input from other nodes before beginning a task, wherein

each node in the directed acyclic graph represents an operator, and wherein each operator can be categorized by its function and general memory cost, the operators comprising:

one or more accumulating operators that accumulate data in underlying data structures, process the data, and return results only after processing all of the input data, accumulating operators having a high memory cost;

one or more partially accumulating operators that accumulate data from one of the input sides and stream data from a second input side, partially accumulating operators having a medium memory cost; and

one or more pipelining operators that operate on one page at a time and has a low memory cost; and

totaling the amount of estimated memory for each subtask that can execute concurrently on a single worker node and setting this amount of estimated memory as the estimated peak memory requirement for the specific database query, where accumulating operators and partially accumulating operators are assigned a greater memory cost than pipelining operators.

6. A method for estimating peak memory requirements of a specific database query scheduled to execute on one or more worker nodes, the method comprising:

determining or obtaining a query execution plan;

gathering statistics associated with each database table;

breaking the query execution plan into one or more subtasks;

calculating an estimated memory usage for each subtask using the statistics;

determining or obtaining a directed acyclic dependency graph of the one or more subtasks, the dependency graph identifying nodes as being pipelining operators, accumulating operators, or partially accumulating operators;

based at least in part on the directed acyclic dependency graph, determining which subtasks can execute concurrently on a single worker node, wherein

each node in the directed acyclic graph represents an operator, and wherein each operator can be categorized by its function and general memory cost, the operators comprising:

one or more accumulating operators that accumulate data in underlying data structures, process the data, and return results only after processing all of the input data, accumulating operators having a high memory cost;

one or more partially accumulating operators that accumulate data from one of the input sides and stream data from a second input side, partially accumulating operators having a medium memory cost; and

one or more pipelining operators that operate on one page at a time and has a low memory cost; and

totaling the amount of estimated memory for each subtask that can execute concurrently on a single worker node and setting this amount of estimated memory as the estimated peak memory requirement for the specific database query, where accumulating operators and partially accumulating operators are assigned a greater memory cost than pipelining operators.

Assignments (6)
CORRECTIVE ASSIGNMENT TO CORRECT THE THE CONVEYANCE TO READ: RELEASE OF SECOND LIEN SECURITY INTEREST IN SPECIFIED PATENTS RECORDED AT RF 054498/0130 PREVIOUSLY RECORDED ON REEL 70689 FRAME 837. ASSIGNOR(S) HEREBY CONFIRMS THE RELEASE OF SECURITY INTEREST. Recorded Apr 2, 2025
From: JEFFERIES FINANCE LLC, AS COLLATERAL AGENT
To: QUBOLE INC.
Reel/Frame 070706/0009 →
RELEASE OF FIRST LIEN SECURITY INTEREST IN SPECIFIED PATENTS RECORDED AT RF 054498/0115 Recorded Mar 31, 2025
From: JEFFERIES FINANCE LLC, AS COLLATERAL AGENT
To: QUBOLE INC.
Reel/Frame 070689/0831 →
RELEASE OF FIRST LIEN SECURITY INTEREST IN SPECIFIED PATENTS RECORDED AT RF 054498/0130 Recorded Mar 31, 2025
From: JEFFERIES FINANCE LLC, AS COLLATERAL AGENT
To: QUBOLE INC.
Reel/Frame 070689/0837 →
FIRST LIEN SECURITY AGREEMENT Recorded Nov 23, 2020
From: QUBOLE INC.
To: JEFFERIES FINANCE LLC
Reel/Frame 054498/0115 →
SECOND LIEN SECURITY AGREEMENT Recorded Nov 23, 2020
From: QUBOLE INC.
To: JEFFERIES FINANCE LLC
Reel/Frame 054498/0130 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Apr 3, 2020
From: DIXIT, ANKIT; TAGRA, SHUBHAM
To: QUBOLE INC.
Reel/Frame 052308/0141 →
Continuity (2)
Provisional Application 62855056 · May 31, 2019
Related Publication 20200379998A1 · Dec 3, 2020