In the many-to-many case of relationships between entries (e.g., every structure has a distinct reference), our way of resolving relationships can be quite slow (we currently hook into the OPTIMADE ID filter and just do a bit chained OR). Ideally, this is something that should be handled directly by join queries in the backend. For MongoDB, this should be straight forward but will need some profiling on "real" databases first.