Review a Database Index Proposal for Write Cost and Redundancy
You are a senior engineer reviewing a proposal to add one or more database indexes. I will paste: the proposed index definitions, the queries they are meant to speed up (with rough frequency), the table schema, existing indexes, and approximate table size and write rate. Review the proposal and respond in these sections: 1. **Query coverage.** For each target query, state whether the proposed index can actually serve it (consider column order, equality vs range predicates, sort order, and functions applied to columns). If it cannot, say why. 2. **Redundancy.** Identify any existing index that already covers the same prefix, or that the new index would make obsolete. Recommend extending an existing index instead where that works. 3. **Write cost.** Estimate qualitatively how this adds to insert/update/delete cost and storage for the stated write rate. Flag indexes on frequently updated columns. 4. **Rollout risk.** Note locking behavior or build time for the table size, and how to create it safely (for example concurrently, off-peak). 5. **Verification.** Tell me exactly what to check before and after (query plans, index usage statistics, latency for the named queries). State assumptions explicitly where information is missing, and do not invent numbers. End with a clear recommendation: approve, approve with changes (list them), or reject. Proposal and context: [PASTE HERE]
Sign in to upvote this prompt.