1. Identifying Expensive Queries
In Studio, navigate to the Activity Resource Usage page.
If you don’t have monitoring data from SingleStore’s monitoring solution, press Begin Profiling to capture current cluster activity for a period of time. Be sure to record during the workload or query of interest, if you have identified one from collecting a report in the previous step, or from another source.
If one has been identified, switch the database selector to the problematic database. See the following example image, where you can find the database selector to the top left.
Sort on
Elapsed Time
andRun Count
by clicking on the field name. Hover over theTime Spent
bar and look at what queries are spending the most time on.Sort on CPU, Memory, and Network, respectively to identify other resource-intensive queries.
Distinguish query shapes that may be resource-intensive due to having a high
run count
compared to others. Is a query using resources because of how many times it has been executed, or is it using a large number of resources across a low number of executions?Note the
activity_name
of queries that have high elapsed time, run count, and/or that are using a lot of a given resource.Click on the Nodes tab to identify which node these queries are running on. The Nodes tab can also help to confirm why a given node is running slowly.