# Overview
The process of throwing away duplicate keys to keep only the most recent key in append-only data, such as the [[Append-Only Log]]s used in [[Log Structured Merge (LSM) Trees]].
![[2024-11-18_Compaction.png]]
# Key Considerations
# Types of Compaction
| Topic | Description | Pros | Cons | Use Cases |
| -------------------------- | ------------------------------------ | -------------------------------- | -------------------------------- | ------------------------------------- |
| [[Size-tiered Compaction]] | ![[Size-tiered Compaction#Overview]] | ![[Size-tiered Compaction#Pros]] | ![[Size-tiered Compaction#Cons]] | ![[Size-tiered Compaction#Use Cases]] |
| [[Leveled Compaction]] | ![[Leveled Compaction#Overview]] | ![[Leveled Compaction#Pros]] | ![[Leveled Compaction#Cons]] | ![[Leveled Compaction#Use Cases]] |
# Pros
# Cons
# Use Cases
# Related Topics
[How Cassandra Stores Data: An Exploration of Log Structured Merge Trees | HackerNoon](https://hackernoon.com/how-cassandra-stores-data-an-exploration-of-log-structured-merge-trees)