Configuring the slow query log
Configure the slow query log in the OpsCenter Performance Service. OpsCenter records any queries that take longer than the configured threshold.
Configure the slow query log parameters in the Performance Service. Examine the slow query log to identify and track queries that take an excessive time to execute. Slow queries are candidates for performance optimization. When the slow query log is enabled, OpsCenter records any queries that take longer than the allotted threshold. By default, the slow query log is enabled in DataStax Enterprise.
Prerequisites
Note: Review and if warranted, update the default replication for
dse_perf
keyspace. The default value might need to be
increased.Procedure
- Click .
- Click the Configure or Details link as appropriate for the Performance Service.
-
Click the Settings tab.
-
Click the Configure link for the Slow Query Log.
The Configure Slow Query Log dialog appears.
- Click the button to the On position.
- Optional:
Enter a Threshold value to override the default. Queries
that take longer than the allotted threshold value are recorded in the slow
query log.
To prevent excess overhead, the threshold must be higher than 15 ms.
- Optional: Enter a TTL in Time To Live to override the default. The TTL indicates how long the recorded slow query should stay in Cassandra in seconds.
- Click Save.