/Patent Tracker
MicrosoftGranted patentAI & softwareInterest 3/10

Microsoft patents database system that self-corrects query estimates

Microsoft has patented a method for database systems to improve how they predict the amount of data a query will return. The system compares its initial guess against the actual result, and if the guess is consistently wrong, it automatically switches to a more accurate prediction model.

Why it mattersThis improves the efficiency of large data centers by ensuring database queries run faster and use fewer resources, though it is a technical backend improvement unlikely to be visible to everyday users.

In the filing’s own words

Methods, apparatuses, and products for cardinality estimation feedback for expressions in a database query, including: calculating, for one or more expressions of a database query, a default estimated cardinality and an actual cardinality, wherein the default estimated cardinality is based on an assigned cardinality estimation (CE) model comprising a default CE model, wherein the actual cardinality is based on an execution of the database query; calculating, for the one or more expressions of the database query and based on the default estimated cardinality and the actual cardinality, a default cardinality error; selecting, for a particular expression of the one or more expressions of the database query, based on the default cardinality error for the particular expression exceeding a first threshold, a recommended CE model; and assigning the recommended CE model as the assigned CE model for the particular expression based on an improvement in one or more respective recommended cardinality errors for the particular expression relative one or more respective default cardinality errors for the particular expression exceeding a second threshold, wherein the one or more respective recommended cardinality errors for the particular expression are based on one or more recommended estimated cardinalities calculated using the recommended CE model.

What exactly they claim (claim 1)

1. A method of cardinality estimation feedback for expressions in a database query, comprising: calculating, for one or more expressions of a database query, a default cardinality error associated with a default cardinality estimation (CE) model based on an estimated cardinality produced by the default CE model and an actual cardinality from execution of the one or more expressions; selecting, for a particular expression of the one or more expressions of the database query, based on the default cardinality error for the particular expression exceeding a first threshold, a recommended CE model as a potential replacement for the default CE model for the particular expression; monitoring cardinality errors of the default CE model and cardinality errors of the recommended CE model based on further executions of the particular expression; and assigning the recommended CE model to the particular expression based on reduction in the cardinality errors of the recommended CE model with respect to the cardinality errors of the default CE model exceeding a second threshold.

Facts

Company
Microsoft (Microsoft Technology Licensing, LLC)
Official title
Cardinality estimation feedback for expressions in a database query
Patent number
US12762122B2
Application number
19083395
Filed
Mar 18, 2025
Granted
Oct 13, 2026
Inventors
5
Claims
20

Classified under

G06F 16/24545 Physics & computing

More from Microsoft in AI & software

Summaries are simplified from the filing’s own abstract and first claim. A patent filing is not a product announcement.
Patent data and drawings: U.S. Patent and Trademark Office (USPTO). Nebula is not affiliated with or endorsed by the USPTO.