- Notifications
You must be signed in to change notification settings - Fork928
Closed
Description
By checking our AWS RDS metrics, we found that one slow query is consuming a lot of database resource and causing high database load.
This is the query -- name: GetDeploymentDAUs :many SELECT (created_at at TIME ZONE cast($1::integer as text))::date as date, user_id FROM workspace_agent_stats WHERE connection_count > ? GROUP BY date, user_id ORDER BY date ASC
We may have a query or table to optimise here. The avg latency per call is 42s for a single query.
Metadata
Metadata
Assignees
Labels
No labels