US 12,072,888 B1
Cooperative memory management in database management systems
Robert Lasch, Walldorf (DE); Thomas Legler, Walldorf (DE); Norman May, Karlsruhe (DE); Kai-Uwe Sattler, Ilmenau (DE); and Bernhard Scheirle, Leimen (DE)
Assigned to SAP SE, Walldorf (DE)
Filed by SAP SE, Walldorf (DE)
Filed on May 12, 2023, as Appl. No. 18/316,624.
Int. Cl. G06F 16/00 (2019.01); G06F 16/22 (2019.01); G06F 16/2455 (2019.01); G06F 16/25 (2019.01)
CPC G06F 16/2456 (2019.01) [G06F 16/2282 (2019.01); G06F 16/252 (2019.01)] 20 Claims
OG exemplary drawing
 
1. In a database management system, a method of managing memory comprising:
storing, by the database management system executing on a computer system, table data from a database in a random access memory, the random access memory having a database management system memory buffer comprising a table data memory allocation for storing table data, a temporary data memory allocation for storing temporary data associated with one or more queries, and a total memory allocation limit;
receiving a query in the database management system;
determining, in the database management system, an amount of memory to process at least a portion of the query;
modifying, by a memory manager, the table data memory allocation and temporary data memory allocation, wherein the memory manager reduces the table data memory allocation and increases the temporary data memory allocation when a combination of the table data and the amount of memory to process at least the portion of the query is greater than the total memory allocation limit so that the combination of the table data in the memory buffer and the amount of memory buffer to process at least the portion of the query is less than the total memory allocation limit; and
storing, by the memory manager, temporary data generated by at least the portion of the query in the memory buffer.