AutoML Advisors
AutoML advisors inspect observed query patterns and table layout to suggest maintenance or physical design changes. This is workload optimization, distinct from training a predictive model on business data. Recommendations depend on available observations and are estimates, not measured performance guarantees.
Configuration
Advisor availability and autonomous application are separate service-managed capabilities. Confirm which are enabled for your account. See configuration.
Allow enough representative query history before interpreting an empty result. Default minimum history is 50 queries. An idle, disabled, or insufficiently observed advisor does not demonstrate that a table has no optimization opportunities.
Advisor Types
| Area | Inputs | Potential action |
|---|---|---|
| Compaction | File sizes and fragmentation | Consolidate small files |
| Partitioning | Filter columns and alignment | Review a different partition layout |
| Index and clustering design | Equality/range access patterns | Bloom filters, sort order, or Z-order suggestions |
| Materialized views | Repeated query shapes | Review a reusable precomputed result |
| Join ordering | Observed query patterns | Review a proposed join order |
Viewing Recommendations
SHOW RECOMMENDATIONS currently returns a service summary, including enabled, total_queries_recorded, and tables_tracked. It is not a list of recommendation IDs.
SHOW RECOMMENDATIONS;
For existing tables, use scoped analysis commands:
RECOMMEND COMPACTION FOR analytics.events.clicks;
RECOMMEND PARTITION FOR analytics.sales.orders;
Inspect the returned reason, confidence, and sql_hint. Other available views include:
SHOW JOIN ORDER RECOMMENDATIONS;
SHOW MV RECOMMENDATIONS;
SHOW AUTOML RUNS LIMIT 20;
The exact results depend on the collected workload and configured services. Treat LIMIT as an upper bound, not an expected run count.
Applying Recommendations
Review a concrete SQL hint and its target before executing it. The engine also exposes a plural batch command:
APPLY RECOMMENDATIONS FOR TABLE analytics.sales.orders;
This attempts executable recommendations for the selected table and returns table, sql, success, and error. Inspect every outcome; an empty executable set is not evidence that maintenance occurred. There is also an unscoped APPLY RECOMMENDATIONS command, which has a broader effect.
The singular APPLY RECOMMENDATION '<id>' and SHOW RECOMMENDATION HISTORY are not the documented SQL interfaces. Do not assume the batch application command prompts for confirmation inside the engine.
Auto-applied recommendations
The autonomous path requires explicit enablement and remains subject to its configured confidence and action policy. Use run records to distinguish proposed actions from successful applications and failures. Review schema-changing recommendations separately according to your organization's change policy.
Propagation of planner changes
Planner-related changes reach the whole query service asynchronously, not all at once. If a change doesn't seem to take effect, inspect the run results and allow a short time before retrying. See learned optimization.
Measure the result
Compare representative queries before and after a change, using similar data snapshots, cache conditions, and concurrency. Track execution time, bytes scanned, and maintenance cost. A SQL hint or estimated impact is not proof of an improvement.