IP Library Granted Patent US 12670158
Granted Patent B2
US 12670158 · App. 18/657,767 · Granted Jun 30, 2026

Understanding storage utilization of a caching system through incoming traffic

Inventor: Mohamed Azmil Macksood (Oslo, NO)
Assignee: Microsoft Technology Licensing, LLC.
G06F16/24539
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12670158
App. No.
18/657,767
Granted
Jun 30, 2026
Kind
B2
Abstract

Database management techniques can gauge real-time caching states of no-schema-based (noSQL) databases (DBs) during runtime operation by maintaining a log table to reflect modifications to the noSQL DB. The log table is maintained by adding row entries to reflect modifications to the noSQL DB and therefore does not requiring querying the noSQL DB. The log table may then be deduplicated to remove stale entries and queried to generate a cost table reflecting a real-time caching state of the noSQL DB.

Claims (46)

1 . A method for database optimization, the method comprising:

creating, by a processor, a log table by querying a key-value table of a noSQL database prior to a continuous runtime session of the noSQL database;

maintaining, by the processor, the log table based on modifications to the key-value table of the noSQL database during the continuous runtime session of the noSQL database, wherein at least some of the modifications to the key-value table of the noSQL database impact at least some properties cached in the key-value table of the noSQL database;

creating, by the processor, a cost table for the noSQL database during the continuous runtime session of the noSQL database by querying the log table without directly querying the key-value table of the noSQL database; and

outputting, by the processor, a real-time caching state of the noSQL database based on the cost table during the continuous runtime session of the noSQL database without querying the key-value table of the noSQL database, wherein the real-time caching state of the noSQL database indicates memory storage costs associated with caching the properties in the key-value table of the noSQL database, and wherein the real-time caching state is used to select at least one of the properties cached in the key-value table of the noSQL database for batch deletion when optimizing the noSQL database.

2 . The method of claim 1 , wherein row entries of the log table reflect key-value pairs added to, updated in, and removed from the key-value table of the noSQL database during the continuous runtime session of the noSQL database.

3 . The method of claim 2 , wherein each of the row entries of the log table includes a key parameter identifying a corresponding key-value pair added to, updated in, and removed from the key-value table of the noSQL database, a timestamp parameter identifying when the corresponding key-value pair was added to, updated in, and removed from the key-value table of the noSQL database, and an operation parameter specifying whether the corresponding key-value pair was added to, updated in, and removed from the key-value table of the noSQL database.

4 . The method of claim 1 , wherein the log table is maintained for a predetermined sliding window corresponding to a duration of the continuous runtime session of the noSQL database.

5 . The method of claim 1 , further comprising:

selecting, by the processor during the continuous runtime session of the noSQL database, a subset of properties in the key-value table to prune from the key-value table based on the real-time caching state; and

pruning, by the processor, the subset of properties from the key-value table of the noSQL database after completion of the continuous runtime session of the noSQL database.

6 . The method of claim 1 , wherein updating the log table comprises:

adding a first row entry to the log table reflecting addition of a key-value pair of the key-value table during the continuous runtime session of the noSQL database.

7 . The method of claim 6 , wherein updating the log table further comprises:

adding a second row entry to the log table reflecting deletion of the key-value pair of the key-value table during the continuous runtime session of the noSQL database.

8 . The method of claim 7 , wherein creating the cost table comprises:

sorting the log table based on a key column of the log table, the key column of the log table cross-referencing row entries of the log table with key-value pairs of the key-value table; and

removing both the first row entry and the second row entry from the log table to reflect that the key-value pair was added to and subsequently deleted from the key-value table during the continuous runtime session of the noSQL database.

9 . The method of claim 1 , wherein the real-time caching state of the noSQL database is determined by querying the cost table without querying the key-value table of the noSQL database.

10 . The method of claim 9 , wherein querying the key-value table of the noSQL database during the continuous runtime session of the noSQL database impacts runtime operation of the noSQL database.

11 . The method of claim 9 , wherein querying the cost table during the continuous runtime session of the noSQL database does not impact runtime operation of the noSQL database.

12 . The method of claim 9 , wherein querying the log table during the continuous runtime session of the noSQL database does not impact runtime operation of the noSQL database.

13 . A computer storage medium having computer-executable instructions that, upon execution by a processor of a computer, cause the processor to at least:

create a log table by querying a key-value table of a noSQL database prior to a continuous runtime session of the noSQL database;

maintain the log table based on modifications to the key-value table of the noSQL database during the continuous runtime session of the noSQL database, wherein at least some of the modifications to the key-value table of the noSQL database impact at least some properties cached in the key-value table of the noSQL database;

create a cost table for the noSQL database during the continuous runtime session of the noSQL database by querying the log table without directly querying the key-value table of the noSQL database; and

output a real-time caching state of the noSQL database based on the cost table during the continuous runtime session of the noSQL database without querying the key-value table of the noSQL database, wherein the real-time caching state of the noSQL database indicates memory storage costs associated with caching the properties in the key-value table of the noSQL database, and wherein the real-time caching state is used to select at least one of the properties cached in the key-value table of the noSQL database for batch deletion when optimizing the noSQL database.

14 . The computer storage medium of claim 13 , wherein row entries of the log table reflect key-value pairs added to, updated in, and removed from the key-value table of the noSQL database during the continuous runtime session of the noSQL database.

15 . The computer storage medium of claim 14 , wherein each of the row entries of the log table includes a key parameter identifying a corresponding key-value pair added to, updated in, and removed from the key-value table of the noSQL database, a timestamp parameter identifying when the corresponding key-value pair was added to, updated in, and removed from the key-value table of the noSQL database, and an operation parameter specifying whether the corresponding key-value pair was added to, updated in, and removed from the key-value table of the noSQL database.

16 . The computer storage medium of claim 13 , wherein the log table is maintained for a predetermined sliding window corresponding to a duration of the continuous runtime session of the noSQL database.

17 . The computer storage medium of claim 13 , the computer-executable instructions further cause the processor to:

select, processor during the continuous runtime session of the noSQL database, a subset of properties in the key-value table to prune from the key-value table based on the real-time caching state; and

prune the subset of properties from the key-value table of the noSQL database after completion of the continuous runtime session of the noSQL database.

18 . The computer storage medium of claim 13 , wherein the computer-executable instructions causing the processor to update the log table further cause the processor to:

add a first row entry to the log table reflecting addition of a key-value pair to the key-value table during the continuous runtime session of the noSQL database; and

add a second row entry to the log table reflecting deletion of the key-value pair to the key-value table during the continuous runtime session of the noSQL database.

19 . The computer storage medium of claim 18 , wherein the computer-executable instructions causing the processor to update the log table further cause the processor to:

sort the log table based on a key column of the log table, the key column of the log table cross-referencing row entries of the log table with key-value pairs of the key-value table; and

remove both the first row entry and the second row entry from the log table to reflect that the key-value pair was added to and subsequently deleted from the key-value table during the continuous runtime session of the noSQL database.

20 . A database management system comprising:

at least one processor; and

at least one memory comprising computer-readable instructions, the at least one processor, the at least one memory and the computer-readable instructions configured to cause the at least one processor to:

create a log table by querying a key-value table of a noSQL database prior to a continuous runtime session of the noSQL database;

maintain the log table based on modifications to the key-value table of the noSQL database during the continuous runtime session of the noSQL database, wherein at least some of the modifications to the key-value table of the noSQL database impact at least some properties cached in the key-value table of the noSQL database;

create a cost table for the noSQL database during the continuous runtime session of the noSQL database by querying the log table without directly querying the key-value table of the noSQL database; and

output a real-time caching state of the noSQL database based on the cost table during the continuous runtime session of the noSQL database without querying the key-value table of the noSQL database, wherein the real-time caching state of the noSQL database indicates memory storage costs associated with caching the properties in the key-value table of the noSQL database, and wherein the real-time caching state is used to select at least one of the properties cached in the key-value table of the noSQL database for batch deletion when optimizing the noSQL database.