3 ms·
Looks neat, the first thing I search for in the docs is: Unique indexes Not currently supported. Requires query rewriting and separate execution engine to
by Existenceblinks 1y ago
Looks neat, the first thing I search for in the docs is:
Unique indexes Not currently supported. Requires query rewriting and separate execution engine to validate uniqueness across all shards.
But still looks promising.
- levkk 1y agoSmall consolation prize is we can generate unique primary keys: https://docs.pgdog.dev/features/sharding/primary-keys/ https://docs.pgdog.dev/features/sharding/primary-keys/. I would like to implement cross-shard unique indexes, but they are expensive to check for every query. Open to ideas!
- guiriduro 1y agoAren't UUIDs the a priori collision-free index of choice ?
- reactordev 1y agoThe problem is which version? Also does the cluster index need to be embedded? Or shard index? Or whatever you are using to track the storage of the record? Should we care?
- maherbeg 1y agoa nice way to solve this is a hash ring and put it in the ID. you can re-shard the ring as you need to, and can route to where the object lives easily.