Update优化建议

  • 【TiDB 版本】:4.0.0
  • 【问题描述】:600w行数据

update table set ID= value where id = oldID

总吞吐量为0.5 ,id没有加索引
一条sql执行时间平均2s

	TableReader_11 	root	30.74992880813537	data:Selection_10
└─Selection_10 	cop 	30.74992880813537	eq(test.xxx.id, "0e0e17bb2398cca35452a62dd9761834")
  └─TableScan_9	cop 	6814270          	table:xxx, keep order:false

请问有没有好的提速建议啊

:joy:添加索引,你都提到了没有索引,所以每次执行都需要扫描 600万的数据:rofl: