How to add NOLOCK for Auto generated SQL queries in Loopback 3

20 views
Skip to first unread message

Varun Karthikeya Kanaparthi

unread,
Nov 2, 2020, 3:20:29 AM11/2/20
to LoopbackJS
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.

Varun Karthikeya Kanaparthi

unread,
Nov 2, 2020, 3:32:06 AM11/2/20
to LoopbackJS
EX: select * from PrasadTemp  WITH (NOLOCK) 
Reply all
Reply to author
Forward
0 new messages