Why it matters
Index text ids used in WHERE clauses; avoid leading-wildcard searches.
Practical steps
- Choose storage for data chat id indexes deliberately (SQLite vs Postgres vs KV); document why.
- Implement index text ids used in WHERE clauses; avoid leading-wildcard searches with migrations that are additive and reversible where possible.
- Use transactions / idempotency keys so retries of data chat id indexes do not double-write.
- Add a fixture DB and migration test covering data chat id indexes.
- Document backup/restore touching tables used by data chat id indexes.
Watch out for
- Copy-pasting outdated snippets for data chat id indexes without re-reading current official docs.
- Shipping data chat id indexes to production without a staging rehearsal and a documented rollback.