【 TiDB 使用环境】
tidb 5.1.1
【问题】 分区表 tiflash mpp不生效
如果想要 TiDB 忽略优化器的代价估算,强制使用 MPP,可以通过如下语句来设置:
set @@session.tidb_allow_mpp=1;
set @@session.tidb_enforce_mpp=1;
https://docs.pingcap.com/zh/tidb/stable/use-tiflash#控制是否选择-mpp-模式
想先确认一个信息,根据执行计划看,没有出现 PartitionUnion 算子,是否意味着该 query 是对某一个分区的查询?
所以这边的疑惑是,这个查询没有走到 TiFlash 对吧?
如果以上答案都是“是”,可以先检查一下动态裁剪模式是否开启(默认关闭),方法参考:https://docs.pingcap.com/zh/tidb/stable/partitioned-table#动态裁剪模式
TiFlash MPP 目前只支持了动态裁剪模式使用分区表,对于静态裁剪模式就不会走到 TiFlash MPP。可以尝试打开上面的开关,再看是否能够走 TiFlash。
谢谢。
设置了这两个 ,执行计划还是没有用到MPP
set @@session.tidb_allow_mpp=1;
set @@session.tidb_enforce_mpp=1;
信息如下:
[2021/08/16 14:03:41.416 +08:00] [ERROR] [adapter.go:142] [“execute sql panic”] [conn=255023] [sql=“EXPLAIN SELECT\
agent_creative_id,\
agent_material_id,\
adcreative_name,\
ad_id,\
account_id,\
account_name,\
ad_name,\
project_name,\
project_id,\
product_id,\
product_name,\
customer_id,\
customer_name,\
agent_material_type,\
agent_material_status,\
agent_material_count,\
start_time,\
end_time,\
DATE,\
HOUR,\
SUM(cost) AS cost,\
SUM(impression) AS impression,\
SUM(click) AS click,\
SUM(conversions_count) AS conversions_count,\
SUM(video_play_count) AS video_play_count,\
SUM(video_outer_play_count) AS video_outer_play_count,\
SUM(video_outer_play100_count) AS video_outer_play100_count,\
SUM(video_outer_play_time_count) AS video_outer_play_time_count\
FROM\
(\
SELECT\
a.agent_creative_id AS agent_creative_id,\
a.agent_material_id AS agent_material_id,\
a.creative_title AS adcreative_name,\
a.ad_id,\
a.advertiser_id AS account_id,\
a.NAME AS account_name,\
a.ad_name,\
a.project_name,\
a.project_id,\
a.product_id,\
a.product_name,\
a.customer_id,\
a.customer_name,\
a.agent_material_type AS agent_material_type,\
a.agent_material_status AS agent_material_status,\
a.agent_material_count AS agent_material_count,\
a.start_time AS start_time,\
a.end_time AS end_time,\
b.date,\
b.HOUR,\
b.cost / a.agent_material_count AS cost,\
b.view_count / a.agent_material_count AS impression,\
b.valid_click_count / a.agent_material_count AS click,\
b.ctr,\
b.conversions_count / a.agent_material_count AS conversions_count,\
b.conversions_rate,\
b.conversions_cost,\
b.video_play_count,\
b.video_outer_play_count,\
b.video_outer_play100_count,\
b.video_outer_play_time_count,\
b.video_outer_play100_count / video_outer_play_count AS video_play_over_rate\
FROM\
(\
SELECT\
cmag.agent_creative_id AS agent_creative_id,\
cmag.agent_material_id AS agent_material_id,\
sga.ad_id,\
ga.advertiser_id,\
ga.name
,\
sga.ad_name,\
ep.project_name,\
ep.project_id,\
pd.id AS product_id,\
pd.product_name,\
cmag.agent_material_type AS agent_material_type,\
cmag.agent_material_status AS agent_material_status,\
cag.agent_material_count AS agent_material_count,\
cag.start_time AS start_time,\
cag.end_time AS end_time,\
yfc.id AS customer_id,\
yfc.customer_short_name AS customer_name,\
sgc.creative_title\
FROM\
creative_material_agent_tt cmag\
LEFT JOIN creative_agent_tt cag ON cmag.agent_creative_id = cag.agent_creative_id\
LEFT JOIN synads_tt_creative sgc ON cag.agent_creative_id = sgc.creative_id\
LEFT JOIN synads_tt_ad sga ON sgc.ad_id = sga.ad_id\
LEFT JOIN tt_advertiser ga ON sga.advertiser_id = ga.advertiser_id\
LEFT JOIN emarbox_project ep ON ga.project_id = ep.project_id\
LEFT JOIN yxt_finance_customer_entity yfce ON ep.pig_advertiser_id = yfce.id\
LEFT JOIN yxt_finance_customer yfc ON yfce.customer_id = yfc.id\
LEFT JOIN product pd ON pd.id = ep.product_id\
GROUP BY\
cmag.agent_creative_id\
) a\
LEFT JOIN (\
SELECT\
creative_id,\
DATE,\
HOUR,\
SUM(cost) AS cost,\
SUM(ttshow) AS view_count,\
SUM(click) AS valid_click_count,\
SUM(click) / SUM(ttshow) AS ctr,\
SUM(ttconvert) AS conversions_count,\
SUM(ttconvert) / SUM(click) AS conversions_rate,\
SUM(cost) / SUM(ttconvert) AS conversions_cost,\
SUM(total_play) AS video_play_count,\
SUM(valid_play) AS video_outer_play_count,\
SUM(play_100_feed_break) AS video_outer_play100_count,\
AVG(average_play_time_per_play) AS video_outer_play_time_count\
FROM\
synrpt_tt_creative\
WHERE\
DATE = ‘2021-08-12’\
AND HOUR = 11\
GROUP BY\
creative_id,\
HOUR\
) b ON a.agent_creative_id = b.creative_id\
WHERE\
1 = 1\
AND b.cost IS NOT NULL\
) t\
GROUP BY\
agent_material_id,\
account_id,\
HOUR”] [stack=“github.com/pingcap/tidb/executor.(*recordSet).Next.func1\
\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/executor/adapter.go:142\
runtime.gopanic\
\t/usr/local/go/src/runtime/panic.go:965\
runtime.goPanicIndex\
\t/usr/local/go/src/runtime/panic.go:88\ngithub.com/pingcap/tidb/planner/core.makeRangeColumnPruner\
\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/planner/core/rule_partition_processor.go:1459\
github.com/pingcap/tidb/planner/core.(*partitionProcessor).pruneRangeColumnsPartition\
\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/planner/core/rule_partition_processor.go:1440\ngithub.com/pingcap/tidb/planner/core.(*partitionProcessor).pruneRangePartition\
\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/planner/core/rule_partition_processor.go:808\ngithub.com/pingcap/tidb/planner/core.PartitionPruning\
\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/planner/core/partition_prune.go:40\
github.com/pingcap/tidb/planner/core.partitionAccessObject\
\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/planner/core/explain.go:321\
github.com/pingcap/tidb/planner/core.(*PhysicalTableReader).accessObject\
\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/planner/core/explain.go:316\ngithub.com/pingcap/tidb/planner/core.(*Explain).getOperatorInfo\
\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/planner/core/common_plans.go:1336\ngithub.com/pingcap/tidb/planner/core.(*Explain).prepareOperatorInfo\
\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/planner/core/common_plans.go:1293\ngithub.com/pingcap/tidb/planner/core.(*Explain).explainPlanInRowFormat\
\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/planner/core/common_plans.go:1138\ngithub.com/pingcap/tidb/planner/core.(*Explain).explainPlanInRowFormat\
\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/planner/core/common_plans.go:1185\ngithub.com/pingcap/tidb/planner/core.(*Explain).explainPlanInRowFormat\
\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/planner/core/common_plans.go:1185\ngithub.com/pingcap/tidb/planner/core.(*Explain).explainPlanInRowFormat\
\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/planner/core/common_plans.go:1185\ngithub.com/pingcap/tidb/planner/core.(*Explain).explainPlanInRowFormat\
\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/planner/core/common_plans.go:1185\ngithub.com/pingcap/tidb/planner/core.(*Explain).explainPlanInRowFormat\
\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/planner/core/common_plans.go:1185\ngithub.com/pingcap/tidb/planner/core.(*Explain).explainPlanInRowFormat\
\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/planner/core/common_plans.go:1185\ngithub.com/pingcap/tidb/planner/core.(*Explain).explainPlanInRowFormat\
\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/planner/core/common_plans.go:1185\ngithub.com/pingcap/tidb/planner/core.(*Explain).explainPlanInRowFormat\
\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/planner/core/common_plans.go:1185\ngithub.com/pingcap/tidb/planner/core.(*Explain).explainPlanInRowFormat\
\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/planner/core/common_plans.go:1185\ngithub.com/pingcap/tidb/planner/core.(*Explain).explainPlanInRowFormat\
\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/planner/core/common_plans.go:1185\ngithub.com/pingcap/tidb/planner/core.(*Explain).explainPlanInRowFormat\
\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/planner/core/common_plans.go:1185\ngithub.com/pingcap/tidb/planner/core.(*Explain).explainPlanInRowFormat\
\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/planner/core/common_plans.go:1185\ngithub.com/pingcap/tidb/planner/core.(*Explain).RenderResult\
\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/planner/core/common_plans.go:1093\ngithub.com/pingcap/tidb/executor.(*ExplainExec).generateExplainInfo\
\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/executor/explain.go:103\ngithub.com/pingcap/tidb/executor.(*ExplainExec).Next\
\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/executor/explain.go:54\ngithub.com/pingcap/tidb/executor.Next\
\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/executor/executor.go:286\
github.com/pingcap/tidb/executor.(*recordSet).Next\
\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/executor/adapter.go:145\ngithub.com/pingcap/tidb/server.(*tidbResultSet).Next\
\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/server/driver_tidb.go:304\ngithub.com/pingcap/tidb/server.(*clientConn).writeChunks\
\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/server/conn.go:1875\ngithub.com/pingcap/tidb/server.(*clientConn).writeResultset\
\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/server/conn.go:1823\ngithub.com/pingcap/tidb/server.(*clientConn).handleStmt\
\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/server/conn.go:1717\ngithub.com/pingcap/tidb/server.(*clientConn).handleQuery\
\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/server/conn.go:1563\ngithub.com/pingcap/tidb/server.(*clientConn).dispatch\
\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/server/conn.go:1097\ngithub.com/pingcap/tidb/server.(*clientConn).Run\
\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/server/conn.go:860\ngithub.com/pingcap/tidb/server.(*Server).onConn\
\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/server/server.go:485”]
[2021/08/16 14:03:41.419 +08:00] [INFO] [conn.go:877] [“command dispatched failed”] [conn=255023] [connInfo=“id:255023, addr:xxx.xxx.xxx.xxx:64354 status:10, collation:utf8_general_ci, user:root”] [command=Query] [status=“inTxn:0, autocommit:1”] [sql=“EXPLAIN SELECT\
agent_creative_id,\
agent_material_id,\
adcreative_name,\
ad_id,\
account_id,\
account_name,\
ad_name,\
project_name,\
project_id,\
product_id,\
product_name,\
customer_id,\
customer_name,\
agent_material_type,\
agent_material_status,\
agent_material_count,\
start_time,\
end_time,\
DATE,\
HOUR,\
SUM(cost) AS cost,\
SUM(impression) AS impression,\
SUM(click) AS click,\
SUM(conversions_count) AS conversions_count,\
SUM(video_play_count) AS video_play_count,\
SUM(video_outer_play_count) AS video_outer_play_count,\
SUM(video_outer_play100_count) AS video_outer_play100_count,\
SUM(video_outer_play_time_count) AS video_outer_play_time_count\
FROM\
(\
SELECT\
a.agent_creative_id AS agent_creative_id,\
a.agent_material_id AS agent_material_id,\
a.creative_title AS adcreative_name,\
a.ad_id,\
a.advertiser_id AS account_id,\
a.NAME AS account_name,\
a.ad_name,\
a.project_name,\
a.project_id,\
a.product_id,\
a.product_name,\
a.customer_id,\
a.customer_name,\
a.agent_material_type AS agent_material_type,\
a.agent_material_status AS agent_material_status,\
a.agent_material_count AS agent_material_count,\
a.start_time AS start_time,\
a.end_time AS end_time,\
b.date,\
b.HOUR,\
b.cost / a.agent_material_count AS cost,\
b.view_count / a.agent_material_count AS impression,\
b.valid_click_count / a.agent_material_count AS click,\
b.ctr,\
b.conversions_count / a.agent_material_count AS conversions_count,\
b.conversions_rate,\
b.conversions_cost,\
b.video_play_count,\
b.video_outer_play_count,\
b.video_outer_play100_count,\
b.video_outer_play_time_count,\
b.video_outer_play100_count / video_outer_play_count AS video_play_over_rate\
FROM\
(\
SELECT\
cmag.agent_creative_id AS agent_creative_id,\
cmag.agent_material_id AS agent_material_id,\
sga.ad_id,\
ga.advertiser_id,\
ga.name
,\
sga.ad_name,\
ep.project_name,\
ep.project_id,\
pd.id AS product_id,\
pd.product_name,\
cmag.agent_material_type AS agent_material_type,\
cmag.agent_material_status AS agent_material_status,\
cag.agent_material_count AS agent_material_count,\
cag.start_time AS start_time,\
cag.end_time AS end_time,\
yfc.id AS customer_id,\
yfc.customer_short_name AS customer_name,\
sgc.creative_title\
FROM\
creative_material_agent_tt cmag\
LEFT JOIN creative_agent_tt cag ON cmag.agent_creative_id = cag.agent_creative_id\
LEFT JOIN synads_tt_creative sgc ON cag.agent_creative_id = sgc.creative_id\
LEFT JOIN synads_tt_ad sga ON sgc.ad_id = sga.ad_id\
LEFT JOIN tt_advertiser ga ON sga.advertiser_id = ga.advertiser_id\
LEFT JOIN emarbox_project ep ON ga.project_id = ep.project_id\
LEFT JOIN yxt_finance_customer_entity yfce ON ep.pig_advertiser_id = yfce.id\
LEFT JOIN yxt_finance_customer yfc ON yfce.customer_id = yfc.id\
LEFT JOIN product pd ON pd.id = ep.product_id\
GROUP BY\
cmag.agent_creative_id\
) a\
LEFT JOIN (\
SELECT\
creative_id,\
DATE,\
HOUR,\
SUM(cost) AS cost,\
SUM(ttshow) AS view_count,\
SUM(click) AS valid_click_count,\
SUM(click) / SUM(ttshow) AS ctr,\
SUM(ttconvert) AS conversions_count,\
SUM(ttconvert) / SUM(click) AS conversions_rate,\
SUM(cost) / SUM(ttconvert) AS conversions_cost,\
SUM(total_play) AS video_play_count,\
SUM(valid_play) AS video_outer_play_count,\
SUM(play_100_feed_break) AS video_outer_play100_count,\
AVG(average_play_time_per_play) AS video_outer_play_time_count\
FROM\
synrpt_tt_creative\
WHERE\
DATE = ‘2021-08-12’\
AND HOUR = 11\
GROUP BY\
creative_id,\
HOUR\
(len: 4246)”] [txn_mode=PESSIMISTIC] [err=“runtime error: index out of range [-1]\ngithub.com/pingcap/tidb/executor.(*recordSet).Next.func1\
\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/executor/adapter.go:141\
runtime.gopanic\
\t/usr/local/go/src/runtime/panic.go:965\
runtime.goPanicIndex\
\t/usr/local/go/src/runtime/panic.go:88\ngithub.com/pingcap/tidb/planner/core.makeRangeColumnPruner\
\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/planner/core/rule_partition_processor.go:1459\
github.com/pingcap/tidb/planner/core.(*partitionProcessor).pruneRangeColumnsPartition\
\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/planner/core/rule_partition_processor.go:1440\ngithub.com/pingcap/tidb/planner/core.(*partitionProcessor).pruneRangePartition\
\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/planner/core/rule_partition_processor.go:808\ngithub.com/pingcap/tidb/planner/core.PartitionPruning\
\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/planner/core/partition_prune.go:40\
github.com/pingcap/tidb/planner/core.partitionAccessObject\
\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/planner/core/explain.go:321\
github.com/pingcap/tidb/planner/core.(*PhysicalTableReader).accessObject\
\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/planner/core/explain.go:316\ngithub.com/pingcap/tidb/planner/core.(*Explain).getOperatorInfo\
\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/planner/core/common_plans.go:1336\ngithub.com/pingcap/tidb/planner/core.(*Explain).prepareOperatorInfo\
\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/planner/core/common_plans.go:1293\ngithub.com/pingcap/tidb/planner/core.(*Explain).explainPlanInRowFormat\
\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/planner/core/common_plans.go:1138\ngithub.com/pingcap/tidb/planner/core.(*Explain).explainPlanInRowFormat\
\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/planner/core/common_plans.go:1185\ngithub.com/pingcap/tidb/planner/core.(*Explain).explainPlanInRowFormat\
\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/planner/core/common_plans.go:1185\ngithub.com/pingcap/tidb/planner/core.(*Explain).explainPlanInRowFormat\
\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/planner/core/common_plans.go:1185\ngithub.com/pingcap/tidb/planner/core.(*Explain).explainPlanInRowFormat\
\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/planner/core/common_plans.go:1185\ngithub.com/pingcap/tidb/planner/core.(*Explain).explainPlanInRowFormat\
\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/planner/core/common_plans.go:1185\ngithub.com/pingcap/tidb/planner/core.(*Explain).explainPlanInRowFormat\
\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/planner/core/common_plans.go:1185\ngithub.com/pingcap/tidb/planner/core.(*Explain).explainPlanInRowFormat\
\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/planner/core/common_plans.go:1185\ngithub.com/pingcap/tidb/planner/core.(*Explain).explainPlanInRowFormat\
\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/planner/core/common_plans.go:1185\ngithub.com/pingcap/tidb/planner/core.(*Explain).explainPlanInRowFormat\
\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/planner/core/common_plans.go:1185\ngithub.com/pingcap/tidb/planner/core.(*Explain).explainPlanInRowFormat\
\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/planner/core/common_plans.go:1185\ngithub.com/pingcap/tidb/planner/core.(*Explain).explainPlanInRowFormat\
\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/planner/core/common_plans.go:1185\ngithub.com/pingcap/tidb/planner/core.(*Explain).explainPlanInRowFormat\
\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/planner/core/common_plans.go:1185\ngithub.com/pingcap/tidb/planner/core.(*Explain).RenderResult\
\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/planner/core/common_plans.go:1093\ngithub.com/pingcap/tidb/executor.(*ExplainExec).generateExplainInfo\
\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/executor/explain.go:103\ngithub.com/pingcap/tidb/executor.(*ExplainExec).Next\
\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/executor/explain.go:54\ngithub.com/pingcap/tidb/executor.Next\
\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/executor/executor.go:286\
github.com/pingcap/tidb/executor.(*recordSet).Next\
\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/executor/adapter.go:145\ngithub.com/pingcap/tidb/server.(*tidbResultSet).Next\
\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/server/driver_tidb.go:304\ngithub.com/pingcap/tidb/server.(*clientConn).writeChunks\
\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/server/conn.go:1875\ngithub.com/pingcap/tidb/server.(*clientConn).writeResultset\
\t/home/jenkins/agent/workspace/optimization-build-tidb-linux-amd/go/src/github.com/pingcap/tidb/server/conn.go:1823”]
[2021/08/16 14:03:45.187 +08:00] [WARN] [pd.go:131] [“get timestamp too slow”] [“cost time”=176.688348ms]预格式化文本
多谢,分析中,有进展会尽快同步。
不好意思回复慢了,分析了一下栈信息,基本确认是分区裁剪的问题,要彻底定位和修复需要复现一下,才能比较好进一步分析;能否提供一下这几个表的 schema 信息,我这边好本地复现一下;
@foxchan @yilong
@foxchan 不好意思回复晚了,已经确认是 MPP + dynamic-mode 的兼容性问题,先建了个 issue 记录:https://github.com/pingcap/tidb/issues/27674 (数据已经脱敏);
预计在这个开发周期(9-10 月)修复;
好的,感谢回复
此话题已在最后回复的 1 分钟后被自动关闭。不再允许新回复。