5 ms·
TOAST means that individual cell/row needs to be extra-large to trigger compression. Compression can obviously save a lot of disk space, and also reduce IO tra
by crypto5 10y ago
TOAST means that individual cell/row needs to be extra-large to trigger compression.
Compression can obviously save a lot of disk space, and also reduce IO traffic which benefits performance.
> It neuters your ability to do a scan on disk
Sorry, I didn't understand why is this..
- Jweb_Guru 10y agoCompression is not really that useful except on large values or large numbers of values. Other than column stores, I don't think most storage engines actually compress the data (as opposed to indices) across rows (because it would slow down reads and writes dramatically) so there's really no point in compressing tiny strings. Page-level compression might be useful, I guess, depending on your use case.
- crypto5 10y ago> I don't think most storage engines actually compress the data Most major RDBMs (Oracle, MS SQL Server and even MySql) support page level compression. > because it would slow down reads and writes dramatically Not really, modern compression algorithms (e.g. zippy) have much faster decompression/compression speed than IO speed even for SSD drives, and having smaller IO traffic due to data compression can make actual performance higher with compression. Also you can fit more compressed data into FS cache, which again reduces IO traffic. > Page-level compression might be useful, I guess, depending on your use case. Sure, here are some examples: http://sqlblog.com/blogs/linchi_shea/archive/2008/05/11/sql-server-2008-page-compression-compression-ratios-from-real-world-databases.aspx http://sqlblog.com/blogs/linchi_shea/archive/2008/05/11/sql-... and http://sqlblog.com/blogs/linchi_shea/archive/2008/05/16/sql-server-2008-page-compression-performance-impact-on-table-scans.aspx http://sqlblog.com/blogs/linchi_shea/archive/2008/05/16/sql-...