DB2 might generate work files during the following operations:
Work files are stored in the DSNDB07 database. Sort is the most common situation for generating work files. If DB2 is performing many sorting operations at the same time, you should check the number and size of the table spaces in the DSNDB07 database to make sure that you have enough space for the work files.
A work file node is either labeled with a specific name that is assigned by DB2 or the word WORKFILE. The node is, by default, displayed as a rounded rectangle.
If a work file is generated from a sort or from accessing the inner table during a merge scan join, it is dynamically generated and labeled as WORKFILE. DB2 uses a work file scan (WFSCAN) to access this type of work file.
If the work file is generated from a table expression, non-correlated subquery, star join snowflake, or view materialization, the optimizer treats the work file like a base table and gives the work file a specific name. Because no indexes are defined on the work file, DB2 usually uses a table space scan (TBSCAN) to access this type of work file. DB2 can estimate the number of rows in the work file based on the source of the work file, and then DB2 determines the access plan accordingly.