Temporary buffer
The temporary buffer is a temporary object that is used to help facilitate operations such as parallelism. It is an unsorted data structure that is used to store intermediate rows of a query. The main difference between a temporary buffer and a temporary list is that the buffer does not need to be fully populated in order to allow its results to be processed.
The temporary buffer acts as a serialization point between parallel and non-parallel portions of a query. The operations used to populate the buffer cannot be performed in parallel, whereas the operations that fetch rows from the buffer can be performed in parallel. The temporary buffer is required for the SQL Query Engine because the index scan and index probe operations are not considered to be SMP parallel enabled for this engine. Unlike the Classic Query Engine, which will perform these index operations in parallel, the SQL Query Engine will not subdivide the work necessary within the index operation to take full advantage of parallel processing. The buffer is used to allow a query to be processed under parallelism by serializing access to the index operations, while allowing any remaining work within the query to be processed in parallel.
A temporary buffer is an internal data structure and can only be created by the database manager.
Visual explain icon:
- Buffer scan
The buffer scan operation is used when a query is processed using DB2® UDB Symmetric Multiprocessing, yet a portion of the query is not enabled to be processed under parallelism. The buffer scan acts as a gateway to control access to rows between the parallel enabled portions of the query and the non-parallel portions.
Parent topic:
Temporary objects and access methods