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

HeatWave User Guide  /  ...  /  Query Insights Examples 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'),
  • 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'));