Improvements to IN
Dmitry Yemanov
Processing of IN <list>
predicates is now linear rather than recursive, thus no runtime stack limitations.The limit of 1500 items has been raised to 65535 items.
Lists that are known to be constant are pre-evaluated as invariants and cached as a binary search tree, making comparisons faster if the condition needs to be tested for many rows or if the value list is long.
If the list is very long or if the IN
predicate is not selective, the index scan supports searching groups using the sibling pointer (i.e. horizontally) rather than searching every group from the root (i.e. vertically), thus utilizing a single index scan for the whole IN
list.