After modifying the memory size, a single SQL query still exceeds 4G and reports an error

This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: 修改内存大小后,还是单条sql超过4G报错

| username: TiDBer_TVKpabeM

[TiDB Usage Environment] Production Environment / Testing / Poc
[TiDB Version]
[Reproduction Path] What operations were performed when the issue occurred
Modified configuration file tidb_mem_quota_query, etc.
[Encountered Issue: Problem Phenomenon and Impact]
Single SQL memory still cannot exceed 4G, server itself has 32G memory
[Resource Configuration] Go to TiDB Dashboard - Cluster Info - Hosts and take a screenshot of this page
[Attachments: Screenshots/Logs/Monitoring]


| username: tidb菜鸟一只 | Original post link

SHOW GLOBAL VARIABLES LIKE ‘%tidb_mem_quota_query%’;
Let’s see how much this variable is set to. If it’s small, increase it a bit.
SET GLOBAL tidb_mem_quota_query=4G;

| username: Fly-bird | Original post link

After setting it up, disconnect the session and then execute.

| username: Kongdom | Original post link

This is a system variable, not a configuration file.

It was changed after version v6.1.0.

| username: zhanggame1 | Original post link

The new version cannot be modified through the configuration file.

| username: 昵称想不起来了 | Original post link

系统变量 | PingCAP 文档中心 Preformatted text

| username: 像风一样的男子 | Original post link

Does your delete not execute in segments?

| username: Soysauce520 | Original post link

Changed to variables, check the size of the tidb_mem_quota_query variable and the transaction size of txn-total-size-limit, TiDB 配置文件描述 | PingCAP 文档中心