Whenever you're ready, walk me through how you'd approach this.
In PostgreSQL, index choice can materially change both query latency and ingestion cost, especially on large append-heavy tables such as card authorisations or ledger events.
You are asked to explain how B-Tree indexes differ from BRIN indexes in PostgreSQL. Compare how they store information, what query patterns they support well, and how they affect query performance on large Revolut-style transaction tables. You should also explain write amplification: why some indexes make inserts and updates more expensive, and why BRIN often has a lower maintenance cost than B-Tree.
A strong medium-level answer should cover physical behavior at a high level, when each index is a good fit, what happens when data is naturally ordered versus randomly distributed, and the trade-off between fast point lookups and cheaper writes. You do not need to discuss every PostgreSQL index type; focus on B-Tree and BRIN with practical examples.