How to use "with (nolock)", usually used in select in SQL Server in Prisma?
Asked
Active
Viewed 213 times
0
-
First off, `nolock` is very rarely the best solution to whatever your problems are -- it's a [bad habit](https://www.sentryone.com/blog/aaronbertrand/bad-habits-nolock-everywhere) to put it everywhere and at least dubious even when not put everywhere. If your ORM doesn't directly support provider-specific syntax for applying locking hints (and I don't know if it doesn't, but it would not be surprising) you can also start a transaction under isolation level `READ UNCOMMITTED`, which has largely the same effect (except that it applies to all tables used in the transaction). – Jeroen Mostert Jul 14 '22 at 14:23
-
No, Prisma doesn't support dirty or phantom reads. Actually SQL SERVER is the only DBMS that comes to mind in this regard. What issues make you so desperate that you are looking for this in Prisma? There is probably some better means to deal with them. – Thorsten Kettner Jul 14 '22 at 16:14
-
Thanks for answering. I'm not "so desperate". I'm researching solution options for specific cases. Despite the criticisms, we use this type of query in some resources. – Rene Melop Jul 15 '22 at 16:22