Skip to main content
Question

What is the difference between int delta encoding and int delta compression?

  • December 19, 2019
  • 2 replies
  • 10 views

chaima
Forum|alt.badge.img+2
  • Participating Frequently

Hi team,
Do you know what's the difference between int_delta encoding and int_delta compression?
I was doing a few tests and noticed that when a column (int) is encoded as AUTO, the compression type is delta_int and when it is encoded as deltaval it's uncompressed and encoded as delta_int.
what is the difference between the two?
For perfomance purposes only , does it make sense to encode a high cardinality sorted integer column as deltaval or is it better to leave as Auto?
Thank you
Chaima

2 replies

ChuckB
Forum|alt.badge.img
  • Participating Frequently
  • March 31, 2020

DELTAVAL computes the min/max over the block and then encodes everything as a delta off the min. The number of bits used per entry depends on l2(max-min). This allows random access, so it is an "encoding". DeltaIntPack compression builds the difference from one record to the next, so it is a compression, because you have to process all the prior records to get to the next one. This is better for increasing sequences than deltaval.


chaima
Forum|alt.badge.img+2
  • Author
  • Participating Frequently
  • April 1, 2020

Thanks a lot @ChuckB ! much appreciated :smiley: