I have a PostgreSQL table that looks like this:
CREATE TABLE items (
name TEXT NOT NULL,
value TEXT NOT NULL,
PRIMARY KEY (name, value)
);
I frequently do a query to see what values are available:
SELECT DISTINCT value FROM items;
How do I create an index in PostgreSQL that the above query to not have to iterate over all of the items table?