US2023359627A1PendingUtilityA1

Sharing compiled code for executing queries across query engines

Assignee: AMAZON TECH INCPriority: Mar 29, 2019Filed: Jul 12, 2023Published: Nov 9, 2023
Est. expiryMar 29, 2039(~12.7 yrs left)· nominal 20-yr term from priority
G06F 16/24552G06F 16/2445G06F 16/2255G06F 16/2443G06F 16/24539G06F 16/2458G06F 16/24561
68
PatentIndex Score
0
Cited by
0
References
0
Claims

Abstract

Compiled portions of code generated to perform a query plan at a query engine may be shared with other query engines. A data store, separate from the query engines, may store compiled portions of query code generated for different queries. If a query engine does not have a locally stored compiled portion of query code, then the separate data store may be accessed in order to obtain a compiled portion of query code, allowing reuse of compiled query code across different queries engines for queries directed to different databases.

Claims

exact text as granted — not AI-modified
1 - 20 . (canceled) 
     
     
         21 . A system, comprising:
 one or more processors; and   a memory, that stores program instructions that, when executed by the at least one processor, cause the one or more processors to implement a database service, configured to:
 detect a warming event for pre-populating a local cache for a query engine; 
 identify stored portions of code received from a plurality of query engines hosted by the database service for respective queries performed by the plurality of query engines to different respective databases of the database service; 
 compile the stored portions of code; and 
 provide compiled versions of one or more of the stored portions of code to store in the local cache for the query engine to perform one or more subsequent queries that the query engine is likely to receive. 
   
     
     
         22 . The system of  claim 21 , wherein the warming event is detection of a different compiler used to compile code generated for performing queries at the database service and wherein the compilation of the stored portions of the code is performed using the different compiler. 
     
     
         23 . The system of  claim 21 , wherein the warming event is detection of a different version of the query engine and wherein the compilation of the stored portions of the code is performed based on the different version of the query engine. 
     
     
         24 . The system of  claim 21 , wherein the stored portions of code are identified according to source identifiers maintained for previously compiled versions of the stored portions of the code and wherein the source identifiers are usable to locate the stored portions of code. 
     
     
         25 . The system of  claim 21 , wherein the database service is further configured to obtain respective query plans for the respective queries and wherein the compilation of the stored portions of the code is performed using the respective query plans. 
     
     
         26 . The system of  claim 21 , wherein the database service is further configured to store the compiled versions of the stored portions of code in a global compiled code store. 
     
     
         27 . The system of  claim 26 , wherein the database service is further configured to delete one of the compiled versions from the global compiled code store according to a time-to-live value for the one compiled version. 
     
     
         28 . A method, comprising:
 detecting, at a database service, a warming event for pre-populating a local cache for a query engine;   identifying, by the database service, stored portions of code received from a plurality of query engines hosted by the database service for respective queries performed by the plurality of query engines to different respective databases of the database service;   compiling, by the database service, the stored portions of code; and   providing, by the database service, compiled versions of one or more of the stored portions of code to store in the local cache for the query engine to perform one or more subsequent queries that the query engine is likely to receive.   
     
     
         29 . The method of  claim 28 , wherein the warming event is detection of a different compiler used to compile code generated for performing queries at the database service and wherein the compilation of the stored portions of the code is performed using the different compiler 
     
     
         30 . The method of  claim 28 , wherein the warming event is detection of a different version of the query engine and wherein the compilation of the stored portions of the code is performed based on the different version of the query engine. 
     
     
         31 . The method of  claim 28 , wherein the stored portions of code are identified according to source identifiers maintained for previously compiled versions of the stored portions of the code and wherein the source identifiers are usable to locate the stored portions of code. 
     
     
         32 . The method of  claim 28 , wherein the database service is further configured to obtain respective query plans for the respective queries and wherein the compilation of the stored portions of the code is performed using the respective query plans. 
     
     
         33 . The method of  claim 28 , further comprising storing the compiled versions of the stored portions of code in a global compiled code store. 
     
     
         34 . The method of  claim 33 , further comprising deleting one of the compiled versions from the global compiled code store according to a time-to-live value for the one compiled version 
     
     
         35 . One or more non-transitory computer-readable storage media storing program instructions that, when executed on or across one or more computing devices, cause the one or more computing devices to implement a database service, that implements:
 detecting a warming event for pre-populating a local cache for a query engine;   identifying stored portions of code received from a plurality of query engines hosted by the database service for respective queries performed by the plurality of query engines to different respective databases of the database service;   compiling the stored portions of code; and   providing compiled versions of one or more of the stored portions of code to store in the local cache for the query engine to perform one or more subsequent queries that the query engine is likely to receive.   
     
     
         36 . The one or more non-transitory computer-readable storage media of  claim 35 , wherein the warming event is detection of a different compiler used to compile code generated for performing queries at the database service and wherein the compilation of the stored portions of the code is performed using the different compiler. 
     
     
         37 . The one or more non-transitory computer-readable storage media of  claim 35 , wherein the warming event is detection of a different version of the query engine and wherein the compilation of the stored portions of the code is performed based on the different version of the query engine. 
     
     
         38 . The one or more non-transitory computer-readable storage media of  claim 35 , wherein the stored portions of code are identified according to source identifiers maintained for previously compiled versions of the stored portions of the code and wherein the source identifiers are usable to locate the stored portions of code. 
     
     
         39 . The one or more non-transitory computer-readable storage media of  claim 35 , wherein the database service is further configured to obtain respective query plans for the respective queries and wherein the compilation of the stored portions of the code is performed using the respective query plans. 
     
     
         40 . The one or more non-transitory computer-readable storage media of  claim 35 , storing further program instructions that when executed on or across the one or more computing devices, cause the database service to further implement storing the compiled versions of the stored portions of code in a global compiled code store.

Join the waitlist — get patent alerts

Track US2023359627A1 — get alerts on status changes and closely related new filings.

We store only your email — no account needed. See our privacy policy.