Question-: You are working as an administrator for the Cassandra database. Where the data modeling is done of the time series data. And you have decided to use the “DateTieredCompactionStrategy�. What all the benefits of having compaction with this strategy?
A. It helps in compacting SSTable based on time period. B. It helps in compacting SSTable based on size. C. With this you can have better disk usage D. Your read performance will also increase after compaction E. There is lesser RAM needed. F. You can have your data in only one data center
Answer: A,C,D,E
Explanation: In case of Time Series data, you should use the DateTieredCompactionStrategy. Because it can help to compact your data based on the Time period. Like compact data for every 4 hours. 4+4 hours, hence new SSTable could have 8 hours data in it. And also your tombstone data can be removed from SSTable of their gc grace period is already expired. And overall more disk space would be available for new data.
And most of the data is fond in the single SSTable then overall lesser overhead of seeking the data on the disk and memory. As well less memory is needed to store the lesser partition index etc. It has nothing to do with the Data center.
Admin only
Question-: Whenever compaction happens A. It always deletes the tombstone data B. It keeps the tombstone data upto 3 consecutive Compaction. So that read repair can happen. C. It would delete the tombstone data if gc grace period had expired. D. It deletes the tombstone data if it is older than 1hr
Answer: C
Explanation: Tombstone data are the data which is marked for deletion. And while compaction process those should be taken care. It depends in the parameter gc grace period whether to consider the tombstone data for deletion or not. If gc grace period which is by default 10 days. Has expired, it means tombstone records is older than 10 days, it would not be included in the new SSTable and would be discarded.
Admin only
Question-: When compaction happens, it picks the partition from the both the old SSTables and merge them, it is always the case that new partition segment in new SSTable bigger than both of the older partition segment. A. True B. False
Answer: B
Explanation: No we can not conclude that new partition segment would be bigger or smaller until and unless we know the data tombstone detail in these partition segments. If both the partition segments have lot of tombstone data and their gc grace period had expired then actually newly created partition segment would have smaller partition segment. If there is no tombstone and new inserts are happened then in this case new partition would be bigger than older one.