Description
The UNFREEZE PLANS command unfreezes frozen query plans. To freeze query plans use the FREEZE PLANS command.
UNFREEZE PLANS without the FROM UPGRADE clause unfreezes all query plans with the Plan State Frozen/Explicit. UNFREEZE PLANS with the FROM UPGRADE clause unfreezes all query plans with the Plan State Frozen/Upgrade. The FROM keyword in this clause is optional.
UNFREEZE PLANS provides four syntax forms for unfreezing query plans:
-
A specified query plan: UNFREEZE PLANS BY ID statement-hash. The statement-hash value must be delimited by double quotation marks.
-
All query plans for a table: UNFREEZE PLANS BY TABLE table-name. You can specify a table name or a view name. If a query plan references multiple tables and/or views, specifying any of these tables or views unfreezes the query plan.
-
All query plans for all tables in a schema: UNFREEZE PLANS BY SCHEMA schema-name.
-
All query plans for all tables in the current namespace: UNFREEZE PLANS.
This command issues SQLCODE 0 if one or more query plans are unfrozen; it issues SQLCODE 100 if no query plans are unfrozen. The Rows Affected (%ROWCOUNT) indicates the number of query plans unfrozen.