摘要:
A method and apparatus for merging synopses to determine a database statistic, e.g., a number of distinct values (NDV), is disclosed. The merging can be used to determine an initial database statistic or to perform incremental statistics maintenance. For example, each synopsis can pertain to a different partition, such that merging the synopses generates a global statistic. When performing incremental maintenance, only those synopses whose partitions have changed need to be updated. Each synopsis contains domain values that summarize the statistic. However, the synopses may initially contain domain values that are not compatible with each other. Prior to merging the synopses the domain values in each synopsis is made compatible with the domain values in the other synopses. The adjustment is made such that each synopsis represents the same range of domain values, in one embodiment. After “compatible synopses” are formed, the synopses are merged by taking the union of the compatible synopses.
摘要:
A database statement is processed in a multi-server system, in a manner to increase the possibility that slave server processes on remote nodes will generate execution plans that are equivalent to the corresponding execution plan generated by the query coordinator process. A set of hints is generated based on the same information on which the master plan is based. The set of hints is sent to remote nodes, where respective remote plans are generated based in part on the set of hints. Use of the hints in generation of the remote plan increases the possibility that the remote plan will be equivalent to the master plan and that the slaves on the other database server will be able to join in parallel processing of the database statement.
摘要:
Techniques for eliminating one or more portions of a data object from any join step of an operation that joins multiple data objects include determining that an operation joins a first data object and a second data object. The second data object includes multiple portions. Each of multiple data units of the first data object is scanned. Based on data in the data units of the first data object, information is generated. The information indicates a portion of the second data object for exclusion. The indicated portion is excluded from an output of the operation. Only one or more portions of the second data object that are not indicated for exclusion in the information are included in a particular join step involving the second data object. By pruning a large second table, such as a fact table, the computational resources consumed by the joins are substantially reduced.
摘要:
A method and system for performing partition pruning for queries that include a non-single table predicate is disclosed. According to an embodiment of the invention, this type of query is processed by performing a transformation of the query to include additional predicates comprising subqueries. The transformed query includes single table predicates on the partitioning column of the table being queried, based upon join predicates that exist in the original query.
摘要:
Techniques are provided for increasing the degree of parallelism without incurring overhead costs associated with inter-nodal communication for performing parallel operations. One aspect of the invention is to distribute-phase partition-pairs of a parallel partition-wise operation on a pair of objects among the nodes of a database system. The -phase partition-pairs that are distributed to each node are further partitioned to form a new set of-phase partition-pairs. One -phase partition-pair from the set of new-phase partition-pairs is assigned to each slave process that is on a given node. In addition, a target object may be partitioned by applying an appropriate hash function to the tuples of the target object. The parallel operation is performed by broadcasting each tuple from a source table only to the group of slave processes that is working on the static partition to which the tuple is mapped.
摘要:
A run-away query execution is automatically identified by a background process that periodically looks at each of the currently executing queries and compares the current execution time with the execution time estimated by the optimizer. Each query execution having a negative execution time difference can be automatically identified as a run-away query execution. The query execution plans that result in run-away executions can then be automatically tuned to produce more efficient execution plans.
摘要:
A persistent data structure for storing a profile of tuning information for a query statement separately from the query statement is disclosed. The persistent data structure includes a statement signature to identify the statement, and an action to tune the statement.
摘要:
A method for determining a name for a query block of a database query language statement, and associating one or more tuning hints with the query block using the name, is disclosed.
摘要:
A computer readable medium storing a database query language statement tuning base in a tuning base memory location is disclosed. The tuning base includes tuning information for one or more query language statements. The tuning information for each statement includes one or more tuning actions for the statement, and a signature to allow an optimizer to identify the one or more tuning actions for the statement.
摘要:
A method and apparatus are provided for managing work granules being executed in parallel. A task is evenly divided between a number of work granules. The number of work granules falls between a threshold minimum and a threshold maximum. The threshold minimum and maximum may be configured to balance a variety of efficiency factors affected by the number of work granules, including workload skew and overhead incurred in managing larger number of work granules. Work granules are distributed to processes on nodes according to which of the nodes, if any, may execute the work granule efficiently. A variety of factors may used to determine where a work granule may be performed efficiently, including whether data accessed during the execution of a work granule may be locally accessed by a node.