56,679
社区成员
发帖
与我相关
我的任务
分享
-- t3 2.8w数据
-- t2 2515条数据
-- t3 t2关联30w数据
-- t4 30w数据
-- 得到结果数据量是很少的
SELECT t3.nename,
t3.slotno,
t2.nelogicven,
t2.port,
t2.hoslot,
t2.loslot,
0,
1 status ,
1 createtype,
'system' creator ,
t3.createdate
FROM sdh_importfile_slotinfo_tmp t3
STRAIGHT_JOIN
sdh_importfile_slotdefine_list t2
WHERE t2.nelogicven = t2.nelogicven
AND t2.nelogicven = t3.nelogven
AND NOT EXISTS
(
SELECT 1 FROM sdh_cfg_h_neslotinfo t4
WHERE t3.nename = t4.nename
AND t3.slotno = t4.troughposi
AND t3.nelogven = t4.card
AND t2.port = t4.port
AND IFNULL(t2.hoslot,0) = IFNULL(t4.hoslot,0)
AND IFNULL(t2.loslot,0) = IFNULL(t4.loslot,0)
)