1 2 3 1
A set is similar to a list, but has the following differences:
- The size of the set is always known
- A set may not contain duplicates
1,2 2,1 3,1Notice that there are two number 1 values in the weighted list. In order to make insertions into such a list scalable, consider using partitioning to avoid large indexes.
Converting from lists to weighted lists (sets) may logically compress the data. Consider the following:
1, 10000000000000 2, 10 3, 1000 4, 100000Consider the size of the list that would be produced if this list was not weighted by count. There are very few compression methods which allow the data to be operated on without compression. Aggregate SQL queries can use the weighted list easily without decompression.
You will need to post-process the data to create a list from a weighted list.