Assume that you have installed Microsoft SQL Server 2016 Service Pack 1 (SP1). When you use the SELECT TOP N statement with a very large N (tens or hundreds of thousands) to retrieve data from a columnstore index in batch mode, you get an access violation (AV) error.
The temporary workaround for this issue is to remove the keyword TOP from SELECT statement or enable Trace Flag - TF 9453 to disable batch mode.
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.
Article ID: 4016902 - Last Review: 2017, മേയ് 15 - Revision: 8