Re: [SQL ]請問子查詢的效率

看板Database作者 (傳說中的果汁學長)時間13年前 (2012/10/17 16:35), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串2/4 (看更多)
照推文的建議 如果改成 insert into oocd_breast_cancer select oo.* from oo2002 oo, TEST where TEST.date between '20020101' and '20021231' and TEST.id =oo2002.id 這樣會不會比較快呢? 還請原po試看看囉~ ※ 引述《s9234140 (麻淑菸酒生)》之銘言: : 請問若我想新增多筆資料 子查詢為有JOIN的動作 : 但是動作過久 請問要怎麼血才能優化此查詢 感謝 : 語法如下 : insert into oocd_breast_cancer select * from oo2002 where id in : ( select TEST.id from TEST, oo2002 : where TEST.date : between 20020101 and 20021231 and TEST.id =oo2002.id) -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 60.251.147.41
文章代碼(AID): #1GVctED5 (Database)
文章代碼(AID): #1GVctED5 (Database)