Is it possible to use stored procedures with prism...
# orm-help
v
Is it possible to use stored procedures with prisma and planetscale? If not is there any alternative for this?
👀 1
a
Hey there! You can execute any defined stored procedures with the
$executeRaw
(docs) method on the Prisma Client. There is not a first-class integration or way to define them through Prisma Migrate, though.
v
Hi, thanks for the response! I did read about that on the internet but seems like I can’t store the procedures when using PlanetScale, so I think this is the limitation of PlanetScale(?). Anyway, is it possible to reduce read or write queries by using the
findMany
or
createMany
methods from Prisma client API? Sorry for the noob questions, I’m still familiarizing myself with Prisma and PlanetScale.
a
You can log out what queries Prisma is generating by enabling query logging. If you need to fine tune the SQL, you will need to use
$queryRaw
(docs).