My table has the following data:
date | color
2012.11.06 | light green
2012.11.06 | light green <- in any single date color is the same
…
2012.11.06 | light green
2012.11.07 | green
2012.11.07 | green
…
2012.11.07 | green
There are two such columns. When I saved this partitioned table its columns had full length. Is it possible to save this two columns in the compressed form? For example, 10000 (cnt), 2 (enumeration, value for light green)
If the columns are of type symbol, they will automatically be enumerated using .Q.dpft for example. The unique values (say light-green, green) will be stored once in the sym file, and will be referenced by index from the relevant columns.
The columns must have full-length, otherwise you’d have a length error. But since you’d just be storing indices it’s not a problem.
See http://code.kx.com/wiki/Cookbook/SplayedTables#Enumeratingvarcharcolumnsinatable