Over a three hour connection scaletest, with 6k workspaces, this query generated the most load on the DB in terms of total time, and by CPU utilization - according to CloudSQL query insights.
Times called: 3460
Avg execution time (ms): 674.66
P95 execution timing (seconds):

(Each of the four 'blocks' of spikes on the graph correlates with workspace traffic being simulated. i.e. when clients are connected to agents)
CloudSQL Query Insights:
