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:

Temporary buffer icon