drop table t;

create table t

partition by range(no) (

partition p1 values less than(25000)

, partition p2 values less than(50000)

, partition p3 values less than(75000)

, partition p4 values less than(maxvalue)

)

as

select rownum no, lpad(rownum, 10, '0') no2 from dual

connect by level <= 100000;

explain plan for

update /*+ parallel(t 4) */ t set no2 = lpad(no, 5, '0');

--@?/rdbms/admin/utlxplp

set markup html preformat on

select * from table(dbms_xplan.display());

commit;

alter session enable parallel dml;

explain plan for

update /*+ parallel(t 4) */ t set no2 = lpad(no, 5, '0');

--@?/rdbms/admin/utlxplp

set markup html preformat on

select * from table(dbms_xplan.display());

SQL> create table t

2  partition by range(no) (

3    partition p1 values less than(25000)

4  , partition p2 values less than(50000)

5  , partition p3 values less than(75000)

6  , partition p4 values less than(maxvalue)

7  )

8  as

9  select rownum no, lpad(rownum, 10, '0') no2 from dual

10  connect by level <= 100000;

테이블이 생성되었습니다.

SQL>

SQL> explain plan for

2  update /*+ parallel(t 4) */ t set no2 = lpad(no, 5, '0');

해석되었습니다.

SQL>

SQL> --@?/rdbms/admin/utlxplp

SQL> set markup html preformat on

SQL> select * from table(dbms_xplan.display());

PLAN_TABLE_OUTPUT

--------------------------------------------------------------------------------

--------------------------------------------------------------------------------

------------------------------------

| Id  | Operation             | Name     | Rows  | Bytes | Cost (%CPU)| Pstart|

Pstop |    TQ  |IN-OUT| PQ Distrib |

--------------------------------------------------------------------------------

------------------------------------

|   0 | UPDATE STATEMENT      |          |   115K|  2830K|    24   (5)|       |

PLAN_TABLE_OUTPUT

--------------------------------------------------------------------------------

|        |      |            |

|   1 |  PX COORDINATOR       |          |       |       |            |       |

|        |      |            |

|   2 |   PX SEND QC (RANDOM) | :TQ10000 |   115K|  2830K|    24   (5)|       |

|  Q1,00 | P->S | QC (RAND)  |

|   3 |    UPDATE             | T        |       |       |            |       |

|  Q1,00 | PCWP |            |

PLAN_TABLE_OUTPUT

--------------------------------------------------------------------------------

|   4 |     PX BLOCK ITERATOR |          |   115K|  2830K|    24   (5)|     1 |

4 |  Q1,00 | PCWC |            |

|   5 |      TABLE ACCESS FULL| T        |   115K|  2830K|    24   (5)|     1 |

4 |  Q1,00 | PCWP |            |

--------------------------------------------------------------------------------

------------------------------------

Note

PLAN_TABLE_OUTPUT

--------------------------------------------------------------------------------

-----

- 'PLAN_TABLE' is old version

15 개의 행이 선택되었습니다.

SQL>

SQL> commit;

커밋이 완료되었습니다.

SQL>

SQL> alter session enable parallel dml;

세션이 변경되었습니다.

SQL>

SQL> explain plan for

2  update /*+ parallel(t 4) */ t set no2 = lpad(no, 5, '0');

해석되었습니다.

SQL>

SQL> --@?/rdbms/admin/utlxplp

SQL> set markup html preformat on

SQL> select * from table(dbms_xplan.display());

PLAN_TABLE_OUTPUT

--------------------------------------------------------------------------------

--------------------------------------------------------------------------------

------------------------------------

| Id  | Operation             | Name     | Rows  | Bytes | Cost (%CPU)| Pstart|

Pstop |    TQ  |IN-OUT| PQ Distrib |

--------------------------------------------------------------------------------

------------------------------------

|   0 | UPDATE STATEMENT      |          |   115K|  2830K|    24   (5)|       |

PLAN_TABLE_OUTPUT

--------------------------------------------------------------------------------

|        |      |            |

|   1 |  PX COORDINATOR       |          |       |       |            |       |

|        |      |            |

|   2 |   PX SEND QC (RANDOM) | :TQ10000 |   115K|  2830K|    24   (5)|       |

|  Q1,00 | P->S | QC (RAND)  |

|   3 |    UPDATE             | T        |       |       |            |       |

|  Q1,00 | PCWP |            |

PLAN_TABLE_OUTPUT

--------------------------------------------------------------------------------

|   4 |     PX BLOCK ITERATOR |          |   115K|  2830K|    24   (5)|     1 |

4 |  Q1,00 | PCWC |            |

|   5 |      TABLE ACCESS FULL| T        |   115K|  2830K|    24   (5)|     1 |

4 |  Q1,00 | PCWP |            |

--------------------------------------------------------------------------------

------------------------------------

Note

PLAN_TABLE_OUTPUT

--------------------------------------------------------------------------------

-----

- 'PLAN_TABLE' is old version

15 개의 행이 선택되었습니다.

SQL>