US 12,277,117 B1
Optimized validation of cached query plans
Karan Chadha, Kirkland, WA (US); Prashant Gaharwar, Fremont, CA (US); Shrainik Jain, Seattle, WA (US); Nicola Dan Onose, San Jose, CA (US); and Jiaqi Yan, Menlo Park, CA (US)
Assigned to Snowflake Inc., Bozeman, MT (US)
Filed by Snowflake Inc., Bozeman, MT (US)
Filed on Apr. 29, 2024, as Appl. No. 18/649,537.
Int. Cl. G06F 16/24 (2019.01); G06F 11/34 (2006.01); G06F 16/2453 (2019.01)
CPC G06F 16/24542 (2019.01) [G06F 11/3409 (2013.01); G06F 16/24539 (2019.01)] 20 Claims
OG exemplary drawing
 
1. A network-based database system comprising:
at least one hardware processor; and
a memory storing instructions that cause the at least one hardware processor to perform operations comprising:
receiving a query, the query including a statement for performing the query;
performing a lookup operation on a stored plan cache based on the query;
performing, in response to a cache match of the query to a stored query plan in the stored plan cache based on the lookup operation, a validation process of the stored query plan;
determining whether the stored query plan is valid based on the validation process;
performing, in response to determining that the stored query plan is valid, a program building process for the stored query plan to generate a final query plan; and
sending the final query plan to an execution node for execution.