I'm using Loopback 3 and SQL. We've 20 million rows in SQL tables and when we query data using Loopback it's taking a lot of time and further observation we found queries are blocking in SQL. Noticed that the Loopback auto generated queries doesn't have any WITH (NOLOCK)
. How to add WITH (NOLOCK)
for every SELECT query?
Note: I need to add WITH (NOLOCK) only selected tables and not for everyone.