v.24.12New Feature
Add indexOfAssumeSorted Function to Optimize Search in Sorted Arrays
Add indexOfAssumeSorted function for array types. Optimizes the search in the case of a sorted in non-decreasing order array. The effect appears on very large arrays (over 100,000 elements). #72517 (Eric Kurbanov).Why it matters
This feature addresses the inefficiency of searching large sorted arrays by enabling a faster search method that leverages the sorted order. It significantly improves performance for very large arrays (over 100,000 elements) by reducing the search complexity.How to use it
Use theindexOfAssumeSorted function in your SQL queries on arrays that are sorted in non-decreasing order. For example:SELECT indexOfAssumeSorted(your_sorted_array, value_to_find) FROM your_table;