QPTune includes several stages in the tuning cycle for fixing missing statistics:
Figure 31-1: Tuning cycle for fixing missing statistics

Use the QPTune GUI to fix or update the missing statistics after you have upgraded a server. Right-click a server name and select one of the menu options for fixing missing statistics:
Fix Missing Statistics – display 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.
On the Options page, specify a threshold for the count of missing statistics. The default threshold count is 5.
Optionally, send the update statistics statements to a script file without executing them. To do this, specify a filename where you would like to save the statements, and click Finish to save the tuning task without execution.
If you click Execute, QPTune fixes the missing statistics. QPTune then displays a summary page of commands that the wizard issues.
Undo Missing Statistics Fix – display 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.
On the Options page, specify a threshold for count of missing statistics. The default threshold count is 5.
When you click Finish, QPTune undoes the previous fixes for missing statistics. QPTune then displays a summary page of commands that the wizard issues.
To use the Fix Missing Statistics or Undo Missing Statistics Fix wizards, you must have sa_role and sso_role.
You must run the application at least once before QPTune
can collect or fix missing statistics.