Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

155
Visualizações
Cassandra batch query vs single insert performance

I use Cassandra java driver.

I receive 150k requests per second, which I insert to 8 tables having different partition keys.

My question is which is a better way:

  • batch inserting to these tables
  • inserting one by one.

I am asking this question because , considering my request size (150k), batch sounds like the better option but because all the tables have different partition keys, batch appears expensive.

about 4 years ago · Santiago Trujillo
2 Respostas
Responde à pergunta

0

Please check my answer from below link:

Cassandra batch query performance on tables having different partition keys

Batches are not for improving performance. They are used for ensuring atomicity and isolation.

Batching can be effective for single partition write operations. But batches are often mistakenly used in an attempt to optimize performance. Depending on the batch operation, the performance may actually worsen.

https://docs.datastax.com/en/cql/3.3/cql/cql_using/useBatch.html

If data consistency is not needed among those tables, then use single insert. Single requests are distributed or propagated properly (depends on load balancing policy) among nodes. If you are concerned about request handling and use batch, batches will burden so many extra works on coordinator nodes which will not be efficient I guess :)

about 4 years ago · Santiago Trujillo Relatório

0

Batches have a HUGE impact on performance instead. The sollution that best suits you as I understand to split into diffirent lists per partition keys and then use batch statements. You will see a huge impact on performance.

about 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda