CeeJay
PPrisma
•Created by CeeJay on 2/11/2025 in #help-and-questions
Cloudflare D1 Performance
Okay more context / information.
I have added additional mechanisms to query the DB using
prisma.$queryRawUnsafe
and c.env.DB.exec
to observe differences in response time. Interestingly the response time for each are broadly similar at ~200ms, BUT the cpuTime for the request is fairly static at ~180ms. I've tried combinations of the client-adapters, the 'native' c.env.DB.exec
gives a variable time of between 5-90ms
.
So in summary it would appear there is something fishy with the D1 service occassionally taking significantly more time (recognising I have done fairly limited test iterations). However it's equally clear that the prisma-d1-adapter is consistantly taking around 200ms
meaning it's unsuitable for CF workers given the cpuTime limits.
I'd be very happy to be wrong or have a misconfigured prisma client, but looks like I'll need to take it out...4 replies