`findMany` optimization
See original GitHub issueWhile we will tackle combining multiple findOne
calls into one findMany
call, we also should optimize multiple findMany
calls, that all have the same selection set, but a different relation filter like so in your GraphQL resolver.
resolve(parent) {
return prisma.comment.findMany({
where: {
post: {
id: parent.id
}
}
})
}
This optimization is a bit more complex to do though, so we will first tackle the optimimzation mentioned in https://github.com/prisma/prisma2/issues/1470
Issue Analytics
- State:
- Created 4 years ago
- Reactions:56
- Comments:13 (4 by maintainers)
Top Results From Across the Web
Query optimization - Prisma
Query optimization. This guide describes ways to optimize query performance, ... Each group is optimized into a single findMany .
Read more >Need Help How to Implement Prisma Query Optimization Look ...
findMany () return posts } //I want this export const posts = async (dynamicRequestedFields ) => { // { // id: true, //...
Read more >mongodb/mongoose findMany - find all documents with IDs ...
The find function in mongoose is a full query to mongoDB. This means you can use the handy mongoDB $in clause, which works...
Read more >Setting up an optimization engine
Sign up for a free IBM Cloud account and you'll find many Decision Optimization Notebooks already available in Watson Studio Cloud.
Read more >Wolfram Optimization: Model, Solve, Analyze Designs
Solve families of optimization problems by using parameters in objectives and constraints. Find many solutions efficiently (parameter sweeps), safe solutions ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
This would be a big + for anyone using graphql thinking of migrating to Prisma
Any updates on this? IMHO, performance optimizations like this should be top priority for an ORM.