大飞飞呀
大飞飞呀
V6
数据开发一名
2022-07-29 加入
获赞
2
回答
116
文章
0
    说明你这个表存在很多历史版本,还没有到gc时间,没有被回收,需要清理
    17 天前
    提交到服务端的就是上面这种带?号的, 如果加这个参数interpolateParams=true,提交到服务端的就不带问号了
    1 个月前
    一般不都是这么预编译吗 db.Queryx('where i_date in ( select max(I_DATE) I_DATE from dim_date_month_dmi where I_DATE >= ? and I_DATE < ? and i_date>=20250428 group by DATE_FORMAT(D_DATE, ‘%Y’) ) ', 20250331, 20250430)
    1 个月前
    嗯,int类型
    1 个月前
    int类型
    1 个月前
    这种也很快,就是不管用不用引号,只要是写死的,都很快,如果预编译就不行了 where i_date in ( select max(I_DATE) I_DATE from dim_date_month_dmi where I_DATE >= 20250331 and I_DATE < 20250430 and i_date>=20250428 …
    1 个月前
    你发的是在客户端已经替换了,我发的是?号的形式,提交到服务端,服务端来处理的
    1 个月前
    应该不是,估计是编译的问题
    1 个月前
    事实上这个SQL占用的内存并不大,为什么预先分配会这么大呢,肯定是BUG
    7 个月前
    预先分配内存为什么不够呢,是不是个BUG
    7 个月前
    对,我也遇到这个问题了,报错 Memory limit (total) exceeded caused by ‘out of memory quota for data computing’ : would use 246.95 GiB for data computing (attempt to allocate chunk of 1084000 bytes), limit of memory for data computing: 226.57 GiB,但是监控显示tiflash内存正常 [image] 而 cop task memory却显示内存用满
    7 个月前
    失败之后立马重试,又会成功了,这是为什么呢,而且观察tidb内存监控,也没啥变化 [image]
    7 个月前
    所以内存溢出是tidb溢出的?不应该呀
    7 个月前
    Projection_725, 250687847.21, root, , Column#277, Column#269, Column#270, Column#271, Column#272, Column#273, Column#274, Column#275, Column#276 └─Sort_65, 250687847.21, root, , Column#269, Column#637:desc └─Projection_726, 250687847.21, root, , Column#277, Column#269, Column#270, Column#271, Col…
    8 个月前
    本身使用的就是CTE, 加了MERGE()是为了内存不溢出,结果现在加上后还是偶尔溢出,但是加上后大多数时间执行挺快,占用内存不大 with table_a as (SELECT /+ READ_FROM_STORAGE(TIFLASH[a]) ,MERGE() /
    8 个月前
    table_a 被多次使用 with table_a as (SELECT /+ READ_FROM_STORAGE(TIFLASH[a]) ,MERGE()/
    8 个月前
    串行执行
    8 个月前
    explain analyze 执行计划 Projection_725, 250687847.21, 15788, root, , time:26s, loops:17, RU:0.000000, Concurrency:8, Column#277, Column#269, Column#270, Column#271, Column#272, Column#273, Column#274, Column#275, Column#276, 3.50 MB, N/A └─Sort_65, 250687847.21, 15788, root, , time:26s, loops:17, Colu…
    8 个月前