Materializing internal computations in-memory to improve query performance
First Claim
1. A method comprising:
- receiving, by a database server instance, a query;
responsive to receiving the query, identifying, by the database server instance, a set of computations for evaluation during execution of the query;
wherein the set of computations includes a first computation;
responsive to identifying the set of computations, evaluating the first computation, by the database server instance, to obtain a first set of computation results for the first computation;
after evaluating the first computation, materializing, by the database server instance, within an in-memory unit, the first set of computation results for use during execution of another query,wherein the in-memory unit includes a materialized results area,wherein the materialized results area stores a set of bit-vectors derived from evaluating predicate evaluations and a set of columns derived from non-predicate evaluations, andwherein the in-memory unit stores;
a first pointer for allocating space for bit-vector result sets, anda second pointer for allocating space for result sets derived from non-predicate evaluations; and
storing, by the database server instance, within the in-memory unit, mapping data that maps a set of metadata values associated with the first computation to the first set of computation results;
using, by the database server instance, the first set of computation results, which were materialized within the in-memory unit, to answer a subsequently-received query that involves the first computation.
1 Assignment
0 Petitions
Accused Products
Abstract
Techniques are described for materializing computations in memory. In an embodiment, responsive to a database server instance receiving a query, the database server instance identifies a set of computations for evaluation during execution of the query. Responsive to identifying the set of computations, the database server instance evaluates at least one computation in the set of computations to obtain a first set of computation results for a first computation in the set of computations. After evaluating the at least one computation, the database server instance stores, within an in-memory unit, the first set of computation results. The database server also stores mapping data that maps a set of metadata values associated with the first computation to the first set of computation results.
-
Citations
18 Claims
-
1. A method comprising:
-
receiving, by a database server instance, a query; responsive to receiving the query, identifying, by the database server instance, a set of computations for evaluation during execution of the query; wherein the set of computations includes a first computation; responsive to identifying the set of computations, evaluating the first computation, by the database server instance, to obtain a first set of computation results for the first computation; after evaluating the first computation, materializing, by the database server instance, within an in-memory unit, the first set of computation results for use during execution of another query, wherein the in-memory unit includes a materialized results area, wherein the materialized results area stores a set of bit-vectors derived from evaluating predicate evaluations and a set of columns derived from non-predicate evaluations, and wherein the in-memory unit stores; a first pointer for allocating space for bit-vector result sets, and a second pointer for allocating space for result sets derived from non-predicate evaluations; and storing, by the database server instance, within the in-memory unit, mapping data that maps a set of metadata values associated with the first computation to the first set of computation results; using, by the database server instance, the first set of computation results, which were materialized within the in-memory unit, to answer a subsequently-received query that involves the first computation. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8)
-
-
9. A method comprising:
-
receiving, by a database server instance, a query; responsive to receiving the query, identifying, by the database server instance, a set of computations for evaluation during execution of the query; wherein the set of computations includes a first computation; responsive to identifying the set of computations, evaluating the first computation, by the database server instance, to obtain a first set of computation results for the first computation; determining, by the database server instance, a score for the first computation based, at least in part, on a frequency with which the first computation is evaluated; determining, whether the score for the first computation satisfies a threshold; after evaluating the first computation, and responsive to determining that the score of the first computation satisfies the threshold, storing, by the database server instance within an in-memory unit, the first set of computation results; and storing, by the database server instance within the in-memory unit, mapping data that maps a set of metadata values associated with the first computation to the first set of computation results.
-
-
10. One or more non-transitory computer-readable media storing instructions which, when executed by one or more processors, cause:
-
receiving, by a database server instance, a query; responsive to receiving the query, identifying, by the database server instance, a set of computations for evaluation during execution of the query; wherein the set of computations includes a first computation; responsive to identifying the set of computations, evaluating the first computation, by the database server instance, to obtain a first set of computation results for the first computation; after evaluating the first computation, materializing, by the database server instance, within an in-memory unit, the first set of computation results for use during execution of another query, wherein the in-memory unit includes a materialized results area, wherein the materialized results area stores a set of bit-vectors derived from evaluating predicate evaluations and a set of columns derived from non-predicate evaluations, and wherein the in-memory unit stores; a first pointer for allocating space for bit-vector result sets, and a second pointer for allocating space for result sets derived from non-predicate evaluations; and storing, by the database server instance, within the in-memory unit, mapping data that maps a set of metadata values associated with the first computation to the first set of computation results; using, by the database server instance, the first set of computation results, which were materialized within the in-memory unit, to answer a subsequently-received query that involves the first computation. - View Dependent Claims (11, 12, 13, 14, 15, 16, 17)
-
-
18. One or more non-transitory computer-readable media storing instructions which, when executed by one or more processors, cause:
-
receiving, by a database server instance, a query; responsive to receiving the query, identifying, by the database server instance, a set of computations for evaluation during execution of the query; wherein the set of computations includes a first computation; responsive to identifying the set of computations, evaluating the first computation, by the database server instance, to obtain a first set of computation results for the first computation; determining, by the database server instance, a score for the first computation based, at least in part, on a frequency with which the first computation is evaluated; determining, whether the score for the first computation satisfies a threshold; after evaluating the first computation, and responsive to determining that the score of the first computation satisfies the threshold, storing, by the database server instance within an in-memory unit, the first set of computation results; and storing, by the database server instance within the in-memory unit, mapping data that maps a set of metadata values associated with the first computation to the first set of computation results.
-
Specification