docs: add release note for v1 node horizon query optimization
What changed, and why it matters
This commit only adds a release note describing a previous database query optimization. It does not change any code, configuration, or API behavior. There is no security issue present in this documentation-only change.
No action required. This is a documentation-only release note with no security relevance.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The commit f3d9b1f2a4d4bb4e1d714f1e2b7ffd053d2aeb10 is a documentation-only addition to docs/release-notes/release-notes-0.21.0.md. It describes an already-merged performance optimization for the v1 node horizon query (PR #10692), including query planner improvements and benchmark results. The diff contains no executable code changes.
Changed components
docs/release-notes/release-notes-0.21.0.mdInspect captured patch +10 / −0
diff --git a/docs/release-notes/release-notes-0.21.0.md b/docs/release-notes/release-notes-0.21.0.md
index 6d01937..e59f4b6 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**
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.