I currently have a model where a large number of inserts need to be done (not at startup) on the same table. For the time being I am preparing the insert values set inside the C++ code and then calling the insert stored procedure individually.
e.g.
INSERT ... VALUES ('1','2')
INSERT ... VALUES ('3','4')
INSERT ... VALUES ('5','6')
I would like to know if it is possible (using VoltDB and the C++ client) to either:
1) Do bulk inserts e.g.
INSERT ... VALUES ('1','2'), ('3','4'), ('5','6')
or
2) Pass an array or a string containing a custom delimiter into the stored procedure, then parse it inside and call the individual inserts inside the stored procedure itself.
INSERT ... VALUES ('1,2|3,4|5,6') or similar
then split the string inside the procedure.
If either is possible, could you please point me either to an example, or to the C++ API syntax that would facilitate the implementation? (e.g. looping in stored procedure, in order to parse the string and/or string manipulation functions, etc.)
I would like to try one of these options, in order to test the relative performance. Although I've read that individual inserts should be fast enough, I would think this can differ based on the use case.