From 1e5e6f27ef66c8bef4208819678fe3c3dac335ef Mon Sep 17 00:00:00 2001 From: ziggie Date: Sat, 21 Feb 2026 16:04:44 +0100 Subject: [PATCH] docs: add release notes for invoice SQL query performance improvements --- 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 f81ba63dc..d4f00dc93 100644 --- a/docs/release-notes/release-notes-0.21.0.md +++ b/docs/release-notes/release-notes-0.21.0.md @@ -135,6 +135,16 @@ ## Performance Improvements +* [Replace the catch-all `FilterInvoices` SQL query with five focused, + index-friendly queries](https://github.com/lightningnetwork/lnd/pull/10601) + (`FetchPendingInvoices`, `FilterInvoicesBySettleIndex`, + `FilterInvoicesByAddIndex`, `FilterInvoicesForward`, + `FilterInvoicesReverse`). The old query used `col >= $param OR $param IS + NULL` predicates and a `CASE`-based `ORDER BY` that prevented SQLite's query + planner from using indexes, causing full table scans. Each new query carries + only the parameters it actually needs and uses a direct `ORDER BY`, allowing + the planner to perform efficient index range scans on the invoice table. + ## Deprecations ### ⚠️ **Warning:** The deprecated fee rate option `--sat_per_byte` will be removed in release version **0.22**