A temporary table is used as a work table during access plan execution. Generally, temporary tables are used when subqueries need to be evaluated early in the access plan, or when intermediate results will not fit into the available memory.
Insert Into Temp Table ID = tn --> ordinary temporary table
Insert Into Shared Temp Table ID = tn --> ordinary temporary table will be created
by multiple subagents in parallel
Insert Into Sorted Temp Table ID = tn --> sorted temporary table
Insert Into Sorted Shared Temp Table ID = tn --> sorted temporary table will be created
by multiple subagents in parallel
Insert Into Global Temp Table ID = ts,tn --> declared global temporary table
Insert Into Shared Global Temp Table ID = ts,tn --> declared global temporary table
will be created by multiple subagents
in parallel
Insert Into Sorted Global Temp Table ID = ts,tn --> sorted declared global temporary table
Insert Into Sorted Shared Global Temp Table ID = ts,tn --> sorted declared global temporary
table will be created by
multiple subagents in parallel
The
ID is an identifier that is assigned by db2expln for
convenience when referring to the temporary table. This ID is prefixed
with the letter 't' to indicate that the table is a temporary table. #Columns = n
which
indicates how many columns there are in each row that is being inserted
into the temporary table. #Sort Key Columns = n
One
of the following lines is displayed for each column in the sort key: Key n: column_name (Ascending)
Key n: column_name (Descending)
Key n: (Ascending)
Key n: (Descending)
Sortheap Allocation Parameters:
| #Rows = n
| Row Width = n
Sort Limited To Estimated Row Count
Use Partitioned Sort
Use Shared Sort
Use Replicated Sort
Use Round-Robin Sort
Piped
Not Piped
If a piped sort is indicated, the database
manager will keep the sorted output in memory, rather than placing
it in another temporary table. Duplicate Elimination
Partial Aggregation
Intermediate Aggregation
Buffered Partial Aggregation
Buffered Intermediate Aggregation
Temp Table Completion ID = tn
Shared Temp Table Completion ID = tn
Sorted Temp Table Completion ID = tn
Sorted Shared Temp Table Completion ID = tn
Access User Defined Table Function
| Name = schema.funcname
| Specific Name = specificname
| SQL Access Level = accesslevel
| Language = lang
| Parameter Style = parmstyle
| Fenced Not Deterministic
| Called on NULL Input Disallow Parallel
| Not Federated Not Threadsafe