1. Identifying Expensive Queries

On this page

  1. In Studio, navigate to the Activity Resource Usage page.

  2. 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.

  3. 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.

  4. Sort on Elapsed Time and Run Count by clicking on the field name. Hover over the Time Spent bar and look at what queries are spending the most time on.

  5. Sort on CPU, Memory, and Network, respectively to identify other resource-intensive queries.

  6. 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?

  7. Note the activity_name of queries that have high elapsed time, run count, and/or that are using a lot of a given resource.

  8. 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.

Next Steps

  • If you found a query of interest that is long-running, utilizing a lot of resources, or has an unusual run count, move onto Step 2.

  • If you didn’t identify any useful information here: move onto Step 3.

Last modified: June 20, 2024

Was this article helpful?