Hi, In my schema, I have 200,000 relationships bet...
# spicedb
d
Hi, In my schema, I have 200,000 relationships between definition A and definition B
Copy code
definition A {
    relation b_instance: B
}

definition B {
    relation c_instance: C

    permission read = c_instance -> read
    permission write = c_instance -> write
}
In my case, all 200,000 instances of B that are related to a particular A node have the same permissions. When I check permissions, the performance is terrible, especially when there is no permission (I suppose it iterates over all 200,000). So I'm doing a lookup, retrieving one B node related to a particular A, and checking its permissions. I'm reading only the first node, but the performance is still unsatisfactory, and it's obvious that it depends on the number of B nodes associated with A. However, I'm fine with just getting any one of the B nodes, and from my understanding, this operation could be completed in constant time. Is there a way to obtain any single B node for a specific A node in constant time?