MySQL HeatWave User Guide
You can load tables into HeatWave using the
SECONDARY_LOAD clause.
To load a table into MySQL HeatWave, specify the
SECONDARY_LOAD clause in an
ALTER TABLE statement and use
the following syntax.
ALTER TABLE table_name SECONDARY_LOAD [PARTITION (...)] [GUIDED {ON | OFF}];
Specify the following clauses in the
ALTER TABLE statement:
table_name: Specify the name of the
table to load to MySQL HeatWave.
PARTITION: Available as of MySQL
9.1.0. To learn more about partitions, see
Load
Partitions. If including partitions in the
command, add them as needed.
GUIDED: Available as of MySQL 9.4.1.
Allows you to disable and enable Guided Load as needed. Set to
OFF to disable Guided Load. By default, Guided Load
is enabled.
The SECONDARY_LOAD clause has these
properties:
Data is read using the READ
COMMITTED isolation level.
Available as of MySQL 8.2.0, the Guided Load feature performs a set of checks and validations before loading data.
These checks include the following:
Automatically exclude tables and columns that cannot be
loaded and set them with the NOT
SECONDARY attribute.
Automatically set SECONDARY_ENGINE to
rapid.
As of MySQL 9.4.1, you have the option to disable Guided Load if you want to skip these checks.
The following example loads the
airport_geo. The Guided Load feature is enabled
by default.
mysql> ALTER TABLE airport_geo SECONDARY_LOAD;
Warning (code 3877): Command executed during preprocessing: 'ALTER TABLE `airportdb`.`airport_geo` MODIFY `geolocation` point NOT NULL COMMENT '' NOT SECONDARY'.
Warning (code 3877): Command executed during preprocessing: 'ALTER TABLE `airportdb`.`airport_geo` SECONDARY_ENGINE=RAPID'.
Warning (code 3877): 1 InnoDB parallel read thread was requested to load airportdb.airport_geo (session variable value: 4).
The following example loads the
airport_geo and disables Guided Load.
mysql> ALTER TABLE airport_geo SECONDARY_LOAD GUIDED OFF;
Learn how to load partitions.