IP Library Granted Patent US 11,294,861
Granted Patent B2
US 11,294,861 · App. 17/141,165 · Granted Apr 5, 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,294,861
App. No.
17/141,165
Granted
Apr 5, 2022
Kind
B2
Abstract

A system and method for pruning data based on metadata. The method may include receiving a query that includes a plurality of predicates and identifying one or more applicable files including 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, configured to:

partition database data into a plurality of partitions, wherein, for each of the plurality of partitions, the metadata stored in the metadata includes metadata corresponding to multiple columns of the database data and a plurality of different types of partition ranges that characterize at least one of the plurality of partitions; and

subsequent to the partitioning of the database data,

receive a query comprising one or more clauses;

determine whether one or more of the plurality of partitions satisfies a condition of at least one of the plurality of clauses using at least the metadata;

prune a partition from the plurality of partitions that does not satisfy the condition of at least one of the plurality of clauses to create a reduced set of partitions; and

use the reduced set of partitions to execute the query.

2. The system of claim 1 , wherein the determination comprises reading the metadata stored in the metadata store.

3. The system of claim 1 , wherein to prune the partition, the processor is further configured to:

identify the partition to be pruned without accessing the data comprising the partition.

4. The system of claim 3 , wherein to identify the partition that does not satisfy at least one of the conditions, the processor is further configured to:

read the metadata pertaining to the partition, wherein the metadata stored in the metadata store.

5. The system of claim 1 , wherein the metadata includes a minimum and maximum value for each of the multiple columns of the database data and each of the plurality of partitions.

6. The system of claim 1 , wherein each partition of the plurality of partitions comprises a discrete selection of the database data.

7. The system of claim 6 , wherein the processor is further configured to:

generate the metadata comprising information for each partition; and

store the metadata in the metadata store separate from the partition.

8. The system of claim 1 , wherein to read the metadata, the processor is further configured to:

determine, based on the metadata, a range of one or more values of database data stored in one of the partitions; and

determine whether any data within the range of one or more values of database data stored in the one partition satisfies the condition of at least one of the plurality of clauses.

9. The system of claim 8 , wherein the determining whether each of the plurality of partitions, satisfies the condition of at least one of the plurality of clauses is based on at least a determination that some data within the range of one or more values stored in the certain partition satisfies the condition of at least one of the plurality of clauses.

10. The system of claim 1 , wherein the processor is further configured to identify at least one column within each of the plurality of partitions that comprises database data satisfying the condition of at least one of the plurality of clauses.

11. The system of claim 1 , wherein the pruned partition is not used during execution of the query.

12. A method comprising:

partitioning database data into a plurality of partitions, wherein, for each of the plurality of partitions, the metadata stored in the metadata includes metadata corresponding to multiple columns of the database data and a plurality different types of partition ranges that characterize at least one of the plurality of partitions; and

subsequent to the partitioning of the database data,

receiving a query comprising one or more clauses;

determining whether one or more of the plurality of partitions satisfies a condition of at least one of the plurality of clauses using at least the metadata;

pruning a partition from the plurality of partitions that does not satisfy the condition of at least one of the plurality of clauses to create a reduced set of partitions; and

using the reduced set of partitions to execute the query.

13. The method of claim 12 , wherein the determination comprises reading the metadata stored in the metadata store.

14. The method of claim 12 , wherein pruning the partitions comprises:

identifying the partition to be pruned without accessing the data comprising the partition.

15. The method of claim 14 , wherein identifying the inapplicable partitions comprises:

reading the metadata pertaining to each of the partitions, the metadata stored in the metadata store.

16. The method of claim 12 , wherein the metadata includes a minimum and maximum value for each of the multiple columns of the database data and each of the plurality of partitions.

17. The method of claim 12 , wherein each partition of the plurality of partitions comprises a discrete selection of the database data.

18. The method of claim 17 , further comprising:

generating the metadata comprising information for each partition; and

storing the metadata in the metadata store separate from the partition.

19. The method of claim 12 , wherein reading the metadata comprises:

determining, based on the metadata, a range of one or more values of database data stored in one of the partitions; and

determining whether any data within the range of one or more values of database data stored in the one partition satisfies the condition of at least one of the plurality of clauses.

20. The method of claim 19 , wherein the determining whether each of the plurality of partitions comprises:

determining that a certain partition satisfies the condition of at least one of the plurality of clauses is based on at least a determination that some data within the range of one or more values stored in the certain partition satisfies the condition of at least one of the plurality of clauses.

21. The method of claim 20 , wherein identifying the one or more applicable partitions comprises identifying the certain file as being an applicable file in response to a determination that some data within the range of one or more values stored in the certain file satisfies the condition of at least one of the plurality of clauses.

22. The method of claim 12 , wherein the pruned partition is not used during execution of the query.

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

partition database data into a plurality of partitions, wherein, for each of the plurality of partitions, the metadata stored in the metadata includes metadata corresponding to multiple columns of the database data and a plurality of different types of partition ranges that characterize at least one of the plurality of partitions; and

subsequent to the partitioning of the database data,

receive a query comprising one or more clauses;

determine whether one or more of the plurality of partitions satisfies a condition of at least one of the plurality of clauses using at least the metadata;

prune a partition from the plurality of partitions that does not satisfy the condition of at least one of the plurality of clauses to create a reduced set of partitions; and

use the reduced set of partitions to execute the query.

24. The non-transitory computer readable storage media of claim 23 , wherein the determination comprises reading the metadata stored in the metadata store.

Assignments (2)
CHANGE OF NAME Recorded Feb 25, 2022
From: SNOWFLAKE COMPUTING INC.
To: SNOWFLAKE INC.
Reel/Frame 059250/0942 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Feb 23, 2022
From: ZUKOWSKI, MARCIN; DAGEVILLE, BENOIT; CRUANES, THIERRY; MOTIVALA, ASHISH
To: SNOWFLAKE COMPUTING INC.
Reel/Frame 059081/0787 →
Continuity (5)
Continuation 16861516 · Apr 29, 2020
Continuation 16688888 · Nov 19, 2019
Continuation 16399448 · Apr 30, 2019
Continuation 15210536 · Jul 14, 2016
Related Publication 20210124717A1 · Apr 29, 2021
Cited By (1)
US 12,688,171