Home » SQL & PL/SQL » SQL & PL/SQL » PARALLEL hint is not working in 11g.
PARALLEL hint is not working in 11g. [message #616807] Fri, 20 June 2014 14:19 Go to next message
M. Salman Sabir
Messages: 5
Registered: March 2002
Junior Member
SQL stmt:

SELECT /*+ PARALLEL(r) */
r.c1 , r.c2
FROM table1 r

--> Table1 has 44 million records.

Explain Plan:

SELECT STATEMENT, GOAL = ALL_ROWS Cost=300698 Cardinality=44703140 Bytes=447031400
TABLE ACCESS FULL Object owner=axe Object name=Table1 Cost=300698 Cardinality=44703140 Bytes=447031400
Re: PARALLEL hint is not working in 11g. [message #616810 is a reply to message #616807] Fri, 20 June 2014 14:26 Go to previous messageGo to next message
Lalit Kumar B
Messages: 3174
Registered: May 2013
Location: World Wide on the Web
Senior Member
M. Salman Sabir wrote on Sat, 21 June 2014 00:49

SELECT /*+ PARALLEL(r) */
r.c1 , r.c2
FROM table1 r


You haven't specified the degree of parallelism. Please read documentation about Default Parallelism. IMO, you must leave it to automatic parallel tuning.
Re: PARALLEL hint is not working in 11g. [message #616813 is a reply to message #616807] Fri, 20 June 2014 14:42 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
https://community.oracle.com/thread/3575171
Re: PARALLEL hint is not working in 11g. [message #616816 is a reply to message #616810] Fri, 20 June 2014 14:51 Go to previous messageGo to next message
M. Salman Sabir
Messages: 5
Registered: March 2002
Junior Member
DOP, I tried as PARALLEL(r,x)
where x i used were 4, 8 etc.
Re: PARALLEL hint is not working in 11g. [message #616849 is a reply to message #616816] Sat, 21 June 2014 10:04 Go to previous message
John Watson
Messages: 8931
Registered: January 2010
Location: Global Village
Senior Member
There is nothing wring with your syntax, but there are many reasons why you might not get parallel execution in 11.2.x. Also, what you say is the output of EXPLAIN PLAN is all wrong for 11.2. Please will you show what is happening, by using copy/paste from a SQL*Plus session, and enclose the result in code tags. Like this:
c:\users\john>
c:\users\john>sqlplus scott/tiger

SQL*Plus: Release 11.2.0.3.0 Production on Sat Jun 21 16:03:02 2014

Copyright (c) 1982, 2011, Oracle.  All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, Data Mining and Real Application Testing options

orcla> set autotrace on explain
orcla> select /*+ parallel */ count(ename) from emp;

COUNT(ENAME)
------------
          14


Execution Plan
----------------------------------------------------------
Plan hash value: 2810914317

------------------------------------------------------------------------------------------------------------
| Id  | Operation              | Name     | Rows  | Bytes | Cost (%CPU)| Time     |    TQ  |IN-OUT| PQ Distr
------------------------------------------------------------------------------------------------------------
|   0 | SELECT STATEMENT       |          |     1 |     6 |     2   (0)| 00:00:01 |        |      |
|   1 |  SORT AGGREGATE        |          |     1 |     6 |            |          |        |      |
|   2 |   PX COORDINATOR       |          |       |       |            |          |        |      |
|   3 |    PX SEND QC (RANDOM) | :TQ10000 |     1 |     6 |            |          |  Q1,00 | P->S | QC (RAND
|   4 |     SORT AGGREGATE     |          |     1 |     6 |            |          |  Q1,00 | PCWP |
|   5 |      PX BLOCK ITERATOR |          |    14 |    84 |     2   (0)| 00:00:01 |  Q1,00 | PCWC |
|   6 |       TABLE ACCESS FULL| EMP      |    14 |    84 |     2   (0)| 00:00:01 |  Q1,00 | PCWP |
------------------------------------------------------------------------------------------------------------

Note
-----
   - automatic DOP: skipped because of IO calibrate statistics are missing

orcla>
Previous Topic: cursor is not working
Next Topic: create sequence within pl/sql execute immediate.
Goto Forum:
  


Current Time: Thu Apr 25 22:11:57 CDT 2024