How do I find which compression format a table and column within duckdb is using?
pragma_storage_info(‘tablename’) returns meta data on the compression for a selected table. e.g.
PIVOT (SELECT row_group_id, column_name, column_id, segment_type,compression,sum(count) AS c
FROM pragma_storage_info('stocks') WHERE segment_type != 'VALIDITY' GROUP BY ALL)
ON compression USING sum(c) AS c GROUP BY column_name,segment_type ORDER BY column_name,segment_type;
Will pivot the compression etc. out to allow easier viewing like so:
column_name segment_type ALP_c BitPacking_c Dictionary_c
close DOUBLE 34182458
date DATE 34182458
high DOUBLE 34182458
low DOUBLE 34182458
open DOUBLE 34182458
pre VARCHAR 34182458
sym VARCHAR 34182458
volume BIGINT 34182458