摘要:
Technologies for forming logical indexes and utilizing such indexes so as to abstract many of the complexities resulting from referencing partitioned database tables. Included are technologies for making use of order-preserving properties of table metadata, for adding a partition equality predicate to an explicit predicate in merge-join processing on partitioned tables, and for selecting execution of a logical skip scan on a partitioned table when a query predicate does not reference a specific partition. Such technologies generally abstract from the query writer and processing systems explicit referencing of table partitions.
摘要:
A method of satisfying a database query includes evaluating certain joins on a per-segment basis. An expression tree is produced for the query, and the expression tree is evaluated to identify joins whose operands are two instances of the same relation and whose join predicate conjunctively includes an equality comparison between two instances of the same column. When such a join is identified, it may be evaluated by segmenting the operand relation according to the columns that are compared for equality in the predicate. The join is then evaluated by performing the join operation separately on each segment. Segments may be spooled separately, thereby exploiting the efficiencies obtained by spooling even where the entire relation is too large to fit in the spool. Execution iterators are provided for spooling successive segments and for applying the join to the spooled segment.
摘要:
A query optimizer produces a preferred execution plan by utilizing statistics on views. These provide the optimizer with statistical information beyond that available on tables, for example, with information on the result of scalar or relational expressions. Pre-derived accurate statistics are thus available which are used to improve the accuracy of estimation and thus increase the quality and reliability of the query processor. Transformations of expressions and sub-expressions of candidate plans produce equivalent sub-expressions. Where those sub-expressions include references to views, an estimation of the cardinality and other execution statistics for the sub-expression can be made using the view statistics. This can be used to estimate the cardinality for all equivalent sub-expressions, leading to higher accuracy for the estimate.
摘要:
A query optimizer determines the applicability of materialized views to a query. View utilization alternatives are generated in the exploration stage of optimization, so that interaction with other transformations in complex queries is taken into account. A final decision on whether to use a materialized view is based on estimated cost. The optimizer generates a table of alternatives, which compactly encodes the various possibilities for each sub-expression of the query. Optimal-cost operator trees are extracted from this table. Materialized views are detected and substituted during exploration of the various possibilities and added to the table of alternatives. Materialized views and the alternatives are selected for use in a query execution plan based on cost. When two operator trees are not identical, a residual operator can be used if one operator tree subsumes the other operator tree. The residual expression can contain operators such as filters, group by and join.
摘要:
A system and method for incremental change synchronization among multiple copies of data is disclosed. To achieve the synchronization a genera synchronization model is used. The synchronization model establishes a one-way data flow path to allow incremental changes to be transferred from a copy of data that incorporates the incremental changes to a copy of data that does not yet incorporate the incremental changes. To achieve this one-way data flow path, the synchronization model uses an agent, a data collector, and a data synchronizer. The data collector collects incremental changes transferred to it and applies the incremental changes to a copy of data. A data synchronizer transfers incremental changes to a data collector. An agent controls the synchronization process by making a connection between a data collector and a data synchronizer and then directing the data synchronizer to transfer data to the data collector. If bidirectional data flow is necessary to achieve synchronization between two copies of data, a one-way data flow path is established first in one direction and after all incremental changes have been passed in that direction, a data flow path is established in the opposite direction to pass incremental changes in the opposite direction.
摘要:
Technologies for forming logical indexes and utilizing such indexes so as to abstract many of the complexities resulting from referencing partitioned database tables. Included are technologies for making use of order-preserving properties of table metadata, for adding a partition equality predicate to an explicit predicate in merge-join processing on partitioned tables, and for selecting execution of a logical skip scan on a partitioned table when a query predicate does not reference a specific partition. Such technologies generally abstract from the query writer and processing systems explicit referencing of table partitions.
摘要:
Described is a query optimizer comprising a query tuner that performs actual execution of query fragments to obtain actual results during compilation time, and uses those actual results to select a query plan. The actual results may be combined with estimates for fragments that were not executed. The tree may be traversed in a top-down traversal, processing every node. Alternatively, the tree may be traversed in a bottom-up traversal, re-deriving data for higher nodes as each lower level is completed. A limit, such as a time limit or level limit, may be used to control how much time is taken to determine the execution plan.
摘要:
Indexed views or materialized views are used as a secondary index on a base table with multi-valued attributes. This provides for using the index to search in the nested data. Moreover, indexing is provided on the result of an unnest operation. Indexing a view on the result of an unnesting operation provides the ability to index the contents of a nested collection. One such unnesting operation is “cross apply unnest”. This provides additional options for a query execution plan, leading to a more optimized query. A back-join is provided from the indexed view to the base table to allow fields from the base table that are not present in the indexed view to be included in a result of a query on the table which is processed using the indexed view as an access path. This provides a means of including columns in the query result that are not in the indexed view but are in the base table. The back-join is supported from a single-table indexed view to the base table via a unique clustering key which acts as a logical row locator. Thus, the system can back-join to the base table from an indexed view via the unique clustering key. These features allow the use of indexed views to index a table on the contents of multi-set or multi-valued attributes.
摘要:
During query execution, statistics associated with expressions are observed. Such observed statistics preferably include the cardinality of each expression. The observed statistics are submitted to an expression manager as feedback from the executed query. The statistics are preferably stored for use in estimating the cardinality of execution plans for future queries.
摘要:
A method and system for creating an index for a database table of records in a computer environment having a plurality of processing units wherein each processing unit has access to the database table. The method first determines partition delimiters wherein each partition delimiter separates the database table into non-overlapping partitions of records. Each of these partitions is dedicated to one processing unit for index creation. Next, each processing unit independently creates a sub-index, i.e., different processing units create at least two sub-indexes. Last, the method merges the sub-indexes together to create a final index related to the database table.