You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by GitBox <gi...@apache.org> on 2022/05/20 18:30:05 UTC

[GitHub] [pinot] suddendust opened a new issue, #8750: Disable Dictionaries for High Cardinality MV Fields

suddendust opened a new issue, #8750:
URL: https://github.com/apache/pinot/issues/8750

   We have two MV columns called `tags__KEYS` and `tags__VALUES` in one of our tables. They are very high cardinality columns. Here's some data from an existing segment:
   
   ```
   column.tags__VALUES.cardinality = 776088
   column.tags__VALUES.totalDocs = 4105983
   column.tags__VALUES.dataType = STRING
   column.tags__VALUES.bitsPerElement = 20
   column.tags__VALUES.lengthOfEachEntry = 512
   column.tags__VALUES.columnType = DIMENSION
   column.tags__VALUES.isSorted = false
   column.tags__VALUES.hasNullValue = false
   column.tags__VALUES.hasDictionary = true
   column.tags__VALUES.textIndexType = NONE
   column.tags__VALUES.hasInvertedIndex = true
   column.tags__VALUES.hasFSTIndex = false
   column.tags__VALUES.hasJsonIndex = false
   column.tags__VALUES.isSingleValues = false
   column.tags__VALUES.maxNumberOfMultiValues = 61
   column.tags__VALUES.totalNumberOfEntries = 35572346
   column.tags__VALUES.isAutoGenerated = false
   column.tags__VALUES.minValue =
   column.tags__VALUES.maxValue = {id}/reset
   column.tags__VALUES.defaultNullValue =
   ```
   
   AND
   
   ```
   tags__VALUES.dictionary.startOffset = 294056019
   tags__VALUES.dictionary.size = 397357064
   tags__VALUES.forward_index.startOffset = 691413083
   tags__VALUES.forward_index.size = 93441573
   ```
   
   For `tags__VALUES`, then dictionary size is ~ 397M. The total size of this segment is 813M, so the dict. itself is occupying around 49% of the size. This certainly doesn't look very optimal.
   
   Docs themselves [suggest](https://docs.pinot.apache.org/basics/indexing/forward-index#:~:text=On%20the%20other,for%20a%20column.) that dict. encoded forward indices are most helpful when the cardinality of the column is low. But this is certainly not the case her.
   
   Not sure if this'll violate any invariant on segments/indexes, but if we can turn of dict. compression for such MV columns, that'll be helpful.
   
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


[GitHub] [pinot] siddharthteotia commented on issue #8750: Disable Dictionaries for High Cardinality MV Fields

Posted by GitBox <gi...@apache.org>.
siddharthteotia commented on issue #8750:
URL: https://github.com/apache/pinot/issues/8750#issuecomment-1134955975

   Related issue - https://github.com/apache/pinot/issues/7870


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


[GitHub] [pinot] suddendust commented on issue #8750: Disable Dictionaries for High Cardinality MV Fields

Posted by GitBox <gi...@apache.org>.
suddendust commented on issue #8750:
URL: https://github.com/apache/pinot/issues/8750#issuecomment-1328616681

   @Jackie-Jiang So that'd be 8 + 4 * 776088 ~ 3M. Sounds good. Shall I create an issue for this? 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


[GitHub] [pinot] Jackie-Jiang commented on issue #8750: Disable Dictionaries for High Cardinality MV Fields

Posted by GitBox <gi...@apache.org>.
Jackie-Jiang commented on issue #8750:
URL: https://github.com/apache/pinot/issues/8750#issuecomment-1328330848

   For this column, the length of the values are quite skewed (from 20 to 512). The default string dictionary stores values with fixed length (shorter values are padded to be the same length), so the size of the dictionary is 8 (header) + 512 * 776088 = 397357064. Instead, we can store it using var-length dictionary, which has a 4 bytes overhead per entry, but avoid padding the values.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


[GitHub] [pinot] Jackie-Jiang commented on issue #8750: Disable Dictionaries for High Cardinality MV Fields

Posted by GitBox <gi...@apache.org>.
Jackie-Jiang commented on issue #8750:
URL: https://github.com/apache/pinot/issues/8750#issuecomment-1329878074

   It is already supported if you configure it as `varLengthDictionaryColumns`: https://docs.pinot.apache.org/configuration-reference/table#table-index-config
   Created #9865 to automatically use var-length dictionary


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org