sp_BlitzIndex table view doesn't tell you about compression
Liar! Liar! Pants on fire!
It would be really nice if the output CREATE INDEX statement and/or a column in the grid included the data_compression_desc.
Compression information is complicated for partitioned tables (especially if different partitions are compressed differently)--but I think it would be OK to represent that complicated scenario with something like 'MIXED' or '?' (similar to what is done with ONLINE).
sp_BlitzIndex @Mode = 2 does have a column for Data Compression, and says page or row. If you're only doing manual analysis, does that work?
If not, can you describe what you're looking to solve when you run it? That'll help me figure out how to implement it.
My favorite magic incantation is to do something like this while troubleshooting/performance tuning/whatever: EXEC dbo.sp_BlitzIndex @DatabaseName = 'AM2', @TableName = 'AwesomeSauce'
I care about that one table because it's the one my query is touching. I want ALL the index info on that ONE table. Right now, I'm missing the data compression info.
Ideally, if I decide I need to modify an index, I'd love to be able to grab the Create TSQL, modify that, and run it with DROP_EXISTING...without accidentally removing compression (again).
Oh sure, how about we add a column for compression type in the index list? We already have that data available and it'd be easier to parse visually.
Tiny glass keyboard Typos flowing like rivers As winter snow thaws
On Jul 6, 2016, at 3:24 PM, amtwo [email protected] wrote:
My favorite magic incantation is to do something like this while troubleshooting/performance tuning/whatever: EXEC dbo.sp_BlitzIndex @DatabaseName = 'AM2', @TableName = 'AwesomeSauce'
I care about that one table because it's the one my query is touching. I want ALL the index info on that ONE table. Right now, I'm missing the data compression info.
Ideally, if I decide I need to modify an index, I'd love to be able to grab the Create TSQL, modify that, and run it with DROP_EXISTING...without accidentally removing compression (again).
— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.
That'd work.
@amtwo @BrentOzar
In the case of partitioning, we don't list out every partition for a specific table, and the results come back as a csv.

For non-partitioned tables, it comes back as a single value:

Does this work for you guys?
The CSV for partitioned tables is a bit hard to read/interpret--I'm thinking of the scenario where the current/active partition uses a different compression level than older/archive partitions.
Say there's one "NONE" and 16 "PAGE" ...From the CSV, it's not really clear which one is the odd-ball. From that regard, I wonder if it would be just as useful, but more legible to display as: "NONE, PAGE" or "NONE(1), PAGE(16)"
But I'm complaining about a corner case. The way you have it looks good enough.
The "Is Compressed?" column name seems wonky. Pedantic Andy would name the
column "Compression Level".
twitter: @amtwo blog: www.am2.co linkedin: www.linkedin.com/in/amtwo
I can get better presented information out, I think. Need to think about how. I can get things here pretty easily:

But for a bunch of partitions, that gets out of control pretty fast:

I know I can do better, just have to think about where to do that so I end up with something like
Partitions 1-N use X compression, Partitions N-N use X compression or something. Getting partition information is already pretty slow when you hit thousands of them.
Bam-a-lam

I like that! The output is only as complex as your compression-partitioning scheme.
I appreciate your careful & thoughtful use of singular/plural on the word "Partition". Bonus points on that.
Hahaha. Thanks. It always drives me nuts when that's not correct. If you want to test this out, the branch lives here: https://github.com/BrentOzarULTD/SQL-Server-First-Responder-Kit/tree/BlitzIndex_Erik_Issue_351
Out for testing in #373
Merged in with dev branch, but leaving it open in case anybody wants to test.