Abstract
Traditional column-oriented storage formats rely on vertical compression techniques that analyze data within individual columns. While effective, these methods ignore the significant redundancy present across different columns in a schema. We present Corra, a novel compression framework that exploits horizontal correlations—relationships between distinct columns—to achieve superior storage efficiency. By utilizing diff-encoding, hierarchical mapping, and arithmetic logic, Corra achieves up to 85% additional storage savings over state-of-the-art vertical methods. While horizontal encoding introduces a potential fetch penalty for single-column queries, the overhead is negligible for multi-column analytical workloads.
1. Introduction
In modern data management, particularly within cloud-based data lakes like AWS S3, storage costs and data transfer speeds are primary bottlenecks. Current industry standards, such as Apache Parquet, utilize vertical compression schemes like Dictionary encoding, Run-Length Encoding (RLE), and Frame-of-Reference (FOR). These techniques are highly optimized but have reached a performance plateau because they treat each column as an isolated entity.
Corra breaks this plateau by "looking sideways." In many real-world datasets, columns are inherently correlated due to business logic or physical constraints. For instance, a zip_code is often functionally dependent on a city, and a total_amount is frequently the sum of various sub-fees. Corra exploits these relationships to encode data as offsets or indices relative to "reference" columns, significantly reducing the bit-width required for storage.
2. Encoding Strategies
Corra introduces three primary horizontal encoding schemes designed to capture different types of inter-column relationships:
2.1 Non-hierarchical Diff-encoding
This strategy is optimized for numerical and temporal data. In datasets like TPC-H, columns such as ship_date, commit_date, and receipt_date are often very close in value. Instead of storing each date as a full 64-bit integer, Corra designates one as a reference and stores the others as small deltas. These deltas can then be compressed using standard vertical techniques like FOR, requiring significantly fewer bits.
2.2 Hierarchical Encoding
For categorical data with many-to-one or one-to-one relationships (e.g., city and zip_code), Corra employs hierarchical encoding. It stores a mapping of unique values in the dependent column that correspond to each unique value in the reference column. The dependent column then stores a small index pointing into this localized list. This effectively creates a "per-row dictionary" that is much smaller than a global dictionary.
2.3 Multiple Reference Columns and Arithmetic Logic
Complex financial or scientific data often involves columns derived from multiple others. Corra can use multiple reference columns to reconstruct a target column. For example, if Total = Fee_A + Fee_B, Corra can store a 2-bit code per row to indicate which arithmetic rule applies, rather than storing the resulting sum. This treats the schema's inherent logic as the ultimate compression dictionary.
3. System Architecture
To implement these strategies effectively, Corra incorporates two critical components:
- Cost-Based Selection: Identifying the optimal set of correlations is a non-trivial optimization problem. Corra utilizes a greedy, cost-based strategy to construct a dependency graph, automatically selecting reference columns that maximize storage savings while considering the potential impact on query performance.
- Outlier Storage: Real-world data rarely follows rules perfectly. Corra handles "rule-breaking" rows through a dedicated outlier storage architecture. By offloading anomalies, the main encoding structures remain highly optimized for the majority of the data, allowing for more aggressive bit-packing.
4. Evaluation
The authors evaluated Corra across several benchmarks, including TPC-H, LDBC, and real-world datasets like New York State DMV records and NYC Taxi trip data.
4.1 Storage Savings
Corra demonstrated substantial improvements over single-column baselines. In the NYC Taxi dataset, it achieved an 85.16% reduction in the total_amount column by exploiting arithmetic correlations. On the TPC-H receiptdate column, it achieved a 58.3% saving compared to standard vertical encoding.
4.2 Query Performance
The primary trade-off in horizontal compression is the "fetch penalty." If a query targets only a diff-encoded column, the system must also fetch and decode the reference column, which can result in a latency increase of up to 1.66x. However, in typical analytical workloads where both columns are queried together, this overhead is eliminated, as the reference column would have been loaded regardless.
5. Conclusion
Corra represents a shift in compression philosophy, moving from sequence-based patterns to schema-based logic. By leveraging cross-column correlations and a robust outlier mechanism, it achieves storage densities previously unattainable by vertical-only methods. Future work includes exploring multi-level dependency chains and utilizing machine learning for more granular correlation detection.
Summary updated