Run the actions to the right in descending order.
When writing an application, SPs and UDFs can greatly improve application performance by eliminating the need to compute query access plans. However, a DGTT does not support such application objects.
Application object support is provided by a regular table. However, if the application requires a temporary work area to process a large amount of data a regular table is not suitable for concurrency because it does not provide the necessary data isolation.
The addition of the new CGTT type allows DB2 to support both. Follow each of the action steps on this page to see CGTT's performance benefit over a DGTT.
This example populates each temporary table with similar data 100 times. The performance difference is in favor of CGTTs because unlike DGTTs, they do not need to be recreated for each new connection.
Isolation | Automatic cleanup | Application Object Support | Performance | |
Static Table | ![]() |
![]() |
||
DGTT | ![]() |
![]() |
||
CGTT | ![]() |
![]() |
![]() |
![]() |
You should see statement run times after the first action and a graph after the second action.
Please note that if you would like to drop a schema containing a CGTT, you must first manually drop the CGTT. The stored procedure to drop all objects before dropping the schema will not work with CGTT.