14.1.1.1.2 ENABLE
When the PARALLEL_QUERY option in the FSI_OPTIMIZATION_SETTINGS table is set to ENABLE, the engine will begin each rule by issuing the following statement:
ALTER SESSION ENABLE PARALLEL QUERY;
When Parallel Query is enabled, the database may elect to execute a SELECT statement in parallel if it is run against an object (table or index) that has been declared or altered through the use of the PARALLEL clause.
Two examples of the use of the PARALLEL clause to alter a table follow:
ALTER TABLE FSI_MGMT_LGR_DAILY_BALANCES PARALLEL 8;
ALTER TABLE FSI_MGMT_LGR_DAILY_BALANCES PARALLEL (DEGREE
DEFAULT);
In the earlier first example, the database may elect to parallelize a SELECT statement against the FSI_MGMT_LGR_DAILY_BALANCES table using a Degree of Parallelism equal to 8. In the second example, the database may elect to parallelize a SELECT statement against the FSI_MGMT_LGR_DAILY_BALANCES table using the default Degree of Parallelism as determined by the database but only if PARALLEL_DEGREE_POLICY is set to Auto (default parallelism and PARALLEL_DEGREE_POLICY are discussed further as follows).
The database may also elect to execute a SELECT statement in parallel if a parallel SQL hint is included in the SELECT statement. A parallel SQL hint will override the Degree of Parallelism assigned to a table or index through the PARALLEL clause. If the tables and indexes against which a SELECT statement is executed have not been defined using the PARALLEL clause and if the SELECT statement does not include a parallel hint, then the SQL statement will always run serially (in a single thread).
If the tables and indexes against which a SELECT statement is executed have been defined using the PARALLEL clause or if the SELECT statement includes a parallel hint, the database may elect to run in parallel if it is possible to do so. The conditions necessary for the database to choose parallelize a query are complex and beyond the scope of this discussion – for details, see the listing of documentation resources found at the end of this appendix.