Open payalmujavadiya opened 3 years ago
We are using achilles in our application where we were using insert/update for single entity till now using crud().insert(entity).execute() is there any way we can insert List of entities and execute it at once ?, just to save db calls
In Cassandra CQL, there is no efficient way to batch multiple statements together.
Indeed there is a BATCH CQL command but it will just put the stress on the coordinator node. You'll not see any perf improvement with BATCH statement. The only scenario where BATCH statement is really faster is when all your insert statements belong to the same partition key
If it's the case, have a look at Batch Mode in Achilles
Otherwise, it'll be faster for you to loop through a list of insert statements and use the async API to make the inserts queries parallel.
Be careful when using async feature, do not forget to put a reasonable pause between async inserts otherwise you'll overwhelm the server
Please support for bulk insert and update queries at once