MySQL HeatWave on AWS  /  Running Queries  /  Running HeatWave Queries

Running HeatWave Queries

When a HeatWave Cluster is enabled and the data you want to query is loaded in HeatWave, queries that qualify are automatically offloaded from the MySQL DB System to the HeatWave Cluster for accelerated processing. No special action is required. Simply run the query from the Query Editor, as described above, or from a MySQL client that is connected to the DB System.

Before running a query, you can use EXPLAIN to determine if the query will be offloaded to HeatWave; for example:

mysql> EXPLAIN SELECT O_ORDERPRIORITY, COUNT(*) 
          AS ORDER_COUNT FROM tpch.orders 
          WHERE O_ORDERDATE >= DATE '1994-03-01' 
          GROUP BY O_ORDERPRIORITY 
          ORDER BY O_ORDERPRIORITY;

If the query can be offloaded to HeatWave, the Extra column of EXPLAIN output shows "Using secondary engine RAPID". If that information does not appear, the query cannot be offloaded.

For more information about running HeatWave queries, see Running Queries, in the MySQL HeatWave User Guide. You can also refer to the HeatWave Quickstarts in the MySQL HeatWave User Guide, which show how to import data into a DB System, load data into HeatWave, and run queries.

Query Editor Limitations

The Query Editor has the following limitations:

  • It is not intended for loading data into a DB System. The most efficient method of loading data into a DB System is using MySQL Shell, which provides parallel load capabilities. For more information, see Importing Data.

  • Only results for the last executed query are displayed.

  • Creating or calling stored procedures is not supported.

  • SQL code comments are not accepted.

  • Long query results might be truncated.