Skip to content

Commit 85c8e95

Browse files
committed
docs: add release note for cursor-based invoice pagination
1 parent e02f77e commit 85c8e95

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

docs/release-notes/release-notes-0.21.0.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,14 @@
211211
is fully populated. This new behaviour can be opted out of via the new
212212
`--db.sync-graph-cache-load` option.
213213

214+
* [Invoice pagination queries no longer use
215+
`OFFSET`](https://github.com/lightningnetwork/lnd/pull/10700). The five
216+
invoice filter queries previously used `LIMIT+OFFSET` for internal batching,
217+
which requires the database to scan and discard all preceding rows on every
218+
page. All pagination is now cursor-based (`WHERE id >= cursor`), making every
219+
page an efficient primary-key range scan regardless of how deep into the
220+
result set the query is.
221+
214222
* [Replace the catch-all `FilterInvoices` SQL query with five focused,
215223
index-friendly queries](https://github.com/lightningnetwork/lnd/pull/10601)
216224
(`FetchPendingInvoices`, `FilterInvoicesBySettleIndex`,

0 commit comments

Comments
 (0)