Common questions about Optimizations in Query Analysis. See Query Analysis, Overview, Details, and Optimizations for background on how the feature works.
Why does a query show Un-optimizable?
A query is marked Un-optimizable when WISdom evaluated it and determined there's no path to improve it, either because it doesn't meet the criteria WISdom requires, or because the AI found nothing worth recommending. WISdom still provides an explanation on the Recommendations tab; there just aren't any Scripts to run. This can happen even for a query with other Observation flags, such as High Variance, if there's nothing WISdom can recommend changing.
This is different from Optimization Failed, which means WISdom couldn't retrieve an execution plan for the query at all, usually because the plan aged out of cache or there was a connectivity problem. That's a system-level issue, not a determination about the query, and a later attempt may succeed.
Why wasn't a credit consumed for my request?
A credit is only consumed when WISdom finds a path to optimize the query. If no path is found, or if evaluation fails outright because WISdom couldn't retrieve an execution plan, no credit is charged either way.
Does the automated scan use the same credits as my manual requests?
Yes. The automated top-CPU scan and a manual Queue for Optimization request both draw from the same annual credit pool for the account.
Can I re-run optimization on a query that's already been optimized?
No. A query that has already been optimized cannot be optimized again.
Why can't I queue optimization from Overview?
Optimization can only be requested for a SQL Statement resolved to a specific Server, Database, Object, and statement hash. Overview's Default grouping shows one row per statement across all instances and databases, so it isn't specific enough. Drill in from Overview to a specific instance and database in Details to reach the Query Analysis flyout, where Queue for Optimization is available.
How many optimization credits do I have?
Each client is issued five optimization credits per monitored instance per year. Used and remaining credits are shown on the Optimization Credits card on Overview.
What happens if I run out of credits?
Additional optimization credits will be available for purchase once a client's annual allotment is used. Because a credit is only consumed when a query is successfully optimized, this hasn't come up in practice yet. Pricing for additional credits hasn't been determined.
How do I find queries that already have a recommendation?
Use the Recommended Optimization filter (Yes) on Overview to narrow the Query Impact Analysis table to only SQL Statements that have an optimization recommendation available.
Should I run every script exactly as generated?
Scripts are generated recommendations, not verified migrations. Review them, and test on a non-production copy of the database, before running against production. Some scripts include a comment warning when a change may briefly lock a table.