- Intermediate
- Output
- Persistent
- Volatile
Intermediate Spool Space
Intermediate spool results are retained until no longer needed. You can determine when intermediate spool is flushed by examining the output of an EXPLAIN. The first step performed after intermediate spool has been flushed is designated “Last Use.”
Output Spool Space
Output spool results are the final information returned for a query or the rows updated within, inserted into, or deleted from a base table. The length of time output spool is retained depends on the subsystem and system conditions, as described in this table:
Subsystem/Condition | When Output Spool Is Released |
---|---|
BTEQ | Last spool response. |
Embedded SQL | The open cursor is closed. |
CLIv2 |
|
Session terminates asynchronously due to any number of conditions, including the following.
|
At the time the termination occurs. |
System restart | At the time the restart occurs. |
Persistent Spool Space
When Redrive protection is enabled, the database stores responses for sessions that participate in Redrive in persistent spool tables. Persistent spools are not deleted following a Teradata restart or node failure. Persistent spools are retained until the SQL request completes and the application has fully received the response. For details about Redrive protection, see Redrive Protection for Queries.
Volatile Spool Space
The system uses volatile spool space for volatile tables. This is necessary because volatile tables do not have a persistent stored definition.