hera icon indicating copy to clipboard operation
hera copied to clipboard

Batch insert support for MYSQL worker

Open rasamala83 opened this issue 2 years ago • 1 comments

Currently MYSQL worker not supporting batch insert, it is better to enhance functionality to support batch insert to reduce the number of roundtrips while inserting a lot of entries.

rasamala83 avatar Jan 15 '23 04:01 rasamala83

I think for multiple rows, you can use multiple bind names/positions, e.g. INSERT INTO tbl_name (a,b,c) VALUES(1,2,3), (4,5,6), (7,8,9); https://dev.mysql.com/doc/refman/8.0/en/insert.html

Oracle uses OCIBindArrayOfStruct() [https://github.com/paypal/hera/blob/master/worker/cppworker/worker/OCCChild.cpp#L3588] with the same sql as a single row

ModEtchFill avatar Jan 31 '23 00:01 ModEtchFill