We use clickhosue version 21.12.2.17 before.It works well

But we found that after upgrade to 22.3.3, the memory of clickhouse used grow up daily .

I don't know if this is a memory overflow

here is the promethues metric 'ClickHouseMetrics_MemoryTracking'  duration last 15days

![image](https://user-images.githubusercontent.com/8294900/163744096-80270f73-becd-47ce-91b7-c6a96f13c1b6.png)

and I restarted cknode1 at 4.14 ,you can see it come down and rising again.

And here is some sql and result I have run for diagnosis。

![image](https://user-images.githubusercontent.com/8294900/163744418-251c86d8-832c-4aff-aa1a-6e565d47d196.png)

![image](https://user-images.githubusercontent.com/8294900/163744455-73813554-784a-4df6-803e-5ef49dbf1776.png)

![image](https://user-images.githubusercontent.com/8294900/163744529-50c4e359-feb7-4499-9449-0efc1c75942f.png)

![image](https://user-images.githubusercontent.com/8294900/163744587-c51e3ba3-6925-4591-b15d-bb0e0262af8c.png)

we use dict and MaterializedView . no living view.

we have tried  'system drop mark cache '  and change 'max_bytes_before_external_group_by' to '6g'.Not work

Is there anyting else  I can do?





result_chain.addTableLock(materialized_view->lockForShare(context->getInitialQueryId(), context->getSettingsRef().lock_acquire_timeout));
            StoragePtr inner_table = materialized_view->getTargetTable();
            auto inner_table_id = inner_table->getStorageID();
            auto inner_metadata_snapshot = inner_table->getInMemoryMetadataPtr();
            query = dependent_metadata_snapshot->getSelectQuery().inner_query;
            target_name = inner_table_id.getFullTableName();
            
            auto header = InterpreterSelectQuery(query, select_context, SelectQueryOptions().analyze())
                .getSampleBlock();
            
            Names insert_columns;
            const auto & inner_table_columns = inner_metadata_snapshot->getColumns();
            for (const auto & column : header)
            {
                
                if (inner_table_columns.hasPhysical(column.name))
                    insert_columns.emplace_back(column.name);
            }
            InterpreterInsertQuery interpreter(nullptr, insert_context, false, false, false);
            out = interpreter.buildChain(inner_table, inner_metadata_snapshot, insert_columns, view_thread_status, view_counter_ms);
            out.addStorageHolder(dependent_table);
            out.addStorageHolder(inner_table);
        }
        else if (auto * live_view = dynamic_cast<StorageLiveView *>(dependent_table.get()))
        {
            runtime_stats->type = QueryViewsLogElement::ViewType::LIVE;
            query = live_view->getInnerQuery(); 
            out = buildPushingToViewsChain(
                dependent_table, dependent_metadata_snapshot, insert_context, ASTPtr(), true, view_thread_status, view_counter_ms, storage_header);
        }