Performance issues after 2.14
See original GitHub issueBug description
After upgrading prisma do a version higher than 2.14 I’m experiencing performance issues with the queries. Mocha reports tests that usually took less than 60ms to now be taking more than 150ms, sometimes more than 200ms to complete
I commented about this in #5485 and analyzed the logs, but they’re identical (or very similar) so it does not seems like it’s the same as #5274
Expected behavior
Average performance should remain the same or improve between Prisma versions.
Prisma information
I’ve picked some queries to show comparing 2.14 with 2.15 and 2.17, but they were exactly the same, the only difference was the time it took to run them (54ms -> 141ms, 65ms -> 193ms) so I don’t thing it make sense to show them (since they’re the same). But it’s not a problem to share that part of the schema and queries if needed
Environment & setup
- OS: Debian 10 buster x64
- Database: PostgreSQL 12 (localhost)
- Node.js version: v14.15.5
- Prisma version: >= 2.15.0
Please let me know if you need more information or tests that you need. Thanks!
Issue Analytics
- State:
- Created 3 years ago
- Reactions:4
- Comments:25 (15 by maintainers)

Top Related StackOverflow Question
A simple query on 2.19 is much slower than on 2.14. I have tested with this example.
Environment:
Db model:
Code:
Results:
$queryRaw is slower as well.
@pantharshit00 please try my simple example with data provided to you under the NDA we have. The query is orders of magnitude slower since.
Edit: I was really sleepy when I was writing the answer.
Form my observations:
Long prisma log