Are the queries logged with `log: ['query']` only ...
# orm-help
m
Are the queries logged with
log: ['query']
only the queries that are sent to the db, or ALL queries, including the ones that would be cached locally from the data loader? Is there a way to only log queries that are explicitly sent to the db and not the ones that are cached?
r
Hey @Matheus Assis 👋 Currently that is not possible, so could you open a feature request here explaining the above use case so we can look into it further.
j
There is no caching of any queries, and the logging output you see are exactly the queries that are run against the database. Any batching happens between Prisma Client and the Query Engine on a higher level.
Are you seeing queries that you do not expect to see?
m
Sorry for taking so long but I just remembered about this question 😞 But Sometimes I feel that prisma does a lot of queries. Like this: (attached video) Even without the nested children + children + children and with a simple object I got like 8 queries