3 ms·
IIRC CockroachDB had (has?) interleaved tables for this reason. It seemed to allow collocating shards with the same foreign key in the same machine, leveraging
by giovannibonetti 4y ago
IIRC CockroachDB had (has?) interleaved tables for this reason. It seemed to allow collocating shards with the same foreign key in the same machine, leveraging composite keys for that.
For example, a multi-tenant application could have a tenants table with PK id, and an orders table with PK (tenant_id, id), and a FK from orders(tenant_id) to tenants(id). Then CockroachDB would keep the orders with tenant_id = 123 in the same machine where the tenant with id = 123 was.
I have the impression they deprecated interleaved tables, but I can't find more info about it.
- doodlesdev 4y agoHere you go: https://github.com/cockroachdb/cockroach/issues/52009 https://github.com/cockroachdb/cockroach/issues/52009 Not only deprecated, but completely removed a few years ago as seen in: https://github.com/cockroachdb/cockroach/issues/69150 https://github.com/cockroachdb/cockroach/issues/69150