select a.* from ods_new_big_warehouse a
where exists (select 1 from yibai_new_big_warehouse b where b.sku=a.sku and b.warehouse_code=a.warehouse_code);
該陳述句執行 2S
select a.* from ods_new_big_warehouse a
where not exists (select 1 from yibai_new_big_warehouse b where b.sku=a.sku and b.warehouse_code=a.warehouse_code);
該陳述句執行5分鐘都不行
兩表資料200W以下
請問各位大佬,這里面有什么優化技巧嗎?謝謝
uj5u.com熱心網友回復:
兩張表的建表陳述句 和 索引情況,都發一下。轉載請註明出處,本文鏈接:https://www.uj5u.com/shujuku/223104.html
標籤:高級技術
