Use the QPTune GUI to fix or update the missing statistics after you have upgraded a server. To access QPTune’s “Fix missing statistics” feature, right-click a server name and select one of the two available menu options for fixing missing statistics:
Fix Missing Statistics: When you select this option, QPTune brings up the Fix Missing Statistics Wizard. QPTune collects the information about missing statistics into an XML file, and then uses the file to fix the missing statistics. Specify the name of the XML file and the target database, and click Next for the Options page.
On the Options page, specify a threshold for the count of missing statistics. The default threshold count is 5. See “Collecting statistics” for more information on threshold for count of missing statistics.
Additionally, you may opt to only send the update statistics statements to a script file. To do this, type in the filename where you would like to save the statements, and click Finish to save the tuning task without execution.
If you click Execute, QPTune goes through the steps to fix the missing statistics. QPTune then displays a Summary page of commands that the wizard issues to it.
Undo Missing Statistics Fix: When you select this option, QPTune brings up the Undo Missing Statistics Fix Wizard. Using statistics statements from a specified XML file, QPTune can undo previous fixes to the server. Specify the name of the XML file and the target database, and click Next for the Options page.
On the Options page, specify a threshold for count of missing statistics. The default threshold count is 5. See “Collecting statistics” for more information on threshold for count of missing statistics.
When you click Finish, QPTune goes through the steps to undo the previous fixes for missing statistics. QPTune then displays a summary page of commands that the wizard issues to it.
To use the Fix Missing Statistics or Undo Missing Statistics Fix wizards, you must have sa_role and sso_role. For more information on QPTune’s cycle for fixing missing statistics, see “Using QPTune to fix missing statistics”.
You must run the application at least once before QPTune can collect or fix missing statistics.