question

Wilfred van Dijk avatar image
Wilfred van Dijk asked

traceflag 8755 not working anymore?

I am currently preparing a demo to measure the impact of the famous "with (nolock)" code. I created a simple database with 1 table containing an id (int, identity(1,1) primary key) and a name (varchar(50)) column. After I inserted some rows I updated a row with a BEGIN TRANSACTION, but without a COMMIT TRANSACTION. In a second connection I selected the updated row. As expected, it was waiting for the commit. With nolock returned the new data, as expected. However, if I enable traceflag 8755 before running the nolock query I am still getting uncommitted data so it looks like this traceflag is ignored. Tested this traceflag in this session and globally. I am using SQL2014 SP2 no other traceflags enabled. I can't find detailed information about this traceflag. So my questions are: 1. Is this traceflag ignored in recent versions? 2. Does anybody have some background information about this traceflag?
locking2014trace-flags
1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Wilfred van Dijk avatar image Wilfred van Dijk commented ·
Note: tested with traceflag 4199 also, but no difference
0 Likes 0 ·

1 Answer

·
jason_clark03 avatar image
jason_clark03 answered
Skip trivial plan optimization and force a full optimization see here: [ http://sqlmag.com/sql-server/investigating-trace-flags][1] [1]: http://sqlmag.com/sql-server/investigating-trace-flags
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.