This document provides more details about new messages about batches that are now logged in Apache Cassandra 2.1 and also describes the correct use of batches.
In DSE 4.7 (Cassandra 2.1) a new message is reported in the log if an incorrect use of a batch is detected:
WARN [Thrift:16003] 2015-07-15 12:40:46,528 NoSpamLogger.java:94 - Unlogged batch covering 12 partitions detected against table [tablename]. You should use a logged batch for atomicity, or asynchronous writes for performance.
A batch that inserts data across many partition keys has been detected.
As the message suggests, batches should only be used when atomicity (consistency across tables) is needed. In such cases very small logged batches are fine.
In general, batches should always be avoided when loading data, They do not provide any performance advantage and can very easily overload the coordinator. Even the use of unlogged batches is not recommended, especially when the data in the batch does not relate to the same partition key.
The use of asynchronous writes (using for example a prepared insert statement through one of the latest 'TokenAware' drivers) is recommended when inserting data into the cluster and should always be preferred against batches when consistency across tables is not required.
You can read more info about the correct use of batches in Cassandra at the following pages: