행위

"Parallel 설정"의 두 판 사이의 차이

DB CAFE

22번째 줄: 22번째 줄:
  
 
--RAC 인 경우 확인 사항
 
--RAC 인 경우 확인 사항
sqltext```
+
```
 
SELECT * FROM V$PARAMETER
 
SELECT * FROM V$PARAMETER
 
  WHERE NAME IN (
 
  WHERE NAME IN (

2018년 11월 13일 (화) 09:39 판

thumb_up 추천메뉴 바로가기


You disable parallel SQL execution with an

ALTER SESSION DISABLE PARALLEL DML|DDL|QUERY statement. All subsequent DML (INSERT, UPDATE, DELETE), DDL (CREATE, ALTER), or query (SELECT) operations are executed serially after such a statement is issued.

They will be executed serially regardless of any PARALLEL clause associated with the statement or parallel attribute associated with the table or indexes involved.

The following statement disables parallel DDL operations:

ALTER SESSION DISABLE PARALLEL DDL;

Enabling Parallel SQL Execution You enable parallel SQL execution with an ALTER SESSION ENABLE PARALLEL DML|DDL|QUERY statement. Subsequently, when a PARALLEL clause or parallel hint is associated with a statement, those DML, DDL, or query statements will execute in parallel. By default, parallel execution is enabled for DDL and query statements.

A DML statement can be parallelized only if you specifically issue an ALTER SESSION statement to enable parallel DML:

ALTER SESSION ENABLE PARALLEL DML; Forcing Parallel SQL Execution You can force parallel execution of all subsequent DML, DDL, or query statements for which parallelization is possible with the ALTER SESSION FORCE PARALLEL DML|DDL|QUERY statement. Additionally you can force a specific degree of parallelism to be in effect, overriding any PARALLEL clause associated with subsequent statements. If you do not specify a degree of parallelism in this statement, the default degree of parallelism is used. However, a degree of parallelism specified in a statement through a hint will override the degree being forced.

The following statement forces parallel execution of subsequent statements and sets the overriding degree of parallelism to 5:

ALTER SESSION FORCE PARALLEL DDL PARALLEL 5;

--RAC 인 경우 확인 사항 ``` SELECT * FROM V$PARAMETER

WHERE NAME IN (
'parallel_instance_group' --11g R1

,'parallel_force_local' --11g R2

);

```