Documentation Home
MySQL HeatWave User Guide
Related Documentation Download this Manual
PDF (US Ltr) - 1.6Mb
PDF (A4) - 1.6Mb


MySQL HeatWave User Guide  /  ...  /  Query Insights Examples

2.8.4.3 Query Insights Examples

  • To view runtime data for all queries in the HeatWave query history for a particular schema:

    mysql> CALL sys.heatwave_advisor(JSON_OBJECT('target_schema',JSON_ARRAY('tpch'),
              'query_insights',true));
  • To view runtime data for queries issued by the current session:

    mysql> CALL sys.heatwave_advisor(JSON_OBJECT('query_insights',true, 
              'query_session_id', JSON_ARRAY(connection_id())));
  • To view runtime data for queries issued by a particular session:

    mysql> CALL sys.heatwave_advisor(JSON_OBJECT('query_insights', true, 
              'query_session_id', JSON_ARRAY(8)));
  • This example demonstrates how to invoke the Query Insights Advisor in silent output mode, which is useful if the output is consumed by a script, for example.

    mysql> CALL sys.heatwave_advisor(JSON_OBJECT('query_insights',true,'output','silent'));