Files
coder/coderd
Spike Curtis 229d05193d fix: speed up GetTailnetTunnelPeerBindings query (#19444)
relates to: https://github.com/coder/internal/issues/718

Optimizes the GetTailnetTunnelPeerBindings query to reduce its execution time.

Before: https://explain.dalibo.com/plan/c2fd53f913aah21c

After: https://explain.dalibo.com/plan/6bc67d323g7afh61

At a high level, we first assemble the total list of peer IDs needed by the query, and only then go into the `tailnet_peers` table to extract their info. This saves us some time instead of hashing the entire `tailnet_peers` table.
2025-08-21 07:53:56 +02:00
..
2025-07-15 14:55:34 +10:00