Dequeue

During a dequeue operation, an entry is taken off the queue and those values specified by recursive reference are fed back in to the recursive join process.

The optimizer always supplies a corresponding enqueue, dequeue pair of operations for each reference of a recursive common table expression or recursive view in the specifying query. Recursion ends when there are no more entries to pull off the queue.

Table 1. Dequeue Attributes
Data Access Method Dequeue
Description Removes an entry off the queue, provides minimally one side of the recursive join predicate that feeds the recursive join and other data values that are manipulated through the recursive process. The dequeue is always the left side of inner join with constraint where the right side of the join being the target child rows.
Advantages
  • Provides very quick access to recursive values
  • Allows for post selection of local predicate on recursive data values
Likely to be used
  • A required access method for recursive queries
  • A single dequeued values can feed the recursion of multiple iterative fullselects that reference the same rcte/view
Example SQL statement
WITH RPL (PART, SUBPART, QUANTITY) AS
     (  SELECT ROOT.PART, ROOT.SUBPART, ROOT.QUANTITY
        FROM PARTLIST ROOT
        WHERE ROOT.PART = '01'
      UNION ALL
        SELECT CHILD.PART, CHILD.SUBPART, CHILD.QUANTITY
        FROM RPL PARENT, PARTLIST CHILD
        WHERE  PARENT.SUBPART = CHILD.PART
     )
SELECT DISTINCT PART, SUBPART, QUANTITY
 FROM RPL
Messages indicating use There are no explicit messages that indicate the use of a dequeue
SMP parallel enabled Yes
Also referred to as Not applicable
Visual Explain icon
Dequeue icon