Skip to main content

Questions tagged [batch-mode]

SQL Server batch-mode execution processes plan operator data in 64KB chunks rather than a row at a time.

Filter by
Sorted by
Tagged with
1 vote
1 answer
102 views

Does Postgres have anything analogous to Microsoft SQL Server's Batch Mode?

In traditional usages of Microsoft SQL Server, exactly one row flows from one operator in a query plan to the next. In Batch Mode, huge performance gains are obtained by moving thousands of rows at a ...
J. Mini's user avatar
  • 855
2 votes
1 answer
132 views

Does Batch Mode only apply to Agg Functions on ColumnStore Index

Azure SQL Database - Standard Edition (S3 Service Tier) Why does Batch Mode only come into effect when using Aggregate Functions? DROP TABLE IF EXISTS dbo.TransCS CREATE TABLE dbo.TransCS ( ...
Geezer's user avatar
  • 513
12 votes
1 answer
286 views

Why does batch mode window aggregate yield arithmetic overflow?

The following query performs a windowed SUM over a columnstore table with 1500 total rows, each of which has the value 0 or 1, and it overflows the INT data type. Why is this happening? SELECT a, p, ...
Geoff Patterson's user avatar
12 votes
1 answer
772 views

How to make use of Batch Mode with an UNPIVOT (a loop join)?

I have a query of the following form: SELECT ... FROM ColumnstoreTable cs CROSS APPLY ( SELECT * FROM (VALUES ('A', cs.DataA) , ('B', cs.DataB) , ('C', cs.DataC) ) ...
boot4life's user avatar
  • 1,289
8 votes
2 answers
4k views

What do the HT* wait types mean? (HTREPARTITION, HTDELETE, ...)

A big query is running right now. The result of a batch mode hash join that spills to disk is streamed into a temp table using select into. The query is showing wait types HTDELETE and HTREPARTITION ...
usr's user avatar
  • 7,360
24 votes
1 answer
5k views

What exactly can SQL Server 2014 execute in batch mode?

When a columnstore index is being used in a query SQL Server is able to use batch mode. Documentation is thin on what can run in batch mode and what can't. Please look at the following (motivating) ...
usr's user avatar
  • 7,360