Patent ID: 11868347
Assignee: AMAZON TECHNOLOGIES, INC.
Field: Computer technology (Electrical engineering)
Classification: CPC G | IPC G

Claim 0:
1. A system, comprising:
at least one processor; and
a memory, storing program instructions that when executed by the at least one processor, cause the at least one processor to implement a query engine for a database, the query engine configured to:
receive a query that references a materialized view created from one or tables of the database;
determine that the materialized view of the database cannot be used to perform the query;
rewrite the query to generate a query plan that:
queries, to using one or more transaction identifiers generated at runtime as parameter values for one or more stored procedures that are created as part of creating the materialized view, the one or more tables of the database from which the materialized view was created to obtain one or more changes made to the one or more tables; and
incorporates the one or more changes directly into generating a result for the query to be consistent with an up-to-date version of the materialized view; and

perform the rewritten query; and
return a result for the rewritten query.