-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Implement SYSTEM UNLOAD PRIMARY KEY #60643
Copy link
Copy link
Closed
Labels
Description
Use case
After #60093 ClickHouse loads primary key for each data part lazily on request. This means that each SELECT query now has a side effect in a form of allocated memory for this key. And in case of executing full scan query the memory consumption of the whole server will increase and never decrease.
Describe the solution you'd like
Implement SYSTEM UNLOAD PRIMARY KEY command which will remove the primary key of each data part from memory. Additionally it would be nice to have a possibility to unload a primary key only from specified table.
Additional context
Maybe it is worth to implement and LRU/SLRU cache for primary key? Similar to mark cache?
Reactions are currently unavailable