← Backend PythonQuestion 42 of 49
What index types are available in PostgreSQL and when would you use each of them?
📘 Explanation
PostgreSQL actually offers B-tree, Hash, GIN, GiST, and BRIN indexes, each suited to different workloads like general queries, equality checks, full-text/JSON search, spatial data, or large sequential data. The other options misstate which index types exist or misassign their use cases, and incorrectly claim BRIN doesn't exist or that Bitmap/Clustered are built-in index types.
Related questions
- What is the difference between EXPLAIN and EXPLAIN ANALYZE in PostgreSQL?
- Why might a query using LOWER(email) not use an index on email?
- What is the difference between ANALYZE and VACUUM ANALYZE in PostgreSQL?
- What is the left-prefix rule for composite indexes?
- If PostgreSQL chooses a bad query plan because statistics are stale, what command should you run?
← PreviousNo login needed