摘要:
Techniques are provided for processing, within a database server, a database statement, where at least one subtask required by the database statement is to be executed in parallel by a slave set. The database server determines whether the database statement includes an external expression, relative to the subtask, that (a) produces information that is required by slave processes in the slave set in order to perform the subtask, and (b) is not to be evaluated by each slave process in the slave set. During execution of the statement, if the database statement includes an external expression, then one or more external values are generated by causing the external expression to be evaluated, and the one or more external values are communicated to slaves of the slave set to allow the slave processes to perform respective portions of the subtask in parallel, without requiring each slave of the slave set to evaluate the external expression.
摘要:
Techniques are provided for processing, within a database server, a database statement, where at least one subtask required by the database statement is to be executed in parallel by a slave set. The database server determines whether the database statement includes an external expression, relative to the subtask, that (a) produces information that is required by slave processes in the slave set in order to perform the subtask, and (b) is not to be evaluated by each slave process in the slave set. During execution of the statement, if the database statement includes an external expression, then one or more external values are generated by causing the external expression to be evaluated, and the one or more external values are communicated to slaves of the slave set to allow the slave processes to perform respective portions of the subtask in parallel, without requiring each slave of the slave set to evaluate the external expression.
摘要:
Techniques are provided for processing a database statement that includes a table function capable of parallel execution, where the input of the table function is specified in a subquery. During compilation of the database statement, a global cursor is generated for the database statement. The global cursor includes a first plan component for executing the table function and a second plan component for generating input for the table function. A “dummy” cursor is then generated. When slaves execute the table function, they call the dummy cursor for input. When a slave calls the dummy cursor for input, the dummy cursor causes a context switch back to the global cursor, so that the second plan component within the first cursor generates the input for the slave.
摘要:
Techniques are provided for processing a database statement that includes a table function capable of parallel execution, where the input of the table function is specified in a subquery. During compilation of the database statement, a global cursor is generated for the database statement. The global cursor includes a first plan component for executing the table function and a second plan component for generating input for the table function. A “dummy” cursor is then generated. When slaves execute the table function, they call the dummy cursor for input. When a slave calls the dummy cursor for input, the dummy cursor causes a context switch back to the global cursor, so that the second plan component within the first cursor generates the input for the slave.
摘要:
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 are described for parallelizing qualifying window functions without reliance on partitioning criteria specified in the command that includes the qualifying window functions. Because the techniques do not rely on partitioning criteria specified in the command, the techniques may be used on commands in which no partitioning criteria is specified. In general, the techniques involve partitioning the work of a qualified window function into ranges, and sharing precomputed aggregate values between computational elements to calculate the value for the window functions.
摘要:
Techniques are provided for generating execution plans for, and executing, database statements that contain filter subqueries. Upon receiving a database statement that contains a filter subquery, the database server builds an execution plan that includes a filter operation that is fed by a subtree that corresponds to the subquery. The database server performs a cost analysis to determine whether (1) the filter operation should be parallelized, and (2) the subquery tree should be parallelized. Techniques are also described for generating plans and executing queries where (1) both the filter operation and the subquery subtree are parallelized, (2) the filter operation is parallelized but the subquery subtree operation is performed serially, and (3) the filter operation is performed serially but the subquery subtree operation is parallelized.
摘要:
A query coordinator handles a multiple-server dynamic performance query by sending remote query slaves (1) first information for generating a complete plan for the query, and (2) second information for participating in the dynamic performance view portion of the query. If the slaves on the remote servers are unable to use the first information to generate an equivalent query (for example, if they reside in a database server that has closed the database), then the slaves on the remote servers use the second information to participate in the dynamic performance view portion of the query.
摘要:
Techniques are provided for executing query statements, or portions thereof, in parallel without using slave SQL to communicate to each slave the operations to be performed by the slave. Instead of generating one cursor for the query coordinator (QC) based on the original statement, and separate cursors for each DFO based on the slave SQL, the techniques involve sharing the cursor that is generated from the original statement among the various participants involved in the parallel execution of the operations specified in the original statement.
摘要:
A cursor that is generated from an original database statement includes a master plan that is shared among the various participants involved in the parallel execution of the operations specified in the original statement. For participants that cannot share the same cursor, such as slave processes on remote servers, a remote cursor is generated. Signatures are generated for both the master plan and the remote plans, and compared to ensure that the remote plans are equivalent to the master plans. Various parameters and statistics are provided to remote servers to increase the likelihood that the remote plans will be equivalent to the master plan.