oracle更新大量数据太慢,可以通过游标实现的例子
2024-09-21 02:04:36
declare cursor city_cur is
select t.new_customer_id,t.old_customer_id from
citsonline.crm_customer_tmp6 t
where t.new_customer_id!=t.old_customer_id
order by new_customer_id;
begin
for my_cur in city_cur loop
update platform.crm_service_customer_bak s
set s.customer_id=my_cur.new_customer_id
where s.customer_id=my_cur.old_customer_id;
/** 此处也可以单条/分批次提交,避免锁表情况 **/
if mod(city_cur%rowcount,1000)=0 then
dbms_output.put_line('----');
commit;
end if;
end loop;
commit;
end;
最新文章
- Qt中2D绘图问题总结(二)----------坐标系统
- iOS 简单提示view
- IOS第12天(1,UIViewController控制器的创建的 三种方式,和第一个view创建)
- 快速求n的质因子(数论)
- UVAlive3486_Cells
- jedis操作redis全指南
- RobotFramework 安装配置(二)
- DebugDiag收集Dump的使用说明
- 性能测试之Windows常见性能计数器
- 动态执行C#代码
- DES加密,Tk写的简单的GUI
- [C++]指针浅析
- 我从现象中学到的CSS
- LR-Controller 如何自定义显示虚拟用户状态
- 【第十六章】 springboot + OKhttp + String.format
- linux 线程的同步 一 (互斥量和信号量)
- series dataframe 的 idxmax()
- JS版的Server.UrlEncode
- 开源的PaaS方案:在OpenStack上部署CloudFoundry (一)简介
- MongoDB的win安装教程
热门文章
- Rest 参数(...)
- 【ssm】spring功能讲解
- MySQL6
- zend studio 12.5.1 window 安装并设置笔记
- Thunderbird and Gmail
- noip模拟赛 梦想
- Choose and divide
- 浅谈SQL Server 对于内存的管理--宋沄剑 英文名:CareySo
- Workspace in use or cannot be created, choose a different one.--错误解决的方法
- 用XMLRPC开服务进行server/client通信