Ingestion by using the INSERT…SELECT statement

You can use the INSERT…SELECT statement to ingest data into Db2® Big SQL.

For details, see INSERT statement.
Important: If you specify the VALUES clause, each insert operation produces one file. Query performance can be adversely affected when there are many small data files.

The CREATE (HADOOP/HBASE) TABLE…AS statement runs an INSERT…SELECT statement in the background. For more information, see CREATE TABLE (HADOOP) statement or CREATE TABLE (HBASE) statement.

During an INSERT…SELECT operation into a partitioned table, write operations in the HDFS occur on only a single logical worker node per partition. Therefore, if you are using Db2 Big SQL INSERT…SELECT or CREATE (HADOOP/HBASE) TABLE…AS statements to ingest data into your table, consider the parallelism of INSERT…SELECT operations when choosing the partitioning strategy for the table. It is good practice to have INSERT…SELECT operations write to a number of partitions that is approximately equal to the number of configured logical worker nodes, bearing in mind that a table should have no more than several thousand partitions. If your INSERT…SELECT operations are typically inserting into only a single table partition, it might be preferable to not partition the table.