Hi, I have a question concerning prismas database ...
# orm-help
m
Hi, I have a question concerning prismas database efficienty. I have the following situation: I have a
User
object and a
Event
object. A
User
is attending many `Event`s and an
Event
has many atendees. I have defined queries for users and events via resolver forwarding with the standart
where
args generated by prisma. I would like to query all users attending a certain event. What if I decided to query said users attending an event via the
where
args in the
user
query? Would the prisma backend go through all users (lets say there are 2M users (just dreaming 🙂 )) or does prisma figure out that it is more efficient to query the event by its id and then return the user objects associated? Just wondering how queries are resolved in prisma 🙂 Thx
l
It uses the data loader pattern