标签:date lan where upd null 为什么 HERE 方式 批处理
大概3109条数据方式一单条:
UPDATE new_loan_balance a
SET a.prdt_biz_ctgy = CASE
WHEN a.prdt_biz_ctgy = "01" THEN "对公贷款"
WHEN a.prdt_biz_ctgy = "02" THEN "对私贷款"
WHEN a.prdt_biz_ctgy = "41" THEN "贸易融资"
ELSE NULL
END;
方式二批处理:
update new_loan_balance a set a.prdt_biz_ctgy = ‘对公贷款‘ where a.prdt_biz_ctgy = ‘01‘;
update new_loan_balance a set a.prdt_biz_ctgy = ‘对私贷款‘ where a.prdt_biz_ctgy = ‘02‘;
update new_loan_balance a set a.prdt_biz_ctgy = ‘贸易融资‘ where a.prdt_biz_ctgy = ‘41‘;
为什么方式一非常慢(几小时), 方式二很快(几毫秒)
标签:date lan where upd null 为什么 HERE 方式 批处理
原文地址:https://blog.51cto.com/daxionglaiba/2408703