US 12,007,994 B1
Partition granular selectivity estimation for predicates
Sangyong Hwang, Sammamish, WA (US); Adem Khachnaoui, Munich (DE); Li Yan, Redmond, WA (US); and Yongsik Yoon, Sammamish, WA (US)
Assigned to Snowflake Inc., Bozeman, MT (US)
Filed by Snowflake Inc., Bozeman, MT (US)
Filed on Jul. 31, 2023, as Appl. No. 18/362,369.
Int. Cl. G06F 16/22 (2019.01); G06F 11/34 (2006.01); G06F 16/2453 (2019.01)
CPC G06F 16/24544 (2019.01) [G06F 11/3452 (2013.01); G06F 16/2282 (2019.01)] 21 Claims
OG exemplary drawing
 
1. A method comprising:
receiving a query including at least one predicate referencing a table stored in a network-based data system, the table including a plurality of partitions, respective partitions of the plurality of partitions including a group of rows and at least one partition of the plurality of partitions being created in response to new data being written to the table, the at least one partition replacing an older partition;
retrieving statistics regarding the plurality of partitions of the table;
generating a partition-granular selectivity estimate for the at least one predicate based on the retrieved statistics;
generating a query plan based on the partition-granular selectivity estimate; and
executing the query plan to generate results of the query.