Late materialization of queried data in database cache
AssigneeGoogle Inc.
InventorsXiaobin Ma, Xun Cheng, Viral Shah, Anjan Kumar Amirishetty
Life of this patent
Estimating the term…
Abstract
Aspects of the disclosure are directed to late materialization of attributes in response to queries to a database implementing a database cache. Queried data is materialized in temporary memory before the data is projected as part of generating a result to the query. Instead of materializing all of the attributes referenced in a query before executing the query, a database management system materializes attributes as “late” as possible—when the operation needing the attributes is executed. The operation needing the attributes can be performed sooner, as opposed to materializing all referenced attributes are materialized before executing the query.
Claims20
A system comprising:
- one or more processors configured to:
- receive a query for data in a database comprising one or more tables, each table comprising one or more respective attributes, the query referencing a plurality of attributes;
- determine a first execution step for executing the query, wherein the first execution step is associated with a first respective query operation of the received query
- execute the first respective query operation of the first execution step, wherein execution of the first respective query operation comprises:
- determine, from the first execution step, one or more first attributes of the plurality of attributes needed for executing the first respective query operation of the first execution step;
- retrieve the one or more first attributes from a database cache caching the plurality of attributes from the one or more tables;
- and
- execute the first execution step;
- and
- determine a second execution step for executing the query, wherein the second execution step is associated with a second respective query operation of the received query;
- execute the second respective query operation of the second execution step, wherein execution of the second respective query operation comprises:
- determine, from the second query execution step, one or more second attributes of the plurality of attributes that are different from the one or more first attributes and that are needed for executing the second respective query operation of the second execution step;
- retrieve the one or more second attributes from the database cache;
- and
- execute the second execution step.
A computer-implemented method, comprising:
- receiving, by one or more processors, a query for data of a database comprising one or more tables, each table of the one or more tables comprising one or more respective attributes, the query referencing a plurality of attributes included in the one or more tables;
- determining, by the one or more processors, a first execution step for executing the query, wherein the first execution step is associated with a first respective query operation of the received query;
- executing, by the one or more processors, the first respective query operation of the first execution step, wherein execution of the first respective query operation comprises:
- determining, from the first query execution step, one or more first attributes of the plurality of attributes needed for executing the first respective query operation of the first execution step;
- retrieving the one or more first attributes from a database cache caching the plurality of attributes from the one or more tables;
- and
- executing the first execution step;
- and
- determining, by the one or more processors, a second execution step for executing the query, wherein the second execution step is associated with a second respective query operation of the received query;
- executing, by the one or more processors, the second respective query operation of the second execution step, wherein execution of the second respective query operation comprises:
- determining, from the second query execution step, one or more second attributes of the plurality of attributes that are different from the one or more first attributes and that are needed for executing the second respective query operation of the second execution step;
- retrieving the one or more second attributes from the database cache;
- and
- executing the second execution step.
One or more non-transitory computer-readable storage media encoding instructions that when executed by one or more processors, cause the one or more processors to perform operations comprising:
- receiving, by one or more processors, a query for data of a database comprising one or more tables, each table of the one or more tables comprising one or more respective attributes, the query referencing a plurality of attributes included in the one or more tables;
- determining, by the one or more processors, a first execution step for executing the query, wherein the first execution step is associated with a first respective query operation of the received query;
- executing, by the one or more processors, the first respective query operation of the first execution step, wherein execution of the first respective query operation comprises:
- determining, from the first query execution step, one or more first attributes of the plurality of attributes needed for executing the first respective query operation of the first execution step;
- retrieving the one or more first attributes from a database cache caching the plurality of attributes from the one or more tables;
- and
- executing the first execution step;
- and
- determining, by the one or more processors, a second execution step for executing the query, wherein the second execution step is associated with a second respective query operation of the received query;
- executing, by the one or more processors, the second respective query operation of the second execution step, wherein execution of the second respective query operation comprises:
- determining, from the second query execution step, one or more second attributes of the plurality of attributes that are different from the one or more first attributes and that are needed for executing the second respective query operation of the second execution step;
- retrieving the one or more second attributes from the database cache;
- and
- executing the second execution step.
Dependencies are inferred from the claim text.