SQL Server 2016 – Trace Flag 9453 – Disable Batch Mode Processing

Hello Friends,

In my previous blog post, we have seen the SQL Server 2016 Sort operator with batch mode processing. To compare the performance for Batch mode versus Row mode for Sort operator, I used a trace flag 9347 which disables the batch mode processing for sort operator. Now the question is: Is there any way to disable the batch mode processing for all the operators (not only for sort operator)? The answer is yes. You people are guessing correct, it’s another trace flag 9453. This trace flag will force the ColumnStore operations to use row mode processing. We can use this trace flag to check the performance impact of row mode processing versus batch mode processing.

Environment details: Here I am using SQL Server 2016 with CU-2. I have created a new database and table. Here the table is partitioned, and I have created a Clustered ColumnStore Index on that. Now let me execute a query that will perform a sort operation.

DBCC DROPCLEANBUFFERS();
GO
Select balance,name from xtPartitionTruncate (NOLOCK) 
WHERE ID<6600000 ORDER BY name
GO

SQL Server 2016 - Trace Flag 9453 - Disable Batch Mode Processing

From the above output, we can check that time taken is 35 seconds. By default, both operators are using batch mode execution. Let me show you the mode of the operators from the properties of operators (just bring the mouse over the operator).

SQL Server 2016 - Trace Flag 9453 - Disable Batch Mode Processing

From the above image you can see that both operators are using batch mode execution. Now we will use trace flag 9453 to force the row mode execution for these operators.

DBCC DROPCLEANBUFFERS();
GO
DBCC TRACEON(9453,1)
GO
Select id,balance,name from xtPartitionTruncate (NOLOCK) 
WHERE ID<6600000 ORDER BY name
GO
DBCC TRACEOFF(9453,1)
GO

SQL Server 2016 - Trace Flag 9453 - Disable Batch Mode Processing

SQL Server 2016 - Trace Flag 9453 - Disable Batch Mode Processing

HAPPY LEARNING!

Regards:
Prince Kumar Rastogi

Like us on FaceBook | Join the fastest growing SQL Server group on FaceBook

Follow Prince Rastogi on Twitter | Follow Prince Rastogi on FaceBook

Avatar

About Prince Rastogi

Prince Rastogi is working as Database Administrator at Elephant Insurance, Richmond. He is having more than 8 years of experience and worked in ERP Domain, Wealth Management Domain. Currently he is working in Insurance domain. In the starting of his career he was working on SQL Server, Internet Information Server and Visual Source Safe. He is post graduate in Computer Science. Prince is ITIL certified professional. Prince likes to explore technical things for Database World and Writing Blogs. He is Technical Editor and Blogger at SQLServerGeeks.com. He is a regular speaker at DataPlatformDay events in Delhi NCR. He has also presented some in depth sessions about SQL Server in SQL Server Conferences in Bangalore.

View all posts by Prince Rastogi →

Leave a Reply

Your email address will not be published. Required fields are marked *