Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: how do I hint(parallel) 2 or more tables in a select statement
Solutiojn 1:
According to oracle, U need to specify hints only to aliases ( not the actual
tablenames) Here is an example
select /*+ parallel (a,4) parallel(b,4) */ a.empname,b.deptno
from emp a,dept b
where a.deptno=b.deptno;
Now your explain plan must show parallel access to bo the tables.
Solution 2 :
If above doent work.Ask your DBA to set degree of parallelism at table level so that no hints are required.
ALTER TABLE emp PARALLEL ( DEGREE 4 );
ALTER TABLE dept PARALLEL (DEGREE 4 );
Now U dont have to specify any parallel hint,optimizer automatically assign the degree of parallelism
Mohamed.
dad wrote:
> I have a 5 table join, 2 are full table i hinted one and it went to parallel
> to parallel, but when i try to hint the other it only takes first table
>
> I tried
>
> select /*+ parallel (table1, 4) parallell (table2, 4) */
> name ..
> and
>
> select /*+ parallel (table1, 4) (table2, 4) */
> name ...
>
> and
>
> select /*+ parallel (table1, 4) parallell (table2, 4) */
> /*+ parallel (table1, 4) parallell (table2, 4) */
> name ...
>
> but only the first table gets parallel, how do i get both to be parralleled
Received on Wed Jan 19 2000 - 20:08:02 CST
![]() |
![]() |