If the Ola Hallengren index maintenance solution is installed onto a server which already has compression applied to several of the indexes, will the script respect the current compression level when rebuilding the corresponding index?

1 Answer 1


Yes - I don't see how Ola's script could possibly alter the existing compression level of an index.

If you look at the source for Ola's Index Maintenance, you will not see the word COMPRESSION anywhere. In order to alter the compression level, his script would actually have to have the word COMPRESSION in it.

  • But on alter with rebuild (which happens past a certain fragmentation threshold), unless you specify that you want to rebuild indexes with data compression, wouldn't that mean that the rebuild will create new uncompressed indexes? Jan 9, 2019 at 12:57
  • 1
    @Paul-SebastianManole - no, unless you specify a compression level, the existing compression level remains - you can easily verify this by running a test. Jan 9, 2019 at 13:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.