Tracing slow queries

About this task

Trace slow queries to view the stages in a query and determine where performance bottlenecks occur.


Access to the trace query feature in OpsCenter requires permission granted to a user role. Those users with the admin role have full privileges.

About this task

When initially accessing the Slow Query console, a warning dialog informs you of potential consequences to data or performance when tracing queries. Review the information, select I Understand and click Close to continue.



  1. Select cluster name > Services.

  2. Click the Configure link for the Performance Service.

    The Overview tab displays the performance panels.

  3. Click the Slow Queries panel.

  4. Select a query from the Slow Queries list.

    The CQL query appears with syntax highlighting in the query box. Selecting a query from the list automatically selects the keyspace for the query.

  5. Click Trace.

    The query executes and displays each stage in the query, including timestamp and elapsed time in microseconds. To view the longest running stages of the query, sort the query by the Elapsed Time column. IP addresses for any nodes in the Source list are highlighted in red.


  6. To make adjustments to the query, select an option from the Consistency or Coordinator lists and experiment with running additional traces.

    Generally, selecting a keyspace is not applicable to tracing a query selected from the Slow Queries list because that was already done for that query. If you have tables named the same but located in different keyspaces, select the Keyspace to trace. The Slow Queries excludes system or OpsCenter keyspaces.

  7. To run an ad hoc query:

    1. Enter the CQL statement directly in the query box.

    2. Make any selections from the Consistency, Keyspace, or Coordinator lists.

    3. Click Trace.

Was this helpful?

Give Feedback

How can we improve the documentation?

© 2024 DataStax | Privacy policy | Terms of use

Apache, Apache Cassandra, Cassandra, Apache Tomcat, Tomcat, Apache Lucene, Apache Solr, Apache Hadoop, Hadoop, Apache Pulsar, Pulsar, Apache Spark, Spark, Apache TinkerPop, TinkerPop, Apache Kafka and Kafka are either registered trademarks or trademarks of the Apache Software Foundation or its subsidiaries in Canada, the United States and/or other countries. Kubernetes is the registered trademark of the Linux Foundation.

General Inquiries: +1 (650) 389-6000,