Queue
The Queue is a temporary object that the optimizer uses to feed recursion by putting data values needed for the recursion on it. This data typically includes those values used on the recursive join predicate, and other recursive data accumulated or manipulated during the recursive process.
The Queue has two operations allowed:
- Enqueue: puts data on the queue
- Dequeue: takes data off the queue
A queue is an efficient data structure because it contains only the data needed to feed the recursion or directly modified by the recursion process. Its size is managed by the optimizer.
Unlike other temporary objects created by the optimizer, the queue is not populated all at once by the underlying query node tree. It is a real-time temporary holding area for values feeding the recursion. In this regard, a queue is not considered temporary, as it does not prevent the query from running if ALWCPYDTA(*NO) was specified. The data can flow from the query at the same time the recursive values are inserted into the queue and used to retrieve additional join rows.
A queue is an internal data structure and can only be created by the database manager.
Visual explain icon: