2025-06-20

今天 遇到瞭個問題 update table1 t set t.column1 =0 where t.id in (select id from table2)

就是要更新的數據大概 有10W多條 然後 我執行瞭下 結果 2個小時瞭 還是沒 執行成功, 後來 問瞭個 厲害的小夥伴

他把sql 改成瞭 update table1 t ,table2 b set t.column1=0 where t.id=b.id

幾秒鐘就執行成功 !!! 特此記錄下來

發佈留言

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *