Skip to content
RED SAG Skills
hard20 pts · first answer countsindexing

Fast DISTINCT on a low-cardinality column

SELECT DISTINCT country FROM users reads all 5 crore index entries even though there are only 60 countries. In PostgreSQL, what technique makes it touch only about 60 index positions?

Choose one answer

Discussion 0

Join free to post in the discussion.

Related questions