摘要:
A method, apparatus, and article of manufacture for optimizing database queries using a materialized view for a table referenced in the query, wherein the materialized view has different properties than the referenced table. The materialized view may be replicated across multiple processors of the computer system, so that some or all of the query can be executed in a local fashion wherein there is no data movement required to perform the operations. The materialized view also may be partitioned across multiple processors of the computer system using a different partitioning key than the referenced table. The materialized view may be a vertical and/or horizontal subset of the table, so that only selected columns and/or tuples from the table are present therein. Columns may be added to the materialized view to contain pre-computed results of complex expressions, and indices may be created on the columns of the materialized view.
摘要:
A relational data base management system includes a query processor that permits consideration of alternative query plans by the query optimizer so one table can be sent to a selected network location for subquery evaluation in consideration of maximum processing efficiency. Subqueries are converted from "predicate push-down" form to scalar subqueries, enabling upper tables to be sent to nodes of lower tables and vice versa, thereby permitting selection of the node direction depending on the least cost alternative. The optimizer of the query processor is presented with rewritten query code that permits more than one alternative for sending tables for evaluation. The optimizer evaluates the alternatives permitted by the rewritten code, determines the optimal plan for each alternative, and selects the least-cost plan from among the plans evaluated. Thus, the optimizer can decide to send an outer table to where a subquery table is located, or can decide to send a subquery table to where an outer table is located, depending on which is more efficient.
摘要:
Method and apparatus for detecting and stacking grouping sets to support GROUP BY operations with GROUPING SETS, ROLLUP and CUBE extensions in relational database management systems, with greatly reduced numbers of grouping sets. A first GROUP BY (element-list1) is input to a second GROUP BY (element-list2), resulting in the GROUP BY of the intersection of the two lists. This intersection property is then useable to reduce the number of GROUP BYs required to implement the grouping by GROUPING SETS, ROLLUPs, and CUBEs required for the online analytical processing of data contained in the database.
摘要:
A relational data base management system includes a query processor that permits consideration of alternative query plans by the query optimizer so one table can be sent to a selected network location for subquery evaluation in consideration of maximum processing efficiency. Subqueries are converted from "predicate push-down" form to scalar subqueries, enabling upper tables to be sent to nodes of lower tables and vice versa, thereby permitting selection of the node direction depending on the least cost alternative. The optimizer of the query processor is presented with rewritten query code that permits more than one alternative for sending tables for evaluation. The optimizer evaluates the alternatives permitted by the rewritten code, determines the optimal plan for each alternative, and selects the least-cost plan from among the plans evaluated. Thus, the optimizer can decide to send an outer table to where a subquery table is located, or can decide to send a subquery table to where an outer table is located, depending on which is more efficient.
摘要:
A method of performing a parallel join operation on a pair of relations R1 and R2 in a system containing P processors organized into Q clusters of P/Q processors each. The system contains disk storage for each cluster, shared by the processors of that cluster, together with a shared intermediate memory (SIM) accessible by all processors. The relations R1 and R2 to be joined are first sorted on the join column. The underlying domain of the join column is then partitioned into P ranges of equal size. Each range is further divided into M subranges of progressively decreasing size to create MP tasks T.sub.m,p, the subranges of a given range being so sized relative to one another that the estimated completion time for task T.sub.m,p is a predetermined fraction that of task T.sub.m-1,p. Tasks T.sub.m,p with larger time estimates are assigned (and the corresponding tuples shipped) to the cluster to which processor p belongs, while tasks with smaller time estimates are assigned to the SIM, which is regarded as a universal cluster (cluster 0). The actual task-to-processor assignments are determined dynamically during the join phase in accordance with the dynamic longest processing time first (DLPT) algorithm. Each processor within a cluster picks its next task at any given decision point to be the one with the largest time estimate which is owned by that cluster or by cluster 0.
摘要:
A system and method for passing arrays and structures as host variables to a stored procedure. An application program packs an array or structure into a binary large object (BLOB) and sends the BLOB to a database management system. An adapter called by the database management system, and coupled to the stored procedure, passes a reference to the data area in the BLOB to the stored procedure. After completion of the stored procedure, the BLOB is returned to the application program. Finally, upon the return from the stored procedure call, the application program unpacks the BLOB back into the array or structure.