SQL 2016 - It Just Runs Faster: Column Store Uses Vector Instructions (SSE/AVX)
SQL Server's Column Store feature is designed to accommodate large amounts of data and associated compression capabilities. Microsoft studied numerous data layouts associated with column store and the CPU instructions required to process that data. Various algorithms have been optimized throughout the column store code base.
A specific, SQL Server 2016 enhancement is the use of vector based hardware capabilities. When compressing, building dictionaries and processing data a vectored design is leveraged. SQL Server 2016 detects the level of CPU support for the following extensions and when supported SQL Server 2016 takes full advantage of the hardware scalability and performance capabilities.
SQL Server uses the order of the following list to select the hardware extension.
- AVX 2 (Advanced Vector Extensions)
- SSE 4 (Streaming SIMD Extensions 4)
- AVX and SSE are not supported: Software based, using common CPU instruction set
'It Just Runs Faster' - SQL Server 2016 detects the CPU capabilities for AVX or SSE and leverages the hardware, based vector capabilities to improve scalability and performance.
Bob Dorr - Principal SQL Server Software Engineer
- Anonymous
June 10, 2016
Just to be clear for this feature, is there any difference in the SQL Server 2016 code path (or performance) between AVX2 and the older AVX instruction set? If you fall back to SSE4 on an older processor, is there any difference in the SQL Server 2016 code path (or performance) between SSE4.2, SSE4.1, SSE3, SSE2 or SSE?- Anonymous
June 21, 2016
No the current logic uses instructions available across the entire set, lowest common instruction set, if you will.
- Anonymous