摘要:
Methods and systems for integrating use of materialized transient views into generation of an optimized query execution plan. Features and aspects hereof provide rapid identification of common expressions in a query as transient view candidates and then rapidly select among the transient view candidates for those transient views that most benefit the cost of execution of the query. The selected transient views are incorporated into a generated final, optimized query execution plan including operator to materialize the selected transient views for re-use in execution of the query.
摘要:
A computer implemented system that facilitates view matching for outer join views comprises an interface component that receives at least one query that includes one or more outer join operators. A view matching-component converts the at least one query and outputs a substitute query expression. In accordance with one aspect of the subject invention, the view-matching component can comprise a normalization component that converts the at least one query and at least one materialized view into a normalized query expression and a normalized view expression. Furthermore, the view-matching component can include an analysis component that receives the normalized query expression and the normalized view expression, and a construction component that constructs the substitute query expression.
摘要:
Partially materialized views in the field of database systems are described herein. A method of partially materializing a view computed from one or more source tables comprises generating a view definition including a query expression and at least one control predicate referencing at least one control table. The query expression specifies the maximal content of the view, that is, the complete set of records that could be materialized. One or more control predicates and the contents of one or more control tables restrict what records are actually materialized and stored in the view. This allows the content of the partially materialized view to be adjusted simply by updating one or more control tables.
摘要:
Currency and consistency requirements are specified as part of a query against a database that may contain replicated data that is updated asynchronously and therefore may not be completely up to date. The database system constructs query execution plans that include an input selection operator that verifies the currency of a replica and selects a subplan using the replica for execution only when the replica meets the query's currency constraints. It checks possible query execution plans at construction time against the query's consistency constraints and any plans that may produce a result not meeting the consistency constraints are rejected. In this way, the query result is guaranteed to satisfy the query's currency and consistency requirements.
摘要:
A large-scale sorting process utilizes a batched replacement selection method to form runs of sorted data records. The batched replacement selection method involves reading multiple records from a persistent data storage into main memory and sorting the multiple records to form a mini-run of multiple sorted data records. After formation, the mini-run is added to a selection tree by inserting a pointer to a first record in the mini-run into the array of pointers. The first record is linked to remaining records in the mini-run. As records are selected for output from the selection tree, the methodology replaces the selected record with a next record in the associated mini-run (if not empty) or alternatively deletes the node if the mini-run is empty. The selected records are collected into an output buffer. When the number of records reaches a pre-determined number, the selected records are written in batch back to the persistent data storage.