sinat_34881157 2016-11-25 07:06 采纳率: 1.6%
浏览 1935

mybatis存储过程中第二update执行速度很慢导致,最终在存储过程中没有执行,求解决方案

create procedure assignOrder(in userId BIGINT,in arrangBy BIGINT,in meg VARCHAR(1000),out count BIGINT)
begin

IF userId is not NULL and arrangBy is not NULL
THEN
UPDATE apply_flow as a set arrange_by = userId,remark=meg,response_by=userId where arrange_by=arrangBy
and id in( select b.id from apply_base b where a.id=b.id and b.status_no=1 );

update queue_resume_conversion set deal_by=userId where is_archive=1 and id in (
select conversion_id from apply_base base LEFT JOIN apply_flow flow on base.id=flow.id and base.status_no=1
where arrange_by=arrangBy);

set count=1;
ELSE
set count=0;
end IF;

SELECT count;
END

第二个update太慢的缘故还是,什么缘故,反正存储过程执行结果,但是第二个update没有任何效果

  • 写回答

1条回答 默认 最新

报告相同问题?

悬赏问题

  • ¥30 vmware exsi重置后登不上
  • ¥15 易盾点选的cb参数怎么解啊
  • ¥15 MATLAB运行显示错误,如何解决?
  • ¥15 c++头文件不能识别CDialog
  • ¥15 Excel发现不可读取的内容
  • ¥15 关于#stm32#的问题:CANOpen的PDO同步传输问题
  • ¥20 yolov5自定义Prune报错,如何解决?
  • ¥15 电磁场的matlab仿真
  • ¥15 mars2d在vue3中的引入问题
  • ¥50 h5唤醒支付宝并跳转至向小荷包转账界面