Batch insert mode for INSERTS
MariaDB ColumnStore has the ability to utilize the cpimport fast data import tool for non-transactional “LOAD DATA INFILE’ and “INSERT INTO SELECT FROM” SQL statements. Using this method results in a significant increase in performance in loading data through these two SQL statements.
Enable/Disable Using cpimport for Batch Insert
The infinidb_use_import_for_batchinsert variable is used to control if cpimport is used for these statements. This variable may be set as a default for the instance, set at the session level, or at the statement level by toggling this variable on and off.
To enable/disable the use of the use cpimport for batch insert at the session level, the following command is used. Once the session has ended, any subsequent session will return to the default for the instance.
set infinidb_use_import_for_batchinsert = n where n is: * 0 (disabled) * 1 (enabled)
Changing Default Delimiter for INSERT SELECT
- The infinidb_import_for_batchinsert_delimiter variable is used internally by MariaDB ColumnStore on a non-transactional INSERT INTO SELECT FROM statement as the default delimiter passed to the cpimport tool. With a default value ascii 7, there should be no need to change this value unless your data contains ascii 7 values.
To change this variable value at the at the session level, the following command is used. Once the session has ended, any subsequent session will return to the default for the instance.
set infinidb_import_for_batchinsert_delimiter = ascii_value where ascii_value is an ascii value representation of the delimiter desired.