merge into仅使用insert和直接执行insert哪个效率高
我使用merge into仅使用insert功能,还有直接执行inset into ...where not exists哪个效率更高啊?和表里的数据大小有关系吗?
merge into tab_a
using (select a.col1,
a.col2,
a.col3
from tab_b) v
on (tab_a.id = v.col1)
when not matched then
insert
(id,
col12,
col13)
values
(a.col1,
a.col2
a.col3);