Skip to content

Implement SYSTEM UNLOAD PRIMARY KEY #60643

@nikitamikhaylov

Description

@nikitamikhaylov

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?

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions