1

I've created a collection (in Java) with storage engine options where the block compressor should be zstd. How can I verify that .storageEngineOptions() worked as expected? Is it possible through mongosh?

Jonas Byström
  • 25,316
  • 23
  • 100
  • 147

1 Answers1

1

You can use the function db.collection.stats(). You will get a large output, we are interested in creationString key, which is a large string, something like this:

creationString: 'access_pattern_hint=none,allocation_size=4KB,app_metadata=(formatVersion=1),assert=(commit_timestamp=none,durable_timestamp=none,read_timestamp=none,write_timestamp=off),block_allocation=best,block_compressor=snappy 

The compression algorithm will be a part of this string.

Charchit Kapoor
  • 8,934
  • 2
  • 8
  • 24