HeatWave on AWS  /  Running Queries  /  Running HeatWave Queries

9.1 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 HeatWave User Guide. You can also refer to the Quickstarts in the HeatWave User Guide, which show how to import data into a DB System, load data into HeatWave, and run queries: