backenddatabasessql
An index is a read path with a write cost
Anonymous
An index can speed lookups that match its key order, but inserts and updates must maintain it and it consumes storage. For an index ordered by account_id then created_at, queries filtering by account_id can use the leading key; a query on created_at alone may not benefit in the same way. Check the query shape before adding one.
0