2 ms·
Could you switch from UUIDv4s (what I assume you mean by “pure UUIDs”) to UUIDv1s?
by derefr 9y ago
Could you switch from UUIDv4s (what I assume you mean by “pure UUIDs”) to UUIDv1s?
- koolba 9y agoNo I've considered that as well as splitting the key to be a composite of the partition key but I'd like an eventual solution for this in the general case where there's no relationship between the partitioning method and the primary key.
- snissn 9y agoAs far as I'm understanding your situtation it seems like you're using range partitioning and then hoping to get benefits of hash partitioning from a range partition. I think you would need to use hash partitions to avoid look ups on every every table. You could do something weird like have each range partition have an exclusion filter and make sure that each of your randomly generated IDs accommodate that exclusion filter, and generate IDs until you find one.. But it sounds like you would benefit from a hash partition here instead of a range one.