US2024012813A1PendingUtilityA1

Dynamic prefetching for database queries

70
Assignee: AMAZON TECH INCPriority: Mar 1, 2018Filed: Sep 22, 2023Published: Jan 11, 2024
Est. expiryMar 1, 2038(~11.6 yrs left)· nominal 20-yr term from priority
G06F 16/24534G06F 16/2246G06F 16/24552G06F 12/0862G06F 2212/6022G06F 2212/465G06F 12/0868G06F 2212/311G06F 2212/1048G06F 2212/1016H04L 67/568
70
PatentIndex Score
0
Cited by
0
References
0
Claims

Abstract

Methods, systems, and computer-readable media for dynamic prefetching for database queries are disclosed. A query of a database is started according to a first prefetch policy. Before completing the query, the first prefetch policy is changed to a second prefetch policy. A portion of the query is performed according to the second prefetch policy.

Claims

exact text as granted — not AI-modified
1 .- 20 . (canceled) 
     
     
         21 . A method, comprising:
 prefetching, from storage into a memory buffer, a first portion of a database using a first amount of computational resources;   prefetching, from the storage into the memory buffer, a second portion of the database, different from the first portion of the database, using a second amount of computational resources different from the first amount of resources; and   accessing, from the memory buffer, the first portion of the database and the second portion of the database to query the database.   
     
     
         22 . The method as recited in  claim 21 , further comprising:
 configuring prefetching to use the first amount of computational resources prior to prefetching the first portion of the database; and   modifying prefetching to use the second amount of computational resources prior to prefetching the second portion of the database.   
     
     
         23 . The method as recited in  claim 22 , wherein the second amount of computational resources comprises no computational resources, and wherein modifying prefetching to use the second amount of computational resources comprises disabling prefetching for the second portion of the database. 
     
     
         24 . The method as recited in  claim 21 , wherein the query is associated with a first table and a second table of the database, wherein the first portion of the database comprises elements of the first table, and wherein the second portion of the database comprises elements of the second table. 
     
     
         25 . The method as recited in  claim 21 , wherein the query is associated with a first index and a second index of the database, and wherein prefetching the second portion of the database comprises prefetching pages of the second index of the database. 
     
     
         26 . The method as recited in  claim 21 , wherein the query comprises a join of a first table and a second table of the database, wherein the second portion of the database comprises the elements of the second table identified using elements retrieved from the first table. 
     
     
         27 . The method as recited in  claim 21 , wherein performing the query comprises retrieving elements of a non-covering index. 
     
     
         28 . One or more non-transitory computer-accessible 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 to perform:
 prefetching, from storage into a memory buffer, a first portion of a database using a first amount of computational resources;   prefetching, from the storage into the memory buffer, a second portion of the database, different from the first portion of the database, using a second amount of computational resources different from the first amount of resources; and   accessing, from the memory buffer, the first portion of the database and the second portion of the database to query the database.   
     
     
         29 . The one or more non-transitory computer-accessible storage media of  claim 28 , the database further performing:
 configuring prefetching to use the first amount of computational resources prior to prefetching the first portion of the database; and   modifying prefetching to use the second amount of computational resources prior to prefetching the second portion of the database.   
     
     
         30 . The one or more non-transitory computer-accessible storage media of  claim 29 , wherein modifying prefetching to use the second amount of computational resources comprises modifying a maximum number of prefetch requests to perform over a period of time. 
     
     
         31 . The one or more non-transitory computer-accessible storage media of  claim 28 , wherein the query is associated with a first table and a second table of the database, wherein the first portion of the database comprises elements of the first table, and wherein the second portion of the database comprises elements of the second table. 
     
     
         32 . The one or more non-transitory computer-accessible storage media of  claim 28 , wherein the first amount of computational resources comprises no computational resources, and wherein modifying prefetching to use the second amount of computational resources comprises enabling prefetching for the second portion of the database. 
     
     
         33 . The one or more non-transitory computer-accessible storage media of  claim 28 , wherein the query is associated with a first index and a second index of the database, and wherein prefetching the second portion of the database comprises prefetching pages of the second index of the database. 
     
     
         34 . The one or more non-transitory computer-accessible storage media of  claim 28 , wherein prefetching the second portion of the database comprises prefetching elements of the database indicated in a prefetch request, wherein the prefetch request is assigned a priority relative to other prefetch requests, and wherein one or more other prefetch requests associated with the query are discarded based at least in part on an older age of the one or more prefetch requests relative to the prefetch request. 
     
     
         35 . A system, comprising:
 storage for a database;   a memory buffer;   one or more processors; and   memory to store computer-executable instructions that, when executed, cause the one or more processors to implement a database system configured to:
 prefetch, from the storage into the memory buffer, a first portion of a database using a first amount of computational resources; 
 prefetch, from the storage into the memory buffer, a second portion of the database, different from the first portion of the database, using a second amount of computational resources different from the first amount of resources; and 
 access, from the memory buffer, the first portion of the database and the second portion of the database to query the database. 
   
     
     
         36 . The system as recited in  claim 35 , wherein the first amount of computational resources comprises a first number of threads usable to perform prefetching, wherein the second amount of computational resources comprises a second number of threads usable to perform prefetching different from the first number of threads. 
     
     
         37 . The system as recited in  claim 35 , the database system further configured to:
 configure prefetching to use the first amount of computational resources prior to prefetching the first portion of the database; and   modify prefetching to use the second amount of computational resources prior to prefetching the second portion of the database.   
     
     
         38 . The system as recited in  claim 37 , wherein the second amount of computational resources comprises no computational resources, and wherein to modify prefetching to use the second amount of computational resources the database system is configured to disable prefetching for the second portion of the database. 
     
     
         39 . The system as recited in  claim 35 , wherein the query is associated with a first table and a second table of the database, wherein the first portion of the database comprises elements of the first table, and wherein the second portion of the database comprises elements of the second table. 
     
     
         40 . The system as recited in  claim 35 , wherein prefetching the second portion of the database comprises prefetching elements of the database indicated in a prefetch request, wherein the prefetch request is assigned a priority relative to other prefetch requests, and wherein one or more other prefetch requests associated with the query are discarded based at least in part on an older age of the one or more prefetch requests relative to the prefetch request.

Cited by (0)

No later patents cite this yet.

References (0)

No backward citations on record.