mirror of
https://github.com/MeshCore-Beacon/beacon-server.git
synced 2026-10-23 07:32:33 +00:00
perf(routes): index known_routes(last_seen)
The routes list orders by last_seen with no index, so every page seq-scanned and sorted ~150k rows. Same fix as the packets list got in 008.
This commit is contained in:
1 parent
42edcdeb7b
commit
63c0b9779d
1 file changed
+3
@@ -0,0 +1,3 @@
|
||||
-- Routes list orders by last_seen; index it (was seq-scanning ~150k rows per page).
|
||||
|
||||
CREATE INDEX idx_known_routes_last_seen ON known_routes(last_seen DESC);
|
||||
Reference in new issue
Block a user