Slow query recommendations
Recommendations that appear for assistance with resolving slow query issues are described in the table. The recommendations appear in the Recommendations panel when the Performance Service detects known issues in a CQL query statement.
Recommendation | Description |
---|---|
Avoid |
Checks that |
Avoid using large batches |
Using large batches seems like an optimization but doing so puts extra load on the coordinator, which can cause cluster hotspots in the cluster. Queries run faster after breaking large batches into individual queries and distributing them to different nodes. |
Minimize keys used within the IN clause |
Huge |
Use counter instead of count |
A |
Use prepared statements for your queries |
Prepared statements reduce the workload on the coordinator by removing the overhead of parsing the query. |