PostgreSQL stores every index separately from the table heap: all indexes are secondary indexes. It supports INCLUDE non-key columns and index-only scans, so a covering index can sometimes avoid heap fetches. Visibility information can still require a heap visit, so an index-only scan does not always eliminate every heap access.
Medium
sql
database