Missed It The First Time
This is documented, but I know a lot of people are allergic to documentation, whether it’s writing or reading.
In SQL Server 2019:
- Exciting stuff: In memory tempdb!
- Exciting stuff: sp_estimate_data_compression_savings can evaluate columnstore compression!
- Disappointing stuff: If you use in memory tempdb, you can’t have any columnstore anything in tempdb
That means if you’re using sneaky tricks like clustered columnstore indexes on temp tables to induce batch mode, you’re gonna get a lot of errors.
Likewise, you won’t be able to evaluate if columnstore will help your tables.
EXEC sp_estimate_data_compression_savings @schema_name = 'dbo', @object_name = 'Badges', @index_id = 1, @partition_number = 1, @data_compression = 'COLUMNSTORE';
Msg 11442, Level 16, State 1, Line 4
Columnstore index creation is not supported in tempdb when memory-optimized metadata mode is enabled.
There’s no workaround for this, either. You can’t tell it to use a different database, this is just the way it’s built.
Hopefully in the future, there will be more cooperation between these two features.
Thanks for reading!
Going Further
If this is the kind of SQL Server stuff you love learning about, you’ll love my training. I’m offering a 75% discount to my blog readers if you click from here. I’m also available for consulting if you just don’t have time for that and need to solve performance problems quickly.
Related Posts
- Batch Mode On Row Store vs Batch Mode Tricks For Performance Tuning SQL Server Queries
- Making The Most Of Temp Tables Part 4: Batch Mode
- No Column Store Indexes With In-Memory Tempdb For SQL Server? No Problem!
- Even If SQL Server Table Variables Were Always In Memory, It Wouldn’t Make Them Better Than Temp Tables
One thought on “SQL Server 2019 Disappointment: sp_estimate_data_compression_savings”
Comments are closed.