Restrictions for parallelism

Parallelism is not used for all queries; for some access paths, incurring parallelism overhead makes no sense. Similarly, certain access paths that would reduce the effectiveness of parallelism are removed from consideration when parallelism is enabled.

Begin program-specific programming interface information.

When parallelism is not used

For example, if you are selecting from a temporary table, parallelism is not used. Check the following table to determine whether your query uses any of the access paths that do not allow parallelism.

Table 1. Checklist of parallel modes and query restrictions
If query uses this... I/O parallelism 1 CP parallelism Sysplex parallelism 2 Comments
Parallel access through RID list (list prefetch and multiple index access) Yes Yes No Indicated by 'L' in the PREFETCH column of PLAN_TABLE, or an M, MX, MI, or MQ in the ACCESSTYPE column of PLAN_TABLE.
Query blocks that access LOB values. No No No  
Queries that qualify for direct row access No No No Indicated by 'D' in the PRIMARY_ACCESS_TYPE column of PLAN_TABLE
Materialized views or materialized table expressions at reference time No Start of changeYesEnd of change No 'Yes' for CP applies when there is no full outer join.
Security label column on table Yes Yes No  
Start of changeMulti-row fetchEnd of change Start of changeYesEnd of change Start of changeYesEnd of change Start of changeYesEnd of change Start of changeParallelism is available for multi-row fetch if the cursor is read-only or the query contains a FOR FETCH ONLY clause.End of change
Query blocks that access XML values No No No  
Multiple index access to return a DOCID list No No No Indicated by 'DX', 'DI', or 'DU' in the ACCESSTYPE column of PLAN_TABLE
Outer join result at reference time No No No  
CTE at reference time No No No  
Table function No No No  
Create global temporary table No No No  
Parallel access through IN-list Yes Yes No Indicated by ACCESSTYPE='N' or 'I' in the PLAN_TABLE.
Parallel access through IN-subquery No No No Indicated by ACCESSTYPE='N' in the PLAN_TABLE.
A DPSI is used to access the fact table in a star-join No No No  
Start of changeCorrelated subquery blockEnd of change Start of changeNoEnd of change Start of changeNoEnd of change Start of changeNoEnd of change Start of change End of change
Start of changeScrollable cursor End of change Start of changeNoEnd of change Start of changeNoEnd of change Start of changeNoEnd of change Start of change End of change
Start of changeCursor hold with isolation level 'RR' or 'RS'End of change Start of changeYesEnd of change Start of changeNoEnd of change Start of changeNoEnd of change Start of change End of change
Start of changeIsolation level 'RR' or 'RS'End of change Start of changeYesEnd of change Start of changeYesEnd of change Start of changeNoEnd of change Start of change End of change
Start of changeRecursive CTE bodyEnd of change Start of changeNoEnd of change Start of changeNoEnd of change Start of changeNoEnd of change Start of change End of change
Start of changeHash accessEnd of change Start of changeNoEnd of change Start of changeNoEnd of change Start of changeNoEnd of change Start of change End of change
Start of changeRange list accessEnd of change Start of changeNoEnd of change Start of changeNoEnd of change Start of changeNoEnd of change Start of change End of change
Start of changeReverse index scanEnd of change Start of changeNoEnd of change Start of changeNoEnd of change Start of changeNoEnd of change Start of change End of change
Start of changeTable locatorEnd of change Start of changeNoEnd of change Start of changeNoEnd of change Start of changeNoEnd of change Start of change End of change
Start of changeParallel access through a ROWID columnEnd of change Start of changeNoEnd of change Start of changeNoEnd of change Start of changeNoEnd of change Start of change End of change
Start of changeParallel access through a decimal floating point columnEnd of change Start of changeNoEnd of change Start of changeNoEnd of change Start of changeNoEnd of change Start of change End of change
Start of changeKey range partitioning on timestamp with timezone columnEnd of change Start of changeNoEnd of change Start of changeNoEnd of change Start of changeNoEnd of change Start of change End of change
notes:
  1. Start of changeQuery I/O parallelism is deprecated and is likely to be removed in a future release.End of change
  2. Start of changeSysplex query parallelism is deprecated and is likely to be removed in a future release.End of change

Access paths that are restricted by parallelism

To ensure that you can take advantage of parallelism, DB2® does not select certain access paths when parallelism is enabled. When the plan or package is bound with DEGREE(ANY) or the CURRENT DEGREE special register is set to 'ANY,' DB2

  • Does not choose Hybrid joins with SORTN_JOIN=Y.
  • Does not transform certain subqueries to joins.

End program-specific programming interface information.