IP Library Granted Patent US 11,494,337
Granted Patent B2
US 11,494,337 · App. 17/508,705 · Granted Nov 8, 2022

Data pruning based on metadata

Inventors: Thierry Cruanes (San Mateo, CA); Benoit Dageville (Foster City, CA); Ashish Motivala (Foster City, CA); Marcin Zukowski (San Mateo, CA)
Assignee: Snowflake Inc.
G06F16/162G06F16/215G06F16/22G06F16/24544G06F16/9535
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,494,337
App. No.
17/508,705
Granted
Nov 8, 2022
Kind
B2
Abstract

A system and method for pruning data based on metadata. The method may include receiving a query with a plurality of predicates and identifying one or more applicable files that includes database data satisfying at least one of the plurality of predicates. The identifying the one or more applicable files including reading metadata stored in a metadata store that is separate from the database data. The method further includes pruning inapplicable files comprising database data that does not satisfy at least one of the plurality of predicates to create a reduced set of files and reading the reduced set of files to execute the query.

Claims (57)

1. A system comprising:

a metadata store to store metadata; and

a processor, operatively coupled with the metadata store, to:

determine whether each of a plurality of predicates included in a query partially matches at least one of a plurality of files using the metadata stored in the metadata store, wherein there is at least one of the plurality of predicates that does not partially match at least one of the plurality of files;

for each predicate in the plurality of predicates that does not at least partially match at least one of the plurality of files, remove that predicate that does not at least partially match at least one of the plurality of files from the plurality of predicates to create a reduced set of predicates;

modify the query to use the reduced set of predicates; and

process the modified query using the reduced set of predicates and the plurality of files.

2. The system of claim 1 , wherein the reduced set of predicates has a second number of predicates that is smaller than a first number of predicates in the plurality of predicates.

3. The system of claim 1 , wherein the processor further to:

receive the query with the plurality of predicates and the query to be applied to a plurality of files that comprise database data.

4. The system of claim 1 , wherein the processor further to:

generate a metadata file comprising information about a discrete selection of database data stored in a file; and

store the metadata file in the metadata store separate from the discrete selection of the database data.

5. The system of claim 1 , wherein to partially match at least one of a plurality of files, the processor to:

determine, using the metadata, a range of values of database data stored in a certain file; and

determine whether any data within the range of values of database data stored in the certain file matches at least one of the plurality of predicates.

6. The system of claim 5 , wherein to determine whether any data within the range of values of database data, the processor to determine that a certain file matches at least one of the plurality of predicates using at least a determination that some data within the range of values stored in the certain file matches at least one of the plurality of predicates.

7. The system of claim 1 , wherein the processor further to identify at least one applicable column within each of the plurality of files that comprises database data partially matching at least one of the plurality of predicates.

8. The system of claim 1 , wherein the processor further to receive a query comprising a plurality of predicates and each of the plurality of predicates is a condition expression that evaluates to a Boolean value.

9. The system of claim 1 , wherein the metadata store is separate from the database data and wherein the processor further to prune another inapplicable predicate from the plurality of predicates that matches all of the plurality of files by removing that inapplicable predicate from the query.

10. The system of claim 1 , wherein the metadata for one of the plurality of files includes at least one of a minimum value, a maximum value, a number of values, and a number of null values.

11. A method comprising:

determining, by a processor, whether each of a plurality of predicates included in a query partially matches at least one of a plurality of files using metadata stored in a metadata store wherein there is at least one of the plurality of predicates that does not partially match at least one of the plurality of files;

for each predicate in the plurality of predicates that does not at least partially match at least one of the plurality of files, removing that predicate that does not at least partially match at least one of the plurality of files from the plurality of predicates;

modifying the query to use the reduced set of predicates; and

processing the modified query using the reduced set of predicates and the plurality of files.

12. The method of claim 11 , wherein the reduced set of predicates has a second number of predicates that is smaller than a first number of predicates in the plurality of predicates.

13. The method of claim 11 , further comprising receiving the query with the plurality of predicates and the query to be applied to a plurality of files that comprise database data.

14. The method of claim 11 , further comprising:

generating a metadata file comprising information about a discrete selection of database data stored in a file; and

storing the metadata file in the metadata store separate from the discrete selection of the database data.

15. The method of claim 11 , wherein the partially match at least one of a plurality of files comprises:

determining, using the metadata, a range of values of database data stored in a certain file; and

determining whether any data within the range of values of database data stored in the certain file satisfies at least one of the plurality of predicates.

16. The method of claim 15 , wherein to determine whether any data within the range of values of database data comprises identifying the certain file as being an applicable file in response to a determination that some data within the range of values stored in the certain file matches at least one of the plurality of predicates.

17. The method of claim 11 , further comprising identifying at least one applicable column within each of the plurality of files that comprises database data partially matching at least one of the plurality of predicates.

18. The method of claim 11 , wherein the processor further to receive a query comprising a plurality of predicates and each of the plurality of predicates is a condition expression that evaluates to a Boolean value.

19. The method of claim 11 , wherein the metadata store is separate from the database data and wherein the processor further to prune another inapplicable predicate from the plurality of predicates that matches all of the plurality of files by removing that inapplicable predicate from the query.

20. The method of claim 11 , wherein the metadata for one of the plurality of files includes at least one of a minimum value, a maximum value, a number of values, and a number of null values.

21. A non-transitory computer readable storage media, programmable to execute instructions that, when executed by a processor, cause the processor to:

determine whether each of a plurality of predicates included in a query partially matches at least one of a plurality of files using metadata stored in a metadata store wherein there is at least one of the plurality of predicates that does not partially match at least one of the plurality of files;

for each predicate in the plurality of predicates that does not at least partially match at least one of the plurality of files, remove that predicate that does not at least partially match at least one of the plurality of files from the plurality of predicates to create a reduced set of predicates;

modify the query to use the reduced set of predicates; and

process the modified query using the reduced set of predicates and the plurality of files.

22. The non-transitory computer readable storage media of claim 21 , wherein the reduced set of predicates has a second number of predicates that is smaller than a first number of predicates.

23. The non-transitory computer readable storage media of claim 21 , the instructions further to cause the processor to receive the query with the plurality of predicates and the query to be applied to a plurality of files that comprise database data.

24. The non-transitory computer readable storage media of claim 21 , wherein to read the metadata, the processor to:

generate a metadata file comprising information about a discrete selection of database data stored in a file; and

store the metadata file in the metadata store separate from the discrete selection of the database data.

25. The non-transitory computer readable storage media of claim 21 , wherein to read the metadata, the processor to:

determine, using the metadata, a range of values of database data stored in a certain file; and

determine whether any data within the range of values of database data stored in the certain file satisfies at least one of the plurality of predicates.

26. The non-transitory computer readable storage media of claim 25 , wherein to determine whether any data within the range of values of database data comprises determine that a certain file satisfies at least one of the plurality of predicates using at least a determination that some data within the range of values stored in the certain file satisfies at least one of the plurality of predicates.

27. The non-transitory computer readable storage media of claim 21 , the instructions further to cause the processor to identify at least one applicable column within each of the plurality of files that comprises database data partially matching at least one of the plurality of predicates.

28. The non-transitory computer readable storage media of claim 21 , wherein the processor further to receive a query comprising a plurality of predicates and each of the plurality of predicates is a condition expression that evaluates to a Boolean value.

29. The non-transitory computer readable storage media of claim 21 , wherein the metadata store is separate from the database data and wherein the processor further to prune another inapplicable predicate from the plurality of predicates that matches all of the plurality of files by removing that inapplicable predicate from the query.

30. The non-transitory computer readable storage media of claim 21 , wherein the metadata for one of the plurality of files includes at least one of a minimum value, a maximum value, a number of values, and a number of null values.

Assignments (3)
CORRECTIVE ASSIGNMENT TO CORRECT THE 17507691 INCORRECT APPLICATION NUMBER CORRECTED TO 17508705 PREVIOUSLY RECORDED AT REEL: 057882 FRAME: 0807. ASSIGNOR(S) HEREBY CONFIRMS THE ASSIGNMENT. Recorded Oct 25, 2021
From: CRUANES, THIERRY; DAGEVILLE, BENOIT; MOTIVALA, ASHISH; ZUKOWSKI, MARCIN
To: SNOWFLAKE COMPUTING INC.
Reel/Frame 058215/0655 →
CORRECTIVE ASSIGNMENT TO CORRECT THE REMOVE 17/507961 REPLACE 17/508.705 PREVIOUSLY RECORDED AT REEL: 057882 FRAME: 0807. ASSIGNOR(S) HEREBY CONFIRMS THE . Recorded Oct 22, 2021
From: CRUANES, THIERRY; DAGEVILLE, BENOIT; MOTIVALA, ASHISH; ZUKOWSKI, MARCIN
To: SNOWFLAKE COMPUTING INC.
Reel/Frame 057882/0807 →
CHANGE OF NAME Recorded Oct 22, 2021
From: SNOWFLAKE COMPUTING INC.
To: SNOWFLAKE INC.
Reel/Frame 057893/0337 →
Continuity (5)
Continuation 16861516 · Apr 29, 2020
Continuation 16688888 · Nov 19, 2019
Continuation 16399448 · Apr 30, 2019
Continuation 15210536 · Jul 14, 2016
Related Publication 20220050808A1 · Feb 17, 2022