Patent 11222036 was granted and assigned to Amazon on January, 2022 by the United States Patent and Trademark Office.
A database table may include a column associated with metadata indicative of a requirement to audit access to rows of the table. When a database receives a query, a query optimizer may determine that rows of the table will be accessed when the query is processed. The query optimizer may form a query plan that includes instructions for retrieving data for the column that is needed for generating an audit record for each row accessed. The column associated with the metadata may be included in the record.