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.

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.

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