IP Library › Granted Patent US 12,505,081
Granted Patent B1
US 12,505,081 · App. 19/246,952 · Granted Dec 23, 2025

Query processing using min/max decisive row positions

Inventors: Dmitrii Maksimenko (Berlin, DE); Noble Mushtak (San Mateo, CA); Ankur Sharma (Berlin, DE); Malek Souissi (Berlin, DE); Lars Volker (Los Altos, CA)
Assignee: Snowflake Inc.
G06F16/219G06F16/215G06F16/235G06F16/2365
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,505,081
App. No.
19/246,952
Granted
Dec 23, 2025
Kind
B1
Abstract

The subject technology provides modifying data in a partition stores a version identifier and a set of physical row positions in a header, including minimum and maximum value occurrences for each column. When a query to modify data is received, the subject technology determines which rows to modify, checks eligibility for skipping partition scanning, and compares the to-be-modified positions with the stored positions. If no stored positions are modified, the subject technology skips scanning and maintains existing statistics, and creates a new combined partition without recalculating statistics. If modifications are made, the subject technology evaluates eligibility for processing using delta files and a bitset, or performs a copy-on-write process if ineligible.

Claims (88)

1 . A method comprising:

storing, in a header of a partition, a version identifier of one byte, and

an array of physical row positions comprising one position indicating a minimum value occurrence for each column, and one position indicating a maximum value occurrence for each column;

receiving a query to modify data in the partition;

determining a set of physical row positions to be modified by identifying rows targeted for deletion or update, and obtaining corresponding physical row positions;

determining eligibility for skipping partition scanning and avoiding statistics recomputation by confirming that a deletion ratio is below a threshold, verifying that a partition size meets minimum requirements, and validating a presence of required metadata;

comparing positions to be modified against stored positions by reading min/max decisive positions from the header, checking for overlap between modification positions and stored positions, and determining whether any stored position will be modified;

in response to determining that no stored position will be modified, skipping partition scanning, maintaining a set of existing statistics, and creating a combined partition without recomputation of statistics;

in response to determining that at least one stored position will be modified, evaluating eligibility for processing utilizing at least one delta file and a bitset; and

in response to determining that processing utilizing at least one delta file and the bitset is ineligible, perform a copy-on-write process for processing the query to modify data in the partition.

2 . The method of claim 1 , wherein storing the array comprises:

deduplicating a set of positions that occur across multiple columns;

storing positions as a list without delimiting; and

storing deduplicated positions in a format bounded by a particular number of columns bytes.

3 . The method of claim 1 , wherein determining eligibility for skipping partition scanning and avoiding statistics recomputation further comprises:

extracting a set of stored decisive positions; and

validating position information before further processing the query to modify data in the partition.

4 . The method of claim 1 , wherein comparing positions to be modified comprises:

reading stored min/max decisive positions during statistics computation;

tracking physical row positions as minimum and maximum values are encountered; and

maintaining position information without additional computational overhead.

5 . The method of claim 1 , wherein creating the combined partition comprises:

copying a set of positions from the partition to be reutilized for the combined partition.

6 . The method of claim 1 , wherein maintaining existing statistics comprises:

preserving minimum and maximum values across all columns of the partition.

7 . The method of claim 1 , further comprising:

buffering a set of input rowsets;

determining, using the buffered set of input rowsets, row information indicating a corresponding partition; and

identifying, using the row information, all rows from the partition to be processed as part of executing the query.

8 . The method of claim 1 , further comprising:

determining that the partition includes a set of min/max decisive positions in the header; and

verifying column metadata in a delta file header for a particular combined partition.

9 . The method of claim 1 , further comprising:

receiving row information from a table scan operator;

extracting, using the row information, a set of logical and physical row positions; and

obtaining file access information for root and delta files corresponding to a particular combined partition.

10 . A system comprising:

at least one hardware processor; and

at least one memory storing instructions that cause the at least one hardware processor to perform operations comprising:

storing, in a header of a partition, a version identifier of one byte, and

an array of physical row positions comprising one position indicating a minimum value occurrence for each column, and one position indicating a maximum value occurrence for each column;

receiving a query to modify data in the partition;

determining a set of physical row positions to be modified by identifying rows targeted for deletion or update, and obtaining corresponding physical row positions;

determining eligibility for skipping partition scanning and avoiding statistics recomputation by confirming that a deletion ratio is below a threshold, verifying that a partition size meets minimum requirements, and validating a presence of required metadata;

comparing positions to be modified against stored positions by reading min/max decisive positions from the header, checking for overlap between modification positions and stored positions, and determining whether any stored position will be modified;

in response to determining that no stored position will be modified, skipping partition scanning, maintaining a set of existing statistics, and creating a combined partition without recomputation of statistics;

in response to determining that at least one stored position will be modified, evaluating eligibility for processing utilizing at least one delta file and a bitset; and

in response to determining that processing utilizing at least one delta file and the bitset is ineligible, perform a copy-on-write process for processing the query to modify data in the partition.

11 . The system of claim 10 , wherein storing the array comprises:

deduplicating a set of positions that occur across multiple columns;

storing positions as a list without delimiting; and

storing deduplicated positions in a format bounded by a particular number of columns bytes.

12 . The system of claim 10 , wherein determining eligibility for skipping partition scanning and avoiding statistics recomputation further comprises:

extracting a set of stored decisive positions; and

validating position information before further processing the query to modify data in the partition.

13 . The system of claim 10 , wherein comparing positions to be modified comprises:

reading stored min/max decisive positions during statistics computation;

tracking physical row positions as minimum and maximum values are encountered; and

maintaining position information without additional computational overhead.

14 . The system of claim 10 , wherein creating the combined partition comprises:

copying a set of positions from the partition to be reutilized for the combined partition.

15 . The system of claim 10 , wherein maintaining exist statistics comprises:

preserving minimum and maximum values across all columns of the partition.

16 . The system of claim 10 , wherein the operations further comprise:

buffering a set of input rowsets;

determining, using the buffered set of input rowsets, row information indicating a corresponding partition; and

identifying, using the row information, all rows from the partition to be processed as part of executing the query.

17 . The system of claim 10 , wherein the operations further comprise:

determining that the partition includes a set of min/max decisive positions in the header; and

verifying column metadata in a delta file header for a particular combined partition.

18 . The system of claim 10 , wherein the operations further comprise:

receiving row information from a table scan operator;

extracting, using the row information, a set of logical and physical row positions; and

obtaining file access information for root and delta files corresponding to a particular combined partition.

19 . A non-transitory computer-storage medium comprising instructions that, when executed by one or more processors of a machine, configure the machine to perform operations comprising:

storing, in a partition header of a partition, a version identifier of one byte, and

an array of physical row positions comprising one position indicating a minimum value occurrence for each column, and one position indicating a maximum value occurrence for each column;

receiving a query to modify data in the partition;

determining a set of physical row positions to be modified by identifying rows targeted for deletion or update, and obtaining corresponding physical row positions;

determining eligibility for skipping partition scanning and avoiding statistics recomputation by confirming that a deletion ratio is below a threshold, verifying that a partition size meets minimum requirements, and validating a presence of required metadata;

comparing positions to be modified against stored positions by reading min/max decisive positions from the partition header, checking for overlap between modification positions and stored positions, and determining whether any stored position will be modified;

in response to determining that no stored position will be modified, skipping partition scanning, maintaining a set of existing statistics, and creating a combined partition without recomputation of statistics;

in response to determining that at least one stored position will be modified, evaluating eligibility for processing utilizing at least one delta file and a bitset; and

in response to determining that processing utilizing at least one delta file and the bitset is ineligible, performing a copy-on-write process for processing the query to modify data in the partition.

20 . The non-transitory computer-storage medium of claim 19 , wherein storing the array comprises:

deduplicating a set of positions that occur across multiple columns;

maintaining associations between positions and corresponding columns; and

storing deduplicated positions in a format bounded by a particular number of columns bytes.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Aug 13, 2025
From: MAKSIMENKO, DMITRII; MUSHTAK, NOBLE; SHARMA, ANKUR; SOUISSI, MALEK; VOLKER, LARS
To: SNOWFLAKE INC.
Reel/Frame 072008/0208 →
References Cited (2)
US 10474650B1 · Sivathanu · 2019 [cited by examiner]
US 11138175B2 · Arye · 2021 [cited by examiner]