IP Library Granted Patent US 12,216,656
Granted Patent B2
US 12,216,656 · App. 18/477,808 · Granted Feb 4, 2025

Scalable query processing

Inventors: Thierry Cruanes (San Mateo, CA); Igor Demura (Mountain View, CA); Varun Ganesh (San Bruno, CA); Prasanna Rajaperumal (Bangalore, IN); Libo Wang (Foster City, CA); Jiaqi Yan (Menlo Park, CA)
Assignee: Snowflake Inc.
G06F16/24542G06F16/24537G06F16/24539
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,216,656
App. No.
18/477,808
Granted
Feb 4, 2025
Kind
B2
Abstract

Embodiments of the present disclosure may provide a dynamic query execution model. This query execution model may provide acceleration by scaling out parallel parts of a query (also referred to as a fragment) to additional computing resources, for example computing resources leased from a pool of computing resources. Execution of the parts of the query may be coordinated by a parent query coordinator, where the query originated, and a fragment query coordinator.

Claims (59)

1. A method comprising:

receiving, by one or more processors, a query directed at a data set stored in a network-based database system;

generating a query plan to execute the query;

identifying a portion of the query plan that is eligible for fragment processing based on an output-to-input ratio where input represents size of one or more input files for fragment processing and output represents size of an output file based on the one or more input file;

executing, by a parent query coordinator using one or more computing resources of a first set of computing resources assigned to the parent query coordinator, the identified portion of the query plan on a first batch of files of the data set to generate a first batch result;

transmitting instructions to a fragment query coordinator for the fragment query coordinator to execute the identified portion of the query on a second batch of files of the data set to generate the output file using a second set of computing resources assigned to the fragment query coordinator, the output file being stored in a storage location;

scanning, by the parent query coordinator, the output file from the storage location to generate a second batch result;

combining the first batch result and the second batch result to generate combined results; and

executing remaining portion of the query plan on the combined results to generate a response to the query.

2. The method of claim 1 , further comprising:

loading files of the data set into a first shared file queue as a continuous scanset;

grouping a first set of files as the first batch and providing the first batch to the parent query coordinator; and

grouping a second set of files as the second batch and providing the second batch to the fragment query coordinator.

3. The method of claim 2 , further comprising:

providing additional batches serially until all files in the continuous scanset have been provided.

4. The method of claim 1 , wherein identifying the portion of the query plan that is eligible for fragment processing is further based on a set of criteria.

5. The method of claim 4 , wherein the set of criteria includes a type of link connecting at least two operators of a plurality of operators in the query plan.

6. The method of claim 5 , wherein each link connects a first and second operator of the plurality of operators and the type of link indicates whether the first operator is executable by a computing resource without communicating with another computing resource.

7. The method of claim 4 , wherein the set of criteria includes whether the identified portion is executable by a computing resource without communicating with another computing resource.

8. A system comprising:

one or more processors of a machine; and

a memory storing instructions that, when executed by the one or more processors, cause the machine to perform operations comprising:

receiving a query directed at a data set stored in a network-based database system;

generating a query plan to execute the query;

identifying a portion of the query plan that is eligible for fragment processing based on an output-to-input ratio where input represents size of one or more input files for fragment processing and output represents size of an output file based on the one or more input file;

executing, by a parent query coordinator using one or more computing resources of a first set of computing resources assigned to the parent query coordinator, the identified portion of the query plan on a first batch of files of the data set to generate a first batch result;

transmitting instructions to a fragment query coordinator for the fragment query coordinator to execute the identified portion of the query on a second batch of files of the data set to generate the output file using a second set of computing resources assigned to the fragment query coordinator, the output file being stored in a storage location;

scanning, by the parent query coordinator, the output file from the storage location to generate a second batch result;

combining the first batch result and the second batch result to generate combined results; and

executing remaining portion of the query plan on the combined results to generate a response to the query.

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

loading files of the data set into a first shared file queue as a continuous scanset;

grouping a first set of files as the first batch and providing the first batch to the parent query coordinator; and

grouping a second set of files as the second batch and providing the second batch to the fragment query coordinator.

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

providing additional batches serially until all files in the continuous scanset have been provided.

11. The system of claim 8 , wherein identifying the portion of the query plan that is eligible for fragment processing is further based on a set of criteria.

12. The system of claim 11 , wherein the set of criteria includes a type of link connecting at least two operators of a plurality of operators in the query plan.

13. The system of claim 12 , wherein each link connects a first and second operator of the plurality of operators and the type of link indicates whether the first operator is executable by a computing resource without communicating with another computing resource.

14. The system of claim 11 , wherein the set of criteria includes whether the identified portion is executable by a computing resource without communicating with another computing resource.

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

receiving a query directed at a data set stored in a network-based database system;

generating a query plan to execute the query;

identifying a portion of the query plan that is eligible for fragment processing based on an output-to-input ratio where input represents size of one or more input files for fragment processing and output represents size of an output file based on the one or more input file;

executing, by a parent query coordinator using one or more computing resources of a first set of computing resources assigned to the parent query coordinator, the identified portion of the query plan on a first batch of files of the data set to generate a first batch result;

transmitting instructions to a fragment query coordinator for the fragment query coordinator to execute the identified portion of the query on a second batch of files of the data set to generate the output file using a second set of computing resources assigned to the fragment query coordinator, the output file being stored in a storage location;

scanning, by the parent query coordinator, the output file from the storage location to generate a second batch result;

combining the first batch result and the second batch result to generate combined results; and

executing remaining portion of the query plan on the combined results to generate a response to the query.

16. The non-transitory machine-storage medium of claim 15 , further comprising:

loading files of the data set into a first shared file queue as a continuous scanset;

grouping a first set of files as the first batch and providing the first batch to the parent query coordinator; and

grouping a second set of files as the second batch and providing the second batch to the fragment query coordinator.

17. The non-transitory machine-storage medium of claim 16 , further comprising:

providing additional batches serially until all files in the continuous scanset have been provided.

18. The non-transitory machine-storage medium of claim 15 , wherein identifying the portion of the query plan that is eligible for fragment processing is further based on a set of criteria.

19. The non-transitory machine-storage medium of claim 18 , wherein the set of criteria includes a type of link connecting at least two operators of a plurality of operators in the query plan.

20. The non-transitory machine-storage medium of claim 19 , wherein each link connects a first and second operator of the plurality of operators and the type of link indicates whether the first operator is executable by a computing resource without communicating with another computing resource.

21. The non-transitory machine-storage medium of claim 18 , wherein the set of criteria includes whether the identified portion is executable by a computing resource without communicating with another computing resource.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Sep 29, 2023
From: CRUANES, THIERRY; DEMURA, IGOR; GANESH, VARUN; RAJAPERUMAL, PRASANNA; WANG, LIBO; YAN, JIAQI
To: SNOWFLAKE INC.
Reel/Frame 065072/0231 →
Continuity (4)
Continuation 17823572 · Aug 31, 2022
Continuation 17657257 · Mar 30, 2022
Continuation 16889033 · Jun 1, 2020
Related Publication 20240028592A1 · Jan 25, 2024
References Cited (84)
US 9672122B1 · Gandhi et al. · 2017 [cited by applicant]
US 10091297B1 · Zhao et al. · 2018 [cited by applicant]
US 10846284B1 · Park et al. · 2020 [cited by applicant]
US 11163768B1 · Cruanes et al. · 2021 [cited by applicant]
US 11347735B2 · Cruanes et al. · 2022 [cited by applicant]
US 11461325B2 · Cruanes et al. · 2022 [cited by applicant]
US 11461326B2 · Cruanes et al. · 2022 [cited by applicant]
US 11809428B2 · Cruanes et al. · 2023 [cited by applicant]
US 12019632B2 · Cruanes et al. · 2024 [cited by applicant]
US 20040205414A1 · Roselli et al. · 2004 [cited by applicant]
US 20110302583A1 · Abadi et al. · 2011 [cited by applicant]
US 20140280036A1 · Korlapati et al. · 2014 [cited by applicant]
US 20140282605A1 · Jacobson et al. · 2014 [cited by applicant]
US 20140359271A1 · Gedik et al. · 2014 [cited by applicant]
US 20150089274A1 · Mares et al. · 2015 [cited by applicant]
US 20150234688A1 · Dageville et al. · 2015 [cited by applicant]
US 20160246825A1 · Li et al. · 2016 [cited by applicant]
US 20160267197A1 · Barsness et al. · 2016 [cited by applicant]
US 20170116210A1 · Park et al. · 2017 [cited by applicant]
US 20190050296A1 · Luo et al. · 2019 [cited by applicant]
US 20190087440A1 · Johnson et al. · 2019 [cited by applicant]
US 20190236194A1 · James et al. · 2019 [cited by applicant]
US 20190303479A1 · Behm et al. · 2019 [cited by applicant]
US 20200050694A1 · Avalani et al. · 2020 [cited by applicant]
US 20200097717A1 · Young et al. · 2020 [cited by applicant]
US 20200192900A1 · Sung et al. · 2020 [cited by applicant]
US 20200233706A1 · Smith et al. · 2020 [cited by applicant]
US 20210117425A1 · Rao et al. · 2021 [cited by applicant]
US 20210374135A1 · Cruanes et al. · 2021 [cited by applicant]
US 20210374136A1 · Cruanes et al. · 2021 [cited by applicant]
US 20220222255A1 · Cruanes et al. · 2022 [cited by applicant]
US 20220414097A1 · Cruanes et al. · 2022 [cited by applicant]
US 20230028008A1 · Cruanes et al. · 2023 [cited by applicant]
US 20240303238A1 · Cruanes et al. · 2024 [cited by applicant]
CN 114096961 · 2022 [cited by applicant]
WO 2021247286 · 2021 [cited by applicant]
“U.S. Appl. No. 16/889,033, Non Final Office Action mailed Jul. 24, 2020”, 23 pgs. [cited by applicant]
“U.S. Appl. No. 16/889,042, Non Final Office Action mailed Aug. 7, 2020”. [cited by applicant]
“U.S. Appl. No. 16/889,033, Response filed Oct. 22, 2020 to Non Final Office Action mailed Jul. 24, 2020”, 11 pgs. [cited by applicant]
“U.S. Appl. No. 16/889,033, Examiner Interview Summary mailed Oct. 30, 2020”, 3 pgs. [cited by applicant]
“U.S. Appl. No. 16/889,042, Response filed Nov. 9, 2020 to Non Final Office Action mailed Aug. 7, 2020”, 10 pgs. [cited by applicant]
“U.S. Appl. No. 16/889,033, Final Office Action mailed Nov. 12, 2020”, 27 pgs. [cited by applicant]
“U.S. Appl. No. 16/889,042, Examiner Interview Summary mailed Nov. 12, 2020”, 2 pgs. [cited by applicant]
“U.S. Appl. No. 16/889,042, Final Office Action mailed Dec. 17, 2020”, 14 pgs. [cited by applicant]
“U.S. Appl. 16/889,033, Response filed Feb. 12, 2021 to Final Office Action mailed Nov. 12, 2020”, 11 pgs. [cited by applicant]
“U.S. Appl. No. 16/889,042, Response filed Mar. 17, 2021 to Final Office Action mailed Dec. 17, 2020”, 12 pgs. [cited by applicant]
“U.S. Appl. No. 16/889,042, Notice of Allowance mailed Apr. 15, 2021”, 10 pgs. [cited by applicant]
“U.S. Appl. No. 16/889,033, Non Final Office Action mailed Apr. 19, 2021”, 28 pgs. [cited by applicant]
“International Application Serial No. PCT US2021 034020, International Search Report mailed Jun. 25, 2021”, 2 pgs. [cited by applicant]
“International Application Serial No. PCT US2021 034020, Written Opinion mailed Jun. 25, 2021”, 9 pgs. [cited by applicant]
“U.S. Appl. No. 16/889,033, Response filed Jul. 19, 2021 to Non Final Office Action mailed Apr. 19, 2021”, 11 pgs. [cited by applicant]
“U.S. Appl. No. 16/889,033, Final Office Action mailed Oct. 4, 2021”, 30 pgs. [cited by applicant]
“U.S. Appl. No. 16/889,042, Corrected Notice of Allowability mailed Oct. 4, 2021”, 2 pgs. [cited by applicant]
“U.S. Appl. No. 17/333,358, Non Final Office Action mailed Oct. 21, 2021”, 14 pgs. [cited by applicant]
“U.S. Appl. No. 16/889,033, Response filed Dec. 29, 2021 to Final Office Action mailed Oct. 4, 2021”, 12 pgs. [cited by applicant]
“U.S. Appl. No. 17/333,358, Response filed Jan. 21, 2022 to Non Final Office Action mailed Oct. 21, 2021”, 9 pgs. [cited by applicant]
“U.S. Appl. No. 17/333,358, Final Office Action mailed Feb. 18, 2022”, 15 pgs. [cited by applicant]
“U.S. Appl. No. 16/889,033, Notice of Allowance mailed Mar. 9, 2022”, 15 pgs. [cited by applicant]
“U.S. Appl. No. 17/333,358, Response filed May 18, 2022 to Final Office Action mailed Feb. 18, 2022”, 9 pgs. [cited by applicant]
“U.S. Appl. No. 16/889,033, Examiner Interview Summary mailed May 20, 2022”, 2 pgs. [cited by applicant]
“U.S. Appl. No. 17/657,257, Notice of Allowance mailed Jun. 7, 2022”, 10 pgs. [cited by applicant]
“U.S. Appl. No. 17/333,358, Notice of Allowance mailed Jun. 24, 2022”, 9 pgs. [cited by applicant]
“U.S. Appl. No. 17/657,257, Corrected Notice of Allowability mailed Jun. 30, 2022”, 2 pgs. [cited by applicant]
“U.S. Appl. No. 17/333,358, Corrected Notice of Allowability mailed Jul. 13, 2022”, 5 pgs. [cited by applicant]
“International Application Serial No. PCT US2021 034020, International Preliminary Report on Patentability mailed Dec. 15, 2022”, 10 pgs. [cited by applicant]
“U.S. Appl. No. 17/930,165, Non Final Office Action mailed Mar. 13, 2023”, 6 pgs. [cited by applicant]
“U.S. Appl. No. 17/930,165, Response filed Jun. 13, 2023 to Non Final Office Action mailed Mar. 13, 2023”, 7 pgs. [cited by applicant]
“U.S. Appl. No. 17/823,572, Notice of Allowance mailed Jul. 20, 2023”, 10 pgs. [cited by applicant]
“European Application Serial No. 21818344.0, Voluntary Amendment filed Jul. 12, 2023”, 6 pgs. [cited by applicant]
“U.S. Appl. No. 17/930,165, Non Final Office Action mailed Sep. 21, 2023”, 10 pgs. [cited by applicant]
“U.S. Appl. No. 17/930,165, Response filed Dec. 21, 2023 to Non Final Office Action mailed Sep. 21, 2023”, 9 pgs. [cited by applicant]
“U.S. Appl. No. 17/930,165, Notice of Allowance mailed Feb. 15, 2024”, 15 pgs. [cited by applicant]
“U.S. Appl. No. 17/930,165, Notice of Allowability mailed Mar. 5, 2024”, 12 pgs. [cited by applicant]
“U.S. Appl. No. 17/930,165, 312 Amendment filed May 15, 2024”, 6 pgs. [cited by applicant]
“U.S. Appl. No. 17/930,165, PTO Response to Rule 312 Communication mailed May 28, 2024”, 2 pgs. [cited by applicant]
“European Application Serial No. 21818344.0, Extended European Search Report mailed Jun. 4, 2024”, 7 pgs. [cited by applicant]
Acosta, Maribel, “Networks of Linked Data Eddies: An Adaptive Web Query Processing Engine for RDF Data”, In: “The Semantic Web—ISWC 2015 : 14th International Semantic Web Conference, Bethlehem, PA, USA, Oct. 11-15, 2015… [cited by applicant]
Perez, Jorge P., “Semantics and Complexity of SPARQL”, Retrieved from the Internet: URL:https : dl.acm. org doipdf 10.1145 1567274.1567278, (Aug. 1, 2009), 1-45. [cited by applicant]
U.S. Appl. No. 16/889,033 11,347,735, filed Jun. 1, 2020, Scalable Query Processing. [cited by applicant]
U.S. Appl. No. 17/657,257 11,461,326, filed Mar. 30, 2022, Scalable Query Processing. [cited by applicant]
U.S. Appl. No. 17/823,572 11,809,428, filed Aug. 31, 2022, Scalable Query Processing. [cited by applicant]
U.S. Appl. No. 16/889,042 11,163,768, filed Jun. 1, 2020, Checkpoints in Batch File Processing. [cited by applicant]
U.S. Appl. No. 17/333,358 11,461,325, filed May 28, 2021, Checkpoints in Batch File Processing. [cited by applicant]
U.S. Appl. No. 17/930,165, filed Sep. 7, 2022, Checkpoints in Batch File Processing. [cited by applicant]