HackerPapers

arXiv:1207.2189cs.DB

Reordering Rows for Better Compression: Beyond the Lexicographic Order

Daniel Lemire, Owen Kaser, Eduardo Gutarra

Early discovery. Linked by one identifiable commenter. This paper is outside the main ranking; a mention is not an endorsement.

Abstract

Sorting database tables before compressing them improves the compression rate. Can we do better than the lexicographical order? For minimizing the number of runs in a run-length encoding compression scheme, the best approaches to row-ordering are derived from traveling salesman heuristics, although there is a significant trade-off between running time and compression. A new heuristic, Multiple Lists, which is a variant on Nearest Neighbor that trades off compression for a major running-time speedup, is a good option for very large tables. However, for some compression schemes, it is more important to generate long runs rather than few runs. For this case, another novel heuristic, Vortex, is promising. We find that we can improve run-length encoding up to a factor of 3 whereas we can improve prefix coding by up to 80%: these gains are on top of the gains due to lexicographically sorting the table. We prove that the new row reordering is optimal (within 10%) at minimizing the runs of identical values within columns, in a few cases.

arXiv comments
to appear in ACM TODS
Journal reference
ACM Trans. Database Syst. 37, 3, Article 20 (September 2012)
DOI
doi:10.1145/2338626.2338627
Subjects
cs.DBDatabases

On Hacker News

Linked by 1 identifiable commenter in 1 comment across 1 thread, from Oct 2026 to Oct 2026.

Comments linking this paper, per year.

Discussed in comments1 thread

    • > does duckdb support querying custom storage formats? No, this is still parquet being loaded in. The "trick" is running through sort order combinations which result in maximum packing in a Dremel style data format (like Parquet). Here's the trick explained in enough detail to…

      gopalvView on HNParent context

Submitted to Hacker News

Connected through shared HN threads, not inferred similarity or a recommendation.