To update objects with migrated access-path statistics, use the following procedure to select objects for statistics migration from a SQL Tuning session.
To migrate access-path statistics from a SQL Tuning session
New console
- Select the Performance perspective.
- From a tuning session, either select a statement that has been explained or perform Explain on the statement.For more information, see Explaining-SQL-statements.
- Click Migrate Statistics
. Complete the following fields of the Parameters of the Migrate Statistics panel, and then click Next:
| |
---|
| Enter a name for the Migrate Statistics session. |
| Select this box to migrate the table statistics for the selected object. This box is initially selected by default. |
| Select this box to migrate the statistics of all indexes for the selected object. This box is initially selected by default. |
| Select the source Db2 subsystem from the list of subsystems that are connected to the target Db2 subsystem. |
| Define relevant translation rules for source objects that you are migrating so that they match the target objects. You can replace all occurrences of a specified string with another specified string. Do not use wildcard characters (including % and *). |
Clicking Next displays the Object List of the Migrate Statistics panel, which lists the tables, table spaces, and indexes to be migrated. The panel also indicates the source and target direction of the migration and displays a status icon beside each object. The status icon is
for valid objects and
for invalid objects.
- For each invalid object, take one of the following actions:
- Click Back, and update the translation rules. Then click Next.
- Select and update the invalid name. Then click Verify all.
Clear any objects that you do not want to migrate.
SuccessTip
Use the check box at the top of the first column to select or clear all the objects.
You can use the Filter list to view specific object types, or to view only the valid or invalid objects.
- (Optional) To view the summary, click Next.
To start the migration, click Finish.The results are displayed in a results table in the Results tab in the Performance perspective:
identifies objects that migrated successfully.
identifies objects that failed to migrate, and a message explains the failure. You can hover over the message to view details.
The Migrate Statistics session is listed under Stats Migration in the Navigation pane in the Performance perspective.
- For any objects that failed to migrate, complete the following steps:
- Hover the cursor over the explanatory message to see details.
- Click the Parameters tab.
- Make the required changes to the Translation parameters.
- When the following message is displayed at the bottom of the panel, select the Objects List tab to refresh the list of objects:Input parameters have been updated. The object list is stale.
- On the toolbar, click Migrate Statistics
to repeat the migration.A new results tab is displayed, which displays updated results.
Classic console
- Select the Performance perspective.
- From a tuning session, either select a statement that has been explained or perform Explain on the statement.See Explaining-SQL-statements.
- Click Migrate Statistics
, and then click either Migrate Statistics From
or Migrate Statistics To
:- Select Migrate Statistics From to migrate statistics from the objects included in the SQL Tuning session. The object or objects that you want to update must already exist on the target subsystem.
- Select Migrate Statistics To to migrate statistics to the objects included in the SQL Tuning session.
Complete the following fields of the Parameters of the Migrate Statistics panel, and then click Next:
| |
---|
| Enter a name for the Migrate Statistics session. |
| Select this box to migrate the table statistics for the selected object. This box is initially selected by default. |
| Select this box to migrate the statistics of all indexes for the selected object. This box is initially selected by default. |
| Select the DB2 subsystem from the list of subsystems that are connected to the source Db2 subsystem. If you selected Migrate Statistics From, you are selecting the target Db2 subsystem. If you selected Migrate Statistics To, you are selecting the source Db2 subsystem. |
| Define relevant translation rules for source objects that you are migrating, so that they match the target objects. You can replace all occurrences of a specified string with another specified string. Do not use wildcard characters (including % or *). |
Clicking Next displays the Object List of the Migrate Statistics panel, which lists the tables, table spaces, and indexes to be migrated. The panel also indicates the source and target direction of the migration and displays a status icon beside each object. The status icon indicates all valid objects with
, and invalid objects with
.
- For each invalid object, take one of the following actions:
- Click Back, and update the translation rules. Then click Next.
- Select and update the invalid name. Then click Verify
or Verify all
.
Clear any objects that you do not want to migrate.
SuccessTip
Toggle
to select or clear all the objects.
You can use the filter buttons to view specific object types, or to view only the valid or invalid objects.
- (Optional) Click Next to view the Summary.
To start the migration, click Finish.The results are displayed in a results table in the Results tab in the Performance perspective:
identifies objects that migrated successfully.
identifies objects that failed to migrate, and a message explains the failure. You can hover over the message to view details.
The Migrate Statistics session is listed under Stats Migration in the Navigation pane in the Performance perspective.
- For any objects that failed to migrate, complete this step:
- Hover the cursor over the explanatory message to see details.
- Click the Parameters tab.
- Make the required changes to the Translation parameters.
- When the following message is displayed at the bottom of the panel, click
to refresh the objects list.Input parameters have been updated. The object list is stale
. - On the toolbar, click
to repeat the migration.A new results tab is displayed, which displays updated results.
Statistics migration updates the following Db2 statistics tables:
- SYSTABLESPACE
- SYSTABLES
- SYSCOLUMNS
- SYSCOLSTATS
- SYSCOLDIST
- SYSTABSTATS
- SYSINDEXES
- SYSKEYTARGETS
- SYSKEYTARGETSTATS
- SYSKEYTGTDIST
- SYSKEYTGTDISTSTATS