Hermes Wiki

Indexing

Which columns get indexes, composite vs single-column, and how that maps to the actual query patterns hitting the table.

Why we need this / what value this brings

An unindexed query that seems fine at 100 rows becomes a full table scan that times out at 100,000 rows — indexing is what keeps queries fast as data grows.

When to use this

Any column used in a WHERE, JOIN, or ORDER BY clause on a table that will grow — add before it becomes a measured problem, not after.

How to use or implement this

Use EXPLAIN ANALYZE to confirm a query is actually using the index you added; composite indexes should match the exact column order the query filters/sorts by.

Research questions

  • Run EXPLAIN ANALYZE on the slowest known query in the booking flow — is it using an index or doing a sequential scan?

Empty folder — drop notes, links, and findings here as you research.

Hermes Wiki