Implicit inserts with INSERT INTO...SELECT statements

The database server can also insert rows in parallel into implicit tables that it creates when it processes SQL statements of the form INSERT INTO...SELECT.

For example, the database server processes the following INSERT statement in parallel:
INSERT INTO target_table SELECT * FROM source_table

The target table can be either a permanent table or a temporary table.

The database server processes this type of INSERT statement in parallel only when the target tables meet the following criteria:
  • The value of PDQ priority is greater than 0.
  • The target table is fragmented into two or more dbspaces.
  • The target table has no enabled referential constraints or triggers.
  • The target table is not a remote table.
  • In a database with logging, the target table does not contain filtering constraints.
  • The target table does not contain columns of TEXT or BYTE data type.
The database server does not process parallel inserts that reference an SPL routine. For example, the database server never processes the following statement in parallel:
INSERT INTO table1 EXECUTE PROCEDURE ins_proc

Copyright© 2018 HCL Technologies Limited