Test yourself under real exam conditions: 50 timed questions, 60 on the clock, pass mark 70%%. Instant score with a full review of everything you got wrong. Free — no account needed.
Exam details
A secondary data structure that lets the planner find rows matching a predicate without scanning the whole table, at the cost of extra storage and write overhead.
The default index type, a balanced tree that keeps keys sorted and supports equality and range predicates, plus IS NULL, IS NOT NULL, and ORDER BY traversal in index order.
btree.
B-tree, Hash, GIN, GiST, SP-GiST, BRIN, and the extension-provided Bloom (and others like zombodb, rum, pg_trgm).
It speeds up reads (selections, joins, sorts) at the cost of additional storage, slower writes (INSERT/UPDATE/DELETE), and extra work for VACUUM.