Related Documentation Download this Manual
PDF (US Ltr) - 1.1Mb
PDF (A4) - 1.1Mb

MySQL HeatWave User Guide  /  ...  /  Workload Optimization using Advisor

2.7.3 Workload Optimization using Advisor

This section describes the Advisor utility, which provides the following optimization capabilities:

  • Auto Encoding

    Recommends string column encodings that minimize the required cluster size and improve query performance. See Section, “Auto Encoding”.

  • Auto Data Placement

    Recommends data placement keys for optimizing JOIN and GROUP BY query performance. See Section, “Auto Data Placement”.

  • Query Insights

    Provides runtimes for successfully executed queries and runtime estimates for EXPLAIN queries, queries cancelled using Ctrl+C, and queries that fail due to out of memory errors. Runtime data is useful for query optimization, troubleshooting, and estimating the cost of running a particular query or workload. See Section, “Query Insights”.

Advisor is workload-aware and provides recommendations based on machine learning models, data analysis, and HeatWave query history. Advisor analyzes the last 1000 successfully executed HeatWave queries.

Advisor is implemented as a stored procedure named heatwave_advisor, which resides in the MySQL sys schema. Running Advisor involves issuing a CALL statement for the stored procedure with optional arguments.

CALL sys.heatwave_advisor (options);

Issue the following statement to view Advisor command-line help:

CALL sys.heatwave_advisor(JSON_OBJECT("output","help"));

Advisor can be run from any MySQL client or connector.

Advisor Requirements

  • To run Advisor, the HeatWave Cluster must be active.

  • The user must have the following MySQL privileges: