Setting the IN List Join Metadata Range Limit
The inListJoinMaxMetadataRanges flag sets the largest number of ranges kept as metadata filters for a column of an
IN list whose distinct values outnumber inListJoinMaxMetadataFilters.
Rather than drop chunk skipping for a very long list, the compiler covers the column’s values with a small number of ranges, split at the widest gaps between them. The scan skips a chunk that falls between two of the ranges. Each range past the first costs two comparisons per chunk, so a higher value prunes more chunks at a higher cost per chunk.
The following describes the inListJoinMaxMetadataRanges flag:
Data type - int
Default value -
32Allowed values -
0or any positive integer
Setting the flag to 0 keeps no ranges, which turns off chunk skipping for a list past the per-value filter limit.
The flag may be set for the session:
SET inListJoinMaxMetadataRanges = 64;
For the three forms an IN list is compiled into, and where this flag applies among them, see
Compiling IN Lists.