US 11,841,849 B2
Systems and methods for efficiently querying external tables
Subramanian Muralidhar, Mercer Island, WA (US); Benoit Dageville, San Mateo, CA (US); Thierry Cruanes, San Mateo, CA (US); Nileema Shingte, San Mateo, CA (US); Saurin Shah, Kirkland, WA (US); Torsten Grabs, San Mateo, CA (US); and Istvan Cseri, Seattle, WA (US)
Assigned to Snowflake Inc., Bozeman, MT (US)
Filed by Snowflake Inc., Bozeman, MT (US)
Filed on Jul. 15, 2022, as Appl. No. 17/812,878.
Application 17/812,878 is a continuation of application No. 17/455,798, filed on Nov. 19, 2021, granted, now 11,397,729.
Application 17/455,798 is a continuation of application No. 16/385,837, filed on Apr. 16, 2019, granted, now 11,194,795.
Prior Publication US 2022/0350795 A1, Nov. 3, 2022
This patent is subject to a terminal disclaimer.
Int. Cl. G06F 16/20 (2019.01); G06F 16/242 (2019.01); G06F 3/06 (2006.01); G06F 16/23 (2019.01); G06F 16/16 (2019.01); G06F 16/25 (2019.01); G06F 9/54 (2006.01); G06F 16/22 (2019.01); G06F 16/2455 (2019.01)
CPC G06F 16/2423 (2019.01) [G06F 3/0605 (2013.01); G06F 3/067 (2013.01); G06F 3/0644 (2013.01); G06F 3/0653 (2013.01); G06F 9/542 (2013.01); G06F 16/164 (2019.01); G06F 16/2282 (2019.01); G06F 16/2358 (2019.01); G06F 16/2393 (2019.01); G06F 16/24557 (2019.01); G06F 16/256 (2019.01)] 25 Claims
OG exemplary drawing
 
1. A method performed by a database platform executing instructions on at least one hardware processor, the method comprising:
receiving a query directed at least in part to external data in an external table stored on a data storage platform external to the database platform, the external table comprising a plurality of partitions, the plurality of partitions being organized in the external table based on information located in a source directory, the source directory defining folders and folder locations, the folders storing files corresponding to particular partitions;
identifying, from external-table metadata, a subset of the plurality of partitions of the external table to be scanned for data that satisfies the query, the external-table metadata being stored by the database platform, the identifying of the subset of the plurality of partitions to be scanned for data that satisfies the query comprising:
using the query to identify multiple instances of partition-grouping external-table metadata among the external-table metadata, each instance of partition-grouping external-table metadata comprising collective metadata regarding a distinct group of partitions in the plurality of partitions;
identifying the identified subset of the plurality of partitions as those partitions that correspond to the identified multiple instances of partition-grouping external-table metadata;
identifying data that satisfies the query by scanning the identified subset of the plurality of partitions based on application of the query to the source directory; and
responding to the query at least in part with the identified data that satisfies the query.