3 ms·
Hash indexes can't be used for primary keys: postgres[7878][1]=# SELECT amname, pg_indexam_has_property(oid, 'can_unique') FROM pg_am WHERE amtype = 'i';
by anarazel 7y ago
Hash indexes can't be used for primary keys:
postgres[7878][1]=# SELECT amname, pg_indexam_has_property(oid, 'can_unique') FROM pg_am WHERE amtype = 'i';
┌────────┬─────────────────────────┐
│ amname │ pg_indexam_has_property │
├────────┼─────────────────────────┤
│ btree │ t │
│ hash │ f │
│ gist │ f │
│ gin │ f │
│ spgist │ f │
│ brin │ f │
└────────┴─────────────────────────┘
(6 rows)
And postgres' btree indexes definitely are affected by the randomness in many UUID generation schemes.
- eropple 7y agoHuh, so it is. And looking at our schema, it looks like the UUID/hash tables we've got don't use pkeys at all. Looks like I have a conversation to have. Thanks. :)