Inserting Rows in Bulk

The ins_by_bulk parameter improves performance by directly inserting data rows into newly allocated data pages by bulk for tables. You can set ins_by_bulk at the query level using the abstract plan for a specific insert statement.

The ins_by_bulk parameter improves performance by directly inserting data rows into newly allocated data pages by bulk for tables. You can set ins_by_bulk at the query level using the abstract plan for a specific insert statement.

The syntax is:

insert into. . . 
select . . . 
plan "(use ins_by_bulk on)"

For example:

insert into my_salesdetail (stor_id, ord_num, title_id, qty, discount)
select stor_id, ord_num, title_id, qty, discount from salesdetail
where qty > 100
plan '(use ins_by_bulk on)'