IP Library › Granted Patent US 12,399,896
Granted Patent B2
US 12,399,896 · App. 18/746,586 · Granted Aug 26, 2025

Dynamic database pipeline scheduler

Inventors: Sebastian Breß (Berlin, DE); Moritz Eyssen (Berlin, DE); Max Heimel (Berlin, DE); Max Jendruk (Berlin, DE)
Assignee: Snowflake Inc.
G06F16/24542G06F9/4881G06F16/24532G06F16/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,399,896
App. No.
18/746,586
Granted
Aug 26, 2025
Kind
B2
Abstract

A database system configured to optimize query execution through an opportunistic scheduling approach. The database system generates a query plan and identifies a contingent database operation within the query plan, the contingent database operation being dependent on a completion of at least one additional operation. The database system schedules the contingent operation using an opportunistic scheduler. The database system executes the query plan comprising processing the contingent database operation after the completion of the at least one additional operation.

Claims (65)

1. A method comprising:

generating, by at least one hardware processor, a query plan in a database system;

identifying a contingent database operation within the query plan, the contingent database operation being dependent on a completion of at least one additional operation;

scheduling the contingent database operation using an opportunistic scheduler;

executing the query plan comprising processing the contingent database operation after the completion of the at least one additional operation;

receiving, from a database system worker, a terminate message; and

terminating the contingent database operation based on the terminate message.

2. The method of claim 1 , wherein the opportunistic scheduler further comprises:

implementing inter-pipeline parallelism; and

scheduling a subsequent operation immediately once a thread has finished processing the at least one additional operation.

3. The method of claim 1 , further comprising:

listing, by the opportunistic scheduler, one or more pipelines as ready for processing, a pipeline of the one or more pipelines comprising an additional plurality of operations of the query plan; and

executing the one or more pipelines while an existing pipeline that comprises the additional plurality of operations is executing on an execution node of the database system.

4. The method of claim 3 , wherein the database system includes a plurality of execution nodes on which the additional plurality of operations is performed, each execution node of the plurality of execution nodes includes the opportunistic scheduler, the opportunistic scheduler comprising:

selecting an operator of a plurality of operators to receive the query plan.

5. The method of claim 4 , wherein the opportunistic scheduler further comprises:

synchronizing distributed execution of the plurality of operators across all worker processes; and

finalizing the plurality of operators in a deterministic manner for correct output data.

6. The method of claim 1 , further comprising:

identifying leaf operators as those operators that start or end a sequence of row set operators (RSOs) in the query plan; and

interleaving RSO pipelines within a process group, wherein multiple pipelines are active within the process group at the same time.

7. 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 system to perform operations comprising:

generating a query plan in a database system;

identifying a contingent database operation within the query plan, the contingent database operation being dependent on a completion of at least one additional operation;

scheduling the contingent database operation using an opportunistic scheduler;

executing the query plan comprising processing the contingent database operation after the completion of the at least one additional operation;

receiving, from a database system worker, a terminate message; and

terminating the contingent database operation based on the terminate message.

8. The system of claim 7 , wherein the opportunistic scheduler further comprises:

implementing inter-pipeline parallelism; and

scheduling a subsequent operation immediately once a thread has finished processing the at least one additional operation.

9. The system of claim 7 , the operations further comprising:

listing, by the opportunistic scheduler, one or more pipelines as ready for processing, a pipeline of the one or more pipelines comprising an additional plurality of operations of the query plan; and

executing the one or more pipelines while an existing pipeline that comprises the additional plurality of operations is executing on an execution node of the database system.

10. The system of claim 9 , wherein the database system includes a plurality of execution nodes on which the additional plurality of operations is performed, each execution node of the plurality of execution nodes includes the opportunistic scheduler, the opportunistic scheduler comprising:

selecting an operator of a plurality of operators to receive the query plan.

11. The system of claim 10 , wherein the opportunistic scheduler further comprises:

synchronizing distributed execution of the plurality of operators across all worker processes; and

finalizing the plurality of operators in a deterministic manner for correct output data.

12. The system of claim 7 , the operations further comprising:

identifying leaf operators as those operators that start or end a sequence of row set operators (RSOs) in the query plan; and

interleaving RSO pipelines within a process group, wherein multiple pipelines are active within the process group at the same time.

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

generating a query plan in a database system;

identifying a contingent database operation within the query plan, the contingent database operation being dependent on a completion of at least one additional operation;

scheduling the contingent database operation using an opportunistic scheduler;

executing the query plan comprising processing the contingent database operation after the completion of the at least one additional operation;

receiving, from a database system worker, a terminate message; and

terminating the contingent database operation based on the terminate message.

14. The machine-storage medium of claim 13 , wherein the opportunistic scheduler further comprises:

implementing inter-pipeline parallelism; and

scheduling a subsequent operation immediately once a thread has finished processing the at least one additional operation.

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

listing, by the opportunistic scheduler, one or more pipelines as ready for processing, a pipeline of the one or more pipelines comprising an additional plurality of operations of the query plan; and

executing the one or more pipelines while an existing pipeline that comprises the additional plurality of operations is executing on an execution node of the database system.

16. The machine-storage medium of claim 15 , wherein the database system includes a plurality of execution nodes on which the additional plurality of operations is performed, each execution node of the plurality of execution nodes includes the opportunistic scheduler, the opportunistic scheduler comprising:

selecting an operator of a plurality of operators to receive the query plan.

17. The machine-storage medium of claim 16 , wherein the opportunistic scheduler further comprises:

synchronizing distributed execution of the plurality of operators across all worker processes; and

finalizing the plurality of operators in a deterministic manner for correct output data.

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

identifying leaf operators as those operators that start or end a sequence of row set operators (RSOs) in the query plan; and

interleaving RSO pipelines within a process group, wherein multiple pipelines are active within the process group at the same time.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jun 18, 2024
From: BREß, SEBASTIAN; EYSSEN, MORITZ; HEIMEL, MAX; JENDRUK, MAX
To: SNOWFLAKE INC.
Reel/Frame 067757/0197 →
Continuity (3)
Continuation 18176010 · Feb 28, 2023
Continuation 17515232 · Oct 29, 2021
Related Publication 20240338366A1 · Oct 10, 2024
References Cited (17)
US 7577667B2 · Hinshaw et al. · 2009 [cited by applicant]
US 7702610B2 · Zane et al. · 2010 [cited by applicant]
US 8244718B2 · Chamdani et al. · 2012 [cited by applicant]
US 11615092B1 · Breß · 2023 [cited by examiner]
US 12050603B2 · Breß · 2024 [cited by examiner]
US 20170039239A1 · Saadat-panah et al. · 2017 [cited by applicant]
US 20170293626A1 · Dageville et al. · 2017 [cited by applicant]
US 20200379998A1 · Dixit et al. · 2020 [cited by applicant]
US 20230205770A1 · Breß et al. · 2023 [cited by applicant]
“U.S. Appl. No. 17/515,232, Final Office Action mailed Aug. 11, 2022”, 16 pgs. [cited by applicant]
“U.S. Appl. No. 17/515,232, Non Final Office Action mailed Mar. 18, 2022”, 16 pgs. [cited by applicant]
“U.S. Appl. No. 17/515,232, Notice of Allowance mailed Dec. 1, 2022”, 6 pgs. [cited by applicant]
“U.S. Appl. No. 17/515,232, Response filed Jun. 21, 2022 to Non Final Office Action mailed Mar. 18, 2022”. [cited by applicant]
“U.S. Appl. No. 17/515,232, Response filed Nov. 9, 2022 to Final Office Action mailed Aug. 11, 2022”, 13 pgs. [cited by applicant]
“U.S. Appl. No. 18/176,010, Non Final Office Action mailed Nov. 28, 2023”, 13 pgs. [cited by applicant]
“U.S. Appl. No. 18/176,010, Notice of Allowance mailed Mar. 18, 2024”, 5 pgs. [cited by applicant]
“U.S. Appl. No. 18/176,010, Response filed Feb. 28, 2024 to Non Final Office Action mailed Nov. 28, 2023”, 11 pgs. [cited by applicant]