v.1.1.54362New Feature
Using Index of MergeTree Tables with IN on Primary Key Tuples
An index ofMergeTreetables is used whenINis applied to a tuple of expressions from the columns of the primary key. Example:WHERE (UserID, EventDate) IN ((123, '2000-01-01'), ...)(Anastasiya Tsarkova).
Why it matters
This feature improves query performance by allowing efficient use of primary key indexes when filtering tuples inIN conditions, enabling faster lookups and reduced query execution time.How to use it
Use aWHERE clause with IN applied to tuples of primary key columns, for example:sql<br>SELECT * FROM table WHERE (UserID, EventDate) IN ((123, '2000-01-01'), (456, '2001-02-02'))<br>ClickHouse will automatically utilize the primary key index for such queries on
MergeTree tables.