rss
topics

[] [systems]

indexing notes

entry

indexes are not magic speed switches. they are compact lookup structures that work best when the query shape and data distribution make the lookup cheaper than scanning.

reminders

  • start with the query, not the table.
  • check the cardinality of the columns involved.
  • avoid adding an index without knowing the write cost.

useful question

what access pattern is this index making cheaper?