docs: add release note for cursor-based invoice pagination
What changed, and why it matters
This commit only adds a release note describing a previous performance improvement: invoice database queries were changed from slow offset-based pagination to faster cursor-based pagination. There is no code change, no bug fix, and no security relevance in the commit itself.
No action required. This is a documentation-only release note with no security implications.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff adds documentation to docs/release-notes/release-notes-0.21.0.md explaining that invoice pagination queries were refactored from LIMIT+OFFSET to cursor-based (WHERE id >= cursor) primary-key range scans. The actual code change occurred in referenced pull requests and is not part of this commit. This is purely a documentation update.
Changed components
docs/release-notes/release-notes-0.21.0.mdInspect captured patch +8 / −0
diff --git a/docs/release-notes/release-notes-0.21.0.md b/docs/release-notes/release-notes-0.21.0.md
index e59f4b6..ad58f77 100644
--- a/docs/release-notes/release-notes-0.21.0.md
+++ b/docs/release-notes/release-notes-0.21.0.md
@@ -211,6 +211,14 @@
is fully populated. This new behaviour can be opted out of via the new
`--db.sync-graph-cache-load` option.
+* [Invoice pagination queries no longer use
+ `OFFSET`](https://github.com/lightningnetwork/lnd/pull/10700). The five
+ invoice filter queries previously used `LIMIT+OFFSET` for internal batching,
+ which requires the database to scan and discard all preceding rows on every
+ page. All pagination is now cursor-based (`WHERE id >= cursor`), making every
+ page an efficient primary-key range scan regardless of how deep into the
+ result set the query is.
+
* [Replace the catch-all `FilterInvoices` SQL query with five focused,
index-friendly queries](https://github.com/lightningnetwork/lnd/pull/10601)
(`FetchPendingInvoices`, `FilterInvoicesBySettleIndex`,
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.