AI-generated analysisPublished automatically and not human-verified. Validated context appears in community notes below.
← Watch feed
Informational 15 Bitcoin

sqldb: drop redundant and unused invoice indexes

Public commit record

What the developer wrote

Authored by ziggie

68/100 · Adequate
sqldb: drop redundant and unused invoice indexes

Remove four indexes from the invoices table that either duplicate existing
UNIQUE constraint indexes or are never used in WHERE clauses:

- invoices_hash_idx: redundant, UNIQUE constraint on hash already creates
an implicit index
- invoices_payment_addr_idx: redundant, UNIQUE constraint on payment_addr
already creates an implicit index
- invoices_preimage_idx: unused, preimage is NULL on all new invoices and
is never used as a query filter
- invoices_settled_at_idx: unused, settled_at is NULL on all pending
invoices and is never used as a query filter (settle_index is used
instead)

Dropping these reduces B-tree working set size, which improves page cache
utilization as the invoice table grows.
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
The short version

What changed, and why it matters

This commit removes four database indexes from LND's invoice table. Two are unnecessary because the same columns already have unique-constraint indexes. The other two are reportedly never used in queries. The stated goal is to reduce memory and storage overhead, not to fix a security issue. There is no indication this change introduces a vulnerability.

Recommended action

No security action required. Treat as a routine performance/maintenance migration. Operators should verify the migration runs cleanly and monitor query performance, though the dropped indexes are described as redundant or unused.

Security signals we found

No strong security signals were identified.

Risk score

Why this scored 15/100

Our methodology →
Potential impact 0/30
Exploitability 0/25
Stealth signal 0/15
Affected reach 0/15
Confidence 10/10
Evidence quality 5/5
Human-validated context

Community notes

Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.

No validated notes yet.

The AI analysis stands alone for now. Submit a note if you can add evidence or important context.