I upgraded from prisma 3.7.0 to prisma 3.11.0 and ...
# orm-help
m
I upgraded from prisma 3.7.0 to prisma 3.11.0 and now my app is about 5x slower when I perform queries. any idea why that might be? I tried changing only my prisma layer back from 3.11.0 to the 3.7.0 layer and the runtime performance got much better.
👀 1
j
I have no clue, but try 3.11.1 (latest), maybe you get luck
m
I think 3.10.0 is the version that's broken
and later
m
Hey Mischa! do you know what queries you're noticing this slowness on?
m
seems like maybe all of them, the biggest issue for me was doing a bunch of queries inside an interactive transaction
j
Interactive Transactions definitely changed, as that is a preview feature under active development (and fixing) - but nothing that should have a negative impact on performance. How do you generally see that everything is slower - total test runtime or something like that? Can you show it on one example query maybe?
m
all of my endpoints got slower. i spent many hours trying to track down what was wrong. i added console.log statements all over my code and would deploy it and run it. I was getting this error:
Copy code
"Error: [object Object]",
        "    at _homogeneousError (/var/runtime/CallbackContext.js:12:12)",
        "    at postError (/var/runtime/CallbackContext.js:29:54)",
        "    at done (/var/runtime/CallbackContext.js:58:7)",
        "    at fail (/var/runtime/CallbackContext.js:70:7)",
        "    at /var/runtime/CallbackContext.js:106:16"
I managed to eventually track it down to happening when I returned from the interactive transaction. maybe it's a timeout error, I don't know. it is not a very nice error. after many more hours I isolated the issue to the version of prisma. 3.10.0 and above made my queries much slower. 3.9.0 turns out didn't
count
correctly, so I'm on 3.8.0 the transaction timeout(?) error was my first clue, then comparing endpoint response times with the lambda layer with the old version with the new:
response time of that endpoint doing a lot of queries went from ~25s to ~5s or less
only change was downgrading to 3.9.0 or earlier
can easily see where we were on 3.11.0 in this graph
🤯 1
j
Are all these endpoints using interactive transactions?
m
no
j
Can you see it with individual query durations? If you compare the duration of a singular one with both versions?
m
i just added that to xray but i dont have historical info sorry
👍 1
j
Have you taken a look at a query locally? Is it maybe extreme enough to be visible there?