mirror of
https://github.com/coder/coder.git
synced 2026-06-03 13:08:25 +00:00
229d05193d
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.