Migrating access-path statistics from a SQL Tuning session
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
- 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:
Field
Description
Name
Enter a name for the Migrate Statistics session.
Include Table Statistics
Select this box to migrate the table statistics for the selected object.
This box is initially selected by default.
Include Index Statistics
Select this box to migrate the statistics of all indexes for the selected object.
This box is initially selected by default.
DB2 Connections
Select the source Db2 subsystem from the list of subsystems that are connected to the target Db2 subsystem.
Translation
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.
- (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 the 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.
Statistics migration updates the following Db2 statistics tables:
- SYSTABLESPACE
- SYSTABLES
- SYSCOLUMNS
- SYSCOLSTATS
- SYSCOLDIST
- SYSTABSTATS
- SYSINDEXES
- SYSKEYTARGETS
- SYSKEYTARGETSTATS
- SYSKEYTGTDIST
- SYSKEYTGTDISTSTATS
Related topic