US 12,242,496 B2
Future scheduler for database systems
Marco H. Kroll, Berlin (DE); Mariusz Kwiczala, Berlin (DE); Prayag Chandran Nirmala, Seattle, WA (US); William Waddington, Stateline, NV (US); and Shijie Xu, Seattle, WA (US)
Assigned to Snowflake Inc., Bozeman, MT (US)
Filed by Snowflake Inc., Bozeman, MT (US)
Filed on Jan. 6, 2023, as Appl. No. 18/151,327.
Prior Publication US 2024/0232213 A1, Jul. 11, 2024
Int. Cl. G06F 16/25 (2019.01); G06F 9/48 (2006.01); G06F 16/2455 (2019.01)
CPC G06F 16/254 (2019.01) [G06F 9/4881 (2013.01); G06F 16/2455 (2019.01)] 30 Claims
OG exemplary drawing
 
1. A system comprising:
at least one hardware processor; and
a memory storing instructions that cause the at least one hardware processor to perform operations comprising:
reserving, by a slot scheduler component, capacity to execute an incoming query via communication with a warehouse scheduling component, the warehouse scheduling component managing the capacity of a set of virtual warehouses for executing the incoming query, the reserved capacity comprising a set of slots, each slot comprising an allocation of resources provided by a particular virtual warehouse from the set of virtual warehouses, the slot scheduler component being provided by a compute service manager, the compute service manager being separate from the warehouse scheduling component, the communication with the warehouse scheduling component comprising the slot scheduler component sending a request for the capacity to execute the incoming query;
storing, by the warehouse scheduling component, information related to the request from the slot scheduler component, the information comprising a set of slots utilized by the slot scheduler component, a lease time per slot, and a timestamp of a last request received from the slot scheduler component;
receiving a query from a client device, the query comprising a set of query statements;
determining, by a query compiler during compilation of the query received from the client device, that the query, when executed, includes a runtime of less than a predetermined time, the query compiler being provided by the compute service manager, the compute service manager being separate from the set of virtual warehouses;
determining, by the slot scheduler component, that a set of resources to be utilized by the query during execution is provided by a slot from the set of slots, the slot corresponding to a specific amount of memory on a virtual warehouse for an amount of time, the determining based at least in part on determining that execution of the query does not consume more than the specific amount of memory as provided by the slot;
performing a first scheduling process for execution of the query using the slot;
determining that an available slot is provided by the virtual warehouse; and
executing, using the virtual warehouse, the query using the available slot.