A table function is a user-defined function that returns a table. This function is specified in the FROM clause of an SQL statement. An SQL statement can invoke the same table function multiple times; each invocation is represented by a table function node.
A table function node is labeled with the name of the table function and is, by default, displayed as a hexagon.
DB2® can use a table space scan (TBSCAN) to access a table function. Sometimes DB2 places the result of a table function in a work file and then uses a work file scan (WFSCAN) to access the work file.
Attribute | Explanation | Default value |
---|---|---|
Cardinality | The function's predicted cardinality | 10 000 |
Initial CPU Cost | Estimated number of instructions that are executed the first time and last time that the function is invoked | 40 000 |
Initial IO Cost | Estimated number of inputs and outputs that are performed the first time and last time the function is invoked | 0 |
CPU Cost | Estimated number of instructions per invocation | 4 000 |
IO Cost | Estimated number of inputs and outputs per invocation | 0 |