paypal/hera

Batch insert support for MYSQL worker

rasamala83 opened this issue · 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.

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