I'm using node as backend for my application. And postgresql as database. For accessing database I'm using Prisma But now I'm really worried about the DB hit on each API calls. So is there any method to find number of queries passed through prisma client or to see the queries. Or Should I need to log anything in my postgresql for that?
Asked
Active
Viewed 89 times
0
-
There is nothing in Postgres that tracks the number of queries; you will need to log them then query that log. But what do you mean by `worried about the DB hit on each API calls`. If that means the total number of queries hitting the database well *do not worry*; unless you have 1000s/sec and already know that is a problem. You might want to google `Donald Knuth: Premature optimization - The root of all evil.` – Belayer Sep 19 '22 at 18:58