From f3d9b1f2a4d4bb4e1d714f1e2b7ffd053d2aeb10 Mon Sep 17 00:00:00 2001 From: Elle Mouton Date: Mon, 30 Mar 2026 10:22:48 +0200 Subject: [PATCH] docs: add release note for v1 node horizon query optimization --- docs/release-notes/release-notes-0.21.0.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docs/release-notes/release-notes-0.21.0.md b/docs/release-notes/release-notes-0.21.0.md index 6d01937e7..e59f4b61f 100644 --- a/docs/release-notes/release-notes-0.21.0.md +++ b/docs/release-notes/release-notes-0.21.0.md @@ -228,6 +228,16 @@ targeting uniquely-constrained columns. Also drop four redundant indexes that duplicated UNIQUE constraints or were never used as query filters. +* [Optimize the v1 node horizon + query](https://github.com/lightningnetwork/lnd/pull/10692). Split the + `GetNodesByLastUpdateRange` query into separate all-nodes and public-only + variants, removing a dynamic `COALESCE`/`OR` branch that defeated the query + planner. The public-only `EXISTS` check is rewritten as two direct index + probes instead of `node_id_1 OR node_id_2`. Supporting indexes are upgraded + to composite keys matching the full query shapes. On SQLite, the hot + public-only path sees a ~42% speedup; on the previous code it could stall + for minutes. + ## Deprecations ### ⚠️ **Warning:** Deprecated fields in `lnrpc.Hop` will be removed in release version **0.22**