Skip to content

Commit 0e8873e

Browse files
committed
feat: add src_id and dst_id indexes to tailnet_tunnels
1 parent 0a8c8ce commit 0e8873e

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

coderd/database/dump.sql

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
DROP INDEX idx_tailnet_tunnels_src_id;
2+
DROP INDEX idx_tailnet_tunnels_dst_id;
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
-- Since src_id and dst_id are UUIDs, we only every compare them with equality, so hash is better
2+
CREATE INDEX idx_tailnet_tunnels_src_id ON tailnet_tunnels USING hash (src_id);
3+
CREATE INDEX idx_tailnet_tunnels_dst_id ON tailnet_tunnels USING hash (dst_id);

0 commit comments

Comments
 (0)