PLANNED MAINTENANCE

Hello, DataStax Community!

We want to make you aware of a few operational updates which will be carried out on the site. We are working hard to streamline the login process to integrate with other DataStax resources. As such, you will soon be prompted to update your password. Please note that your username will remain the same.

As we work to improve your user experience, please be aware that login to the DataStax Community will be unavailable for a few hours on:

  • Wednesday, July 15 16:00 PDT | 19:00 EDT | 20:00 BRT
  • Thursday, July 16 00:00 BST | 01:00 CEST | 04:30 IST | 07:00 CST | 09:00 AEST

For more info, check out the FAQ page. Thank you for being a valued member of our community.


question

satvantsingh_190085 avatar image
satvantsingh_190085 asked ·

How we can identify and kill a long-running query?

How to kill running query which is affecting my cluster performance badly .

cassandraperformance
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

1 Answer

Erick Ramirez avatar image
Erick Ramirez answered ·

It isn't possible to kill long-running queries in C* since each query runs in a thread (not a separate process) and is executed in several replicas for any consistency level higher than one.

You can only determine the queries hitting your cluster if you have audit logging enabled. In Cassandra, this isn't enabled by default because it is expensive and has a significant effect on the performance of your cluster. It isn't easy to quantify the impact of audit logging because it depends on a lot of moving parts including use case, data model, access patterns, hardware configuration, etc.

Cassandra also logs slow queries by default. Queries are considered slow if they take longer than the slow query timeout in cassandra.yaml:

slow_query_log_timeout_in_ms: 500

For details, see How to I collect slow queries in Apache Cassandra 3.11.6. Cheers!

2 comments Share
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

I understand for future we can identified bad query and tune.

But still if we have to get rid of that query at run time , what we can do as a admin ?

0 Likes 0 · ·

Again, you can't kill in-flight queries other than restarting Cassandra on a node. Cheers!

0 Likes 0 · ·