We use temporal tables in our database, and I have just run Brent Ozar's sp_BlitzIndex on it with @mode=0
(urgent issues only).
It has come up with 33 issues, all of which are "Abnormal Psychology: Compressed indexes", and they are all on the temporal tables e.g.
Schema.TableName.ix_IndexName (1). COMPRESSION: Partition 1 uses PAGE
[CX] [2 KEYS] SysEndTime {datetime2 8}, SysStartTime {datetime2 8}
I am pretty sure we didn't actively choose to turn compression on for these indexes, and I think it is the default behaviour for system generated history tables. But should I be worried? sp_BlitzIndex thinks I should be…
What are the recommended best practices? Thanks in advance.
Best Answer
This is default behaviour for temporal tables, the history tables are
PAGE
compressed by default. This is done out of space & performance considerations, compression will reduce the amount of data that has to be processed, both on disk & memory. This will have a trade-off in extra CPU cycles as SQL Server has to decompress the data. So unless you are under CPU pressure, compression is usually a good thing as your disk IO & memory usage improve.More information on temporal tables: Temporal Table Considerations and Limitations
For what sp_BlitzIndex page says about it:
So as stated above, this does not mean it is a problem. For the reasons described above.