mirror of
https://github.com/lightningnetwork/lnd.git
synced 2026-08-18 13:07:58 +02:00
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. |
||
|---|---|---|
| .. | ||
| 000001_invoices.down.sql | ||
| 000001_invoices.up.sql | ||
| 000002_amp_invoices.down.sql | ||
| 000002_amp_invoices.up.sql | ||
| 000003_invoice_events.down.sql | ||
| 000003_invoice_events.up.sql | ||
| 000004_invoice_expiry_fix.down.sql | ||
| 000004_invoice_expiry_fix.up.sql | ||
| 000005_migration_tracker.down.sql | ||
| 000005_migration_tracker.up.sql | ||
| 000006_invoice_migration.down.sql | ||
| 000006_invoice_migration.up.sql | ||
| 000007_invoice_add_settled_index.down.sql | ||
| 000007_invoice_add_settled_index.up.sql | ||
| 000008_graph.down.sql | ||
| 000008_graph.up.sql | ||
| 000009_graph_v2.down.sql | ||
| 000009_graph_v2.up.sql | ||
| 000010_payments.down.sql | ||
| 000010_payments.up.sql | ||
| 000011_payment_duplicates.down.sql | ||
| 000011_payment_duplicates.up.sql | ||
| 000012_drop_redundant_invoice_indexes.down.sql | ||
| 000012_drop_redundant_invoice_indexes.up.sql | ||