US 11,816,103 B1
Dynamic prefetching for database queries
Niket Goel, Seattle, WA (US); Gopi Krishna Attaluri, Cupertino, CA (US); Kamal Kant Gupta, Snoqualmie, WA (US); Tengiz Kharatishvili, Sammamish, WA (US); Stefano Stefani, Issaquah, WA (US); and Alexandre Olegovich Verbitski, Woodinville, WA (US)
Assigned to Amazon Technologies, Inc., Seattle, WA (US)
Filed by Amazon Technologies, Inc., Seattle, WA (US)
Filed on Mar. 1, 2018, as Appl. No. 15/909,886.
Int. Cl. G06F 16/245 (2019.01); G06F 16/2453 (2019.01); G06F 16/22 (2019.01)
CPC G06F 16/24534 (2019.01) [G06F 16/2246 (2019.01)] 20 Claims
OG exemplary drawing
 
1. A system, comprising:
storage for a database;
one or more processors; and
memory to store computer-executable instructions that, if executed, cause the one or more processors to implement a database system configured to:
start prefetching, into a memory buffer, elements of a first table of the database from the storage according to a first prefetch policy to process a query, wherein the query is associated with the first table and a second table of the database, and wherein the first prefetch policy indicates one or more amounts of computational resources for prefetching the elements of the first table of the database for the query;
access, from the memory buffer, a portion of the elements of the database prefetched according to the first prefetch policy to perform the query;
change the first prefetch policy to a second prefetch policy, wherein responsive to changing the first prefetch policy to the second prefetch policy the database system is configured to modify the prefetching to use one or more other amounts of computational resources before completing the prefetching, wherein the one or more other amounts of computational resources are indicated by the second prefetch policy and are different from the one or more amounts of computational resources indicated by the first prefetch policy; and
access, from the memory buffer, another portion of the elements of the database prefetched according to the second prefetch policy to complete the query, wherein elements of the second table are prefetched using the one or more other amounts of computational resources according to the second prefetch policy.