Spatial joins in the Gen3 Registry are handled via tables that fully expand the skypix IDs for each region. Because any skypix system we'd consider uses a space filling curve, those will frequently involve many consecutive IDs, and we could instead switching to an approach where the join tables stored ranges via begin and end skypix IDs. joins would then involve many fewer rows, but with much more complex comparison expressions.
This should be implemented in a way that makes it configurable per-repo. We should also consult database experts to see if there are special index types that should be used for interval comparisons.