Sandeep,
Here are some details that describe the implications of using Automate in different ways:
- The Automate operation registers an existing statistic defined in the data dictionary with AutoStats making it eligible for collection via Collect Jobs.
- For a given set of objects, the Automate operation performed via the Statistics Tab (aka, your first approach) is normally done once. To facilitate the automation of any user defined stats that are subsequently created on those same objects after this initial automation step, Analyze Jobs offer the Automate existing stats option (aka, your second approach).
- The stats involved in both of these automation approaches are almost always user defined, meaning it was the user who submitted the initial COLLECT STATISTICS statement apart from Collect Jobs.
- The “automation” per se of recommended missing statistics by Analyze Jobs is handled by the user Approval process which is either done explicitly from the Recommendations page of Stats Manager or automatically if the Require review before applying recommendations option is left unchecked. After a missing statistic is approved, it is effectively “automated” although that term is not generally used. After it’s initial collection is performed by a subsequent Collect Job and its definition stored in the dictionary, the recommended stat could potentially be DeAutomated and subsequently (Re)Automated just like a user defined stat.
- Your proposal to rely exclusively on the 2nd aproach to limit automation in certain circumstances (e.g, only the used stats of very large tables) can be done, but that was not the intent of this option when it was designed. If you choose the “Limit to stats: That are actually used” sub-option in your Analyze Job, you will only automate those stats that were found in analyzed logged STATSUSAGE data. STATSUSAGE output can tell you if a stat was used, but it cannot tell you if it was unused or the frequency of use. By relying primarily on this approach you may end up not automating an important used stat.
- As currently designed, Analyze Job option “Evaluate stats to determine if they should be collected or deactivated option” (which relies on USECOUNT data) will only recommend inactivation of unused stats that have been automated. Put another way, you have to automate a stat before an Analyze Job will tell you it’s not used.
- The scope of Collect Jobs is limited to only automated stats (existing or approved missing) for the user specified objects . Apart from the cleanup/deactivation function mentioned in the point above, Analyze Jobs have no such limitation and will recommend missing stats on objects that have no automated stats.
Thanks, -Carrie
Sandeep,
Here are some details that describe the implications of using Automate in different ways:
- The Automate operation registers an existing statistic defined in the data dictionary with AutoStats making it eligible for collection via Collect Jobs.
- For a given set of objects, the Automate operation performed via the Statistics Tab (aka, your first approach) is normally done once. To facilitate the automation of any user defined stats that are subsequently created on those same objects after this initial automation step, Analyze Jobs offer the Automate existing stats option (aka, your second approach).
- The stats involved in both of these automation approaches are almost always user defined, meaning it was the user who submitted the initial COLLECT STATISTICS statement apart from Collect Jobs.
- The “automation” per se of recommended missing statistics by Analyze Jobs is handled by the user Approval process which is either done explicitly from the Recommendations page of Stats Manager or automatically if the Require review before applying recommendations option is left unchecked. After a missing statistic is approved, it is effectively “automated” although that term is not generally used. After it’s initial collection is performed by a subsequent Collect Job and its definition stored in the dictionary, the recommended stat could potentially be DeAutomated and subsequently (Re)Automated just like a user defined stat.
- Your proposal to rely exclusively on the 2nd aproach to limit automation in certain circumstances (e.g, only the used stats of very large tables) can be done, but that was not the intent of this option when it was designed. If you choose the “Limit to stats: That are actually used” sub-option in your Analyze Job, you will only automate those stats that were found in analyzed logged STATSUSAGE data. STATSUSAGE output can tell you if a stat was used, but it cannot tell you if it was unused or the frequency of use. By relying primarily on this approach you may end up not automating an important used stat.
- As currently designed, Analyze Job option “Evaluate stats to determine if they should be collected or deactivated option” (which relies on USECOUNT data) will only recommend inactivation of unused stats that have been automated. Put another way, you have to automate a stat before an Analyze Job will tell you it’s not used.
- The scope of Collect Jobs is limited to only automated stats (existing or approved missing) for the user specified objects . Apart from the cleanup/deactivation function mentioned in the point above, Analyze Jobs have no such limitation and will recommend missing stats on objects that have no automated stats.
Thanks, -Carrie