文章詳情頁(yè)
mysql - 5w條數(shù)據(jù)的批量更新的sql
瀏覽:116日期:2022-06-16 15:31:23
問(wèn)題描述
有5W條數(shù)據(jù),把publishtime批量更新為publishtime_line的時(shí)間戳,該怎么做呢?腳本很容易死住。
問(wèn)題解答
回答1:謝邀,是把publishtime_line批量更新為publishtime的時(shí)間戳吧?UPDATE table SET publishtime_line=UNIX_TIMESTAMP(publishtime) 這條SQL卡死?
回答2:如果卡可以試試 limit UPDATE table SET publishtime_line=UNIX_TIMESTAMP(publishtime) limit 1000
相關(guān)文章:
1. python - vscode 如何在控制臺(tái)輸入2. 求救一下,用新版的phpstudy,數(shù)據(jù)庫(kù)過(guò)段時(shí)間會(huì)消失是什么情況?3. django - Python error: [Errno 99] Cannot assign requested address4. Python2中code.co_kwonlyargcount的等效寫法5. python小白 關(guān)于類里面的方法獲取變量失敗的問(wèn)題6. javascript - webpack1和webpack2有什么區(qū)別?7. java - 線上應(yīng)用,如果數(shù)據(jù)庫(kù)操作失敗的話應(yīng)該如何處理?8. python小白,關(guān)于函數(shù)問(wèn)題9. [python2]local variable referenced before assignment問(wèn)題10. angular.js - 百度支持_escaped_fragment_嗎?
排行榜

熱門標(biāo)簽