Bulk Insert on Merge

For databases like Microsoft SQL Server and MySQL, conn:merge{} provides a bulk insert option, which can improve performance when inserting a large number of rows.

The bulk insert feature ignores key column definitions and always performs an INSERT using a bulk insert syntax.

conn:merge{data=T, bulk_insert=true, live=true} -- Enables bulk insert

Bulk insert operations only perform inserts. If you need to update rows as well, you must handle this separately. If the bulk insert encounters a duplicate row based on key columns, an error will occur.

 

Related pages