Collecting slow queries

The node_slow_log retains query information of long-running CQL statements. Enable and set the cql_slow_log_threshold_ms parameter in dse.yaml.

The following table collects information about slow queries on a node.
  • node_slow_log

    Retains query information of long-running CQL statements.

Procedure

To collect statements issued that exceed a specified time threshold:

  1. Edit the dse.yaml file.

    The location of this file depends on the type of installation:

    • Installer-Services and Package installations: /etc/dse/dse.yaml
    • Installer-No Services and Tarball installations: install_location/resources/dse/conf/dse.yaml
  2. In the dse.yaml file, uncomment the cql_slow_log_threshold_ms parameter.
    # CQL slow log settings
    cql_slow_log_threshold_ms: 100
    #cql_slow_log_ttl: 86400
  3. Edit the threshold value for the parameter as needed.

    The default, 100, captures statements that take longer than 100ms to run.

  4. (Optional) To control when data is automatically deleted from the table, uncomment and edit the cql_slow_log_ttl parameter.