Mis-understanding about DynamicQueryEngine.UseNoLockHintOnSelects

Posts   
 
    
sasaki
User
Posts: 6
Joined: 23-May-2019
# Posted on: 16-Jan-2020 20:00:39   

One of my developer trying to use DynamicQueryEngine.UseNoLockHintOnSelects = true to fixing the query performance. But when I read the manual in this link, https://www.llblgen.com/documentation/5.3/ReferenceManuals/LLBLGenProRTF/html/9363447C.htm , it says that _UseNoLockHintOnSelects _may cause more blocking. How can blocking occurs because as I understand it will work same as READUNCOMIT Isolation level?

WITH NOLOCK is not recommended though in high volume databases with a lot of rows, it can be a lot of blocking can occur because SqlServer forces readers to block writers and vice versa.

Thank you!

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39761
Joined: 17-Aug-2003
# Posted on: 17-Jan-2020 09:50:50   

That's indeed an error in the docs. We'll correct it for the supported versions. Thanks for the heads up!

What performance issues were you running into btw? The particular feature is a rather old one and is a setting that's applied to all queries. We introduced in v5.1 a per-query target/query hints in v5.5, which might be better suited in your situation.

Frans Bouma | Lead developer LLBLGen Pro
Otis avatar
Otis
LLBLGen Pro Team
Posts: 39761
Joined: 17-Aug-2003
# Posted on: 17-Jan-2020 10:36:01   

While looking into why that remark was there in the first place, I ran into: https://bertwagner.com/2017/10/10/how-nolock-will-block-your-queries/

So nolock isn't without locks. It therefore depends on what the query is doing, and when. We'll still remove the wrong remark tho simple_smile

Frans Bouma | Lead developer LLBLGen Pro