CodeLover
CodeLover

Reputation: 61

Apply Batch keyword to select statements

Is it possible to execute a batch of select statements using dse cassandra or should i consider a design change?

The reason is i have a lot of select queries i wish to execute against my db cluster and not sure about going about it. I have deleted all my secondary indexes so im not using those anymore.

Upvotes: 1

Views: 62

Answers (1)

Moshe Eshel
Moshe Eshel

Reputation: 728

That won't work and even if it would, it isn't adviseable.

  1. You won't recieve the results in a way that you can use, no result set
  2. Even if that worked, the batch query would be much less performant than doing them serially due to the way Cassandra batching is implemented.

Batching only works well if the keys (write executions) are distributed in an equal way, and this is only worth it if you want to do all the updates as a transaction. So in summary you should definitely consider a design change

Upvotes: 2

Related Questions