【 TiDB 使用环境】生产环境
【 TiDB 版本】7.1.0
【复现路径】做过哪些操作出现的问题
通过navciat将oracle190万(150mb)的数据进行数据传输到tidb,运行一会就报内存不够,修改参数,我把内存调整了到100GB任然报错,win服务器,内存128GB,设置了tidb_mem_quota_query = 100,如何让tidb能不报错,在该机器上我也安装了mysql,传输到mysql,传输到oracle都挺正常的,朝tidb导入就报错,使用tidb最大的感受就是容易报错,tidb能不能配置成像oracle那样不经常报错的?
具体错误就是:
Your query has been cancelled due to exceeding the allowed memory limit for a single SQL query. Please try narrowing your query scope or increase the tidb_mem_quota_query limit
MySQL [cctest1]> select * from sbtest1 join sbtest2; ERROR 1105 (HY000): probeWorker[2] meets error: Your query has been cancelled due to exceeding the allowed memory limit for a single SQL query. Please try narrowing your query scope or increase the tidb_mem_quota_query limit and try again.[conn=7537998832357871515]
等待一段时间后 SQL 超出了 tidb_mem_quota_query 的限制被终止
2.创建一个资源组分很小的 RU
CREATE RESOURCE GROUP IF NOT EXISTS cc3 RU_PER_SEC = 1;
3.创建 SQL Binding
CREATE GLOBAL BINDING FOR SELECT * FROM sbtest1,sbtest2 USING SELECT /*+ RESOURCE_GROUP(cc3) */ * FROM sbtest1,sbtest2;
4.新建 SESSION 执行 SQL
MySQL [cctest1]> select * from sbtest1,sbtest2; ERROR 8252 (HY000): Exceeded resource group quota limitation