3 ms·
I am not very familiar with db internals, but I think RDBMs usually do page level compression.
by crypto5 10y ago
I am not very familiar with db internals, but I think RDBMs usually do page level compression.
- anarazel 10y agoThat's more an orthogonal angle. Row stores (what you usually want for oltp workloads) usually achieves a lot lower compression ratios than column stores (more useful for write once analytics use cases). If you think about it, that's not too surprising. Columns in a row will usually have largely independent values (cf normalization), thus a sequence is rows is harder to compress; in column stores all the values for a column follow each other, and quite often that allows for far higher compression ratios.
- pgaddict 10y agoThere are row stores (e.g. Oracle does that) that reorganize the page structure from row to column, usually achieving significantly better compression ratio without significant impact on OLTP performance.
- crypto5 10y agoI think it is your company who published good results of using compression with PostgreSQL on ZFS. Also column stores contain not just actual column values, e.g. if you look at cassandra, each SSTable value has key, timestamp, column name, and actual cell value, or the same data layout as 4 columns in row store. Still they strongly recommend to use compression.