IP Library Granted Patent US 12,579,145
Granted Patent B2
US 12,579,145 · App. 18/902,195 · Granted Mar 17, 2026

Query-execution planning using reinforcement learning

Inventors: Qiming Jiang (Redmond, WA); Orestis Kostakis (Redmond, WA); John Reumann (Kirkland, WA)
Assignee: Snowflake Inc.
G06F16/24542G06F16/27
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,579,145
App. No.
18/902,195
Filed
Sep 30, 2024
Granted
Mar 17, 2026
Kind
B2
Art Unit
2168
USPC
707/718
Abstract

A method for improving query scheduling on a computing cluster using reinforcement learning is provided. A series of queries to be executed using resources of the computing cluster is received. For each query, a query execution plan is generated and a resource profile for executing the query is predicted. Current state data of the cluster resources is received and assignment data to execute the query on the cluster resources is generated by applying the reinforcement learning technique. The query is executed on the computing cluster based on the generated assignment data, and query results are stored.

Claims (72)

1 . A method comprising:

receiving a set of queries to be executed using a resource of a computing cluster comprising a reinforcement learning technique; and

for a query in the set of queries:

generating a query execution plan that comprises a query graph;

predicting a resource profile for executing the query based on the query execution plan, the resource profile comprising a vector, the vector comprising values corresponding to different resource types involved in execution of the query;

receiving current state data of the resource of the computing cluster;

based on the current state data and the resource profile, generating, by at least one hardware processor, assignment data to execute the query on the resource of the computing cluster comprising the reinforcement learning technique;

generating query results by executing the query on the computing cluster based on the generated assignment data; and

storing the query results.

2 . The method of claim 1 , wherein the reinforcement learning technique comprises:

training a reinforcement learning model on historical instances of user data over a period of time; and

training the reinforcement learning model to maximize a cumulative reward.

3 . The method of claim 1 , further comprising:

identifying a characteristic of the query; and

identifying at least one requirement that the query imposes on the computing cluster.

4 . The method of claim 1 , further comprising:

generating a prediction profile, wherein generating the prediction profile comprises implementing a machine learning scheme comprising at least one of a decision tree or a fully connected neural network.

5 . The method of claim 4 , further comprising:

applying the prediction profile to the query execution plan.

6 . The method of claim 1 , further comprising:

implementing a specialized sub-predictor parameter for a plurality of resource types; and

applying the specialized sub-predictor parameter to predict usage of a specific resource type from the plurality of resource types.

7 . The method of claim 6 , wherein the plurality of resource types comprises at least one of processor usage, memory usage, network bandwidth usage, disk read operations, or disk write operations.

8 . A system comprising:

one or more hardware processors of a machine; and

at least one memory storing instructions that, when executed by the one or more hardware processors, cause the machine to perform operation comprising:

receiving a set of queries to be executed using a resource of a computing cluster comprising a reinforcement learning technique; and

for a query in the set of queries:

generating a query execution plan that comprises a query graph;

predicting a resource profile for executing the query based on the query execution plan, the resource profile comprising a vector, the vector comprising values corresponding to different resource types involved in execution of the query;

receiving current state data of the resource of the computing cluster;

based on the current state data and the resource profile, generating assignment data to execute the query on the resource of the computing cluster comprising the reinforcement learning technique;

generating query results by executing the query on the computing cluster based on the generated assignment data; and

storing the query results.

9 . The system of claim 8 , the operation further comprising:

training a reinforcement learning model on historical instances of user data over a period of time; and

training the reinforcement learning model to maximize a cumulative reward.

10 . The system of claim 8 , the operation further comprising:

identifying a characteristic of the query; and

identifying at least one requirement that the query imposes on the computing cluster.

11 . The system of claim 10 , the operation further comprising:

generating a prediction profile, wherein generating the prediction profile comprises implementing a machine learning scheme comprising at least one of a decision tree or a fully connected neural network.

12 . The system of claim 11 , the operation further comprising:

applying the prediction profile to the query execution plan.

13 . The system of claim 12 , the operation further comprising:

implementing a resource profile prediction engine for generating prediction profiles; and

implementing an assignment decider engine for managing assignment of queries based on cloud data platform resource data for each task.

14 . The system of claim 8 , the operation further comprising:

implementing a specialized sub-predictor parameter for a plurality of resource types; and

applying the specialized sub-predictor parameter to predict usage of a specific resource type from the plurality of resource types.

15 . A machine-storage medium embodying instructions that, when executed by a machine, cause the machine to perform operations comprising:

receiving a set of queries to be executed using a resource of a computing cluster comprising a reinforcement learning technique; and

for a query in the set of queries:

generating a query execution plan that comprises a query graph;

predicting a resource profile for executing the query based on the query execution plan, the resource profile comprising a vector, the vector comprising values corresponding to different resource types involved in execution of the query;

receiving current state data of the resource of the computing cluster;

based on the current state data and the resource profile, generating assignment data to execute the query on the resource of the computing cluster comprising the reinforcement learning technique;

generating query results by executing the query on the computing cluster based on the generated assignment data; and

storing the query results.

16 . The machine-storage medium of claim 15 , the operations further comprising:

training a reinforcement learning model on historical instances of user data over a period of time; and

training the reinforcement learning model to maximize a cumulative reward.

17 . The machine-storage medium of claim 15 , the operations further comprising:

identifying a characteristic of the query; and

identifying at least one requirement that the query imposes on the computing cluster.

18 . The machine-storage medium of claim 15 , the operations further comprising:

generating a prediction profile, wherein generating the prediction profile comprises implementing a machine learning scheme comprising at least one of a decision tree or a fully connected neural network.

19 . The machine-storage medium of claim 18 , the operations further comprising:

applying the prediction profile to the query execution plan.

20 . The machine-storage medium of claim 15 , the operations further comprising:

implementing a specialized sub-predictor parameter for a plurality of resource types; and

applying the specialized sub-predictor parameter to predict usage of a specific resource type from the plurality of resource types.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Sep 30, 2024
From: JIANG, QIMING; KOSTAKIS, ORESTIS; REUMANN, JOHN
To: SNOWFLAKE INC.
Reel/Frame 068743/0810 →
Continuity (4)
Continuation 18362869 · Jul 31, 2023
Continuation 18104256 · Jan 31, 2023
Continuation 17930277 · Sep 7, 2022
Related Publication 20250021558A1 · Jan 16, 2025
References Cited (35)
US 9430280B1 · Shih · 2016 [cited by examiner]
US 11145419B1 · Shukla · 2021 [cited by examiner]
US 11250950B1 · Miller · 2022 [cited by examiner]
US 11270797B1 · Shukla · 2022 [cited by examiner]
US 11429601B2 · Witting · 2022 [cited by examiner]
US 11620289B1 · Jiang et al. · 2023 [cited by applicant]
US 11755576B1 · Jiang et al. · 2023 [cited by applicant]
US 11777870B1 · Akkapeddi · 2023 [cited by examiner]
US 20080147593A1 · Ramesh · 2008 [cited by examiner]
US 20140181831A1 · Le Scouarnec · 2014 [cited by examiner]
US 20170220944A1 · Nghiem · 2017 [cited by examiner]
US 20190378048A1 · Shrivastava · 2019 [cited by examiner]
US 20200349161A1 · Siddiqui · 2020 [cited by examiner]
US 20200401593A1 · Panuganty · 2020 [cited by examiner]
US 20210096915A1 · Patel · 2021 [cited by examiner]
US 20220365933A1 · Li · 2022 [cited by examiner]
US 20230077130A1 · Matsuoka · 2023 [cited by examiner]
US 20230401207A1 · Beavin · 2023 [cited by examiner]
US 20240045715A1 · Bahl · 2024 [cited by examiner]
US 20240078235A1 · Jiang et al. · 2024 [cited by applicant]
US 20240111586A1 · Zhu · 2024 [cited by examiner]
WO WO2024054858A1 · 2024 [cited by applicant]
“U.S. Appl. No. 17/930,277, Notice of Allowance mailed Jan. 24, 2023”, 10 pgs. [cited by applicant]
“U.S. Appl. No. 18/104,256, Non Final Office Action mailed Apr. 21, 2023”, 17 pgs. [cited by applicant]
“U.S. Appl. No. 18/104,256, Notice of Allowance mailed Jun. 16, 2023”, 8 pgs. [cited by applicant]
“U.S. Appl. No. 18/104,256, Preliminary Amendment filed Feb. 2, 2023”, 11 pgs. [cited by applicant]
“U.S. Appl. No. 18/104,256, Response filed May 31, 2023 to Non Final Office Action mailed Apr. 21, 2023”, 9 pgs. [cited by applicant]
“U.S. Appl. No. 18/362,869, Non Final Office Action mailed Apr. 23, 2024”, 15 pgs. [cited by applicant]
“U.S. Appl. No. 18/362,869, Notice of Allowance mailed Aug. 6, 2024”, 8 pgs. [cited by applicant]
“U.S. Appl. No. 18/362,869, Response filed Jul. 18, 2024 to Non Final Office Action mailed Apr. 23, 2024”, 9 pgs. [cited by applicant]
“International Application Serial No. PCT/US2023/073566, International Search Report mailed Oct. 4, 2023”, 2 pgs. [cited by applicant]
“International Application Serial No. PCT/US2023/073566, Written Opinion mailed Oct. 4, 2023”, 3 pgs. [cited by applicant]
Gupta, et al., “PQR: Predicting Query Execution Times for Autonomous Workload Management”, IEEE, (2008), 1-10. [cited by applicant]
Pan, et al., “Congra: Towards Efficient Processing of Concurrent Graph Queries on Shared-Memory Machines”, IEEE, (2017), pp. 1-8. [cited by applicant]
“International Application Serial No. PCT/US2023/073566, International Preliminary Report on Patentability mailed Mar. 20, 2025”, 5 pgs. [cited by applicant]