secondary index
Provide another access path besides the table’s primary organization.
Use this when Queries use an email or status rather than the primary lookup key.
without the term
“Users search by a field other than the primary key. Evaluate another lookup path and its write cost.”
with the term · How do you ask a model for secondary index?
Evaluate a secondary index for this query. Show the access path, row fetches, and write maintenance cost.
What is secondary index?
A secondary index maps indexed values to the records they identify. Storage engines differ: PostgreSQL indexes are separate from the heap, while some clustered engines use primary-key values in secondary indexes.
Why does secondary index matter when vibe coding?
An agent can assume every indexed lookup retrieves the full row without another access.
How do you do secondary index?
Choose an index for a real filter or ordering. Inspect the plan and table accesses, then measure write overhead and index size.
What goes wrong with secondary index?
Secondary indexes add work to writes and are not necessarily unique or covering.
Sources for this entry
- PostgreSQL: Index-only scans and covering indexes
Secondary indexes, payload columns, and visibility checks required for index-only scans.
- PostgreSQL: Indexes
Indexes accelerate selected lookups while adding storage and write maintenance.
Sources checked . Source checks do not establish human editorial approval. How we check content.