溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊(cè)×
其他方式登錄
點(diǎn)擊 登錄注冊(cè) 即表示同意《億速云用戶服務(wù)條款》

Redis批量導(dǎo)入文本數(shù)據(jù)

發(fā)布時(shí)間:2020-08-14 19:17:36 來(lái)源:ITPUB博客 閱讀:304 作者:feelpurple 欄目:關(guān)系型數(shù)據(jù)庫(kù)

  1. # 查看導(dǎo)入的文本文件,里面是具體的Redis命令
  2. # cat 20180208.txt
  3. hdel user.user.base 317986
  4. hdel user.user.base 371149
  5. hdel user.user.base 370964
  6. hdel user.user.base 371291
  7. hdel user.user.base 370906
  8. hdel user.user.base 371035
  9. hdel user.user.base 371086
  10. hdel user.user.base 371042
  11. hdel user.user.base 370838
  12. hdel user.user.base 371347
  13. hdel user.user.base 371065
  14. hdel user.user.base 371280
  15. hdel user.user.base 371307

  16. 在redis-cli客戶端工具中,有管道選項(xiàng)
  17. # redis-cli --help
  18. --pipe Transfer raw Redis protocol from stdin to server.

  19. 執(zhí)行數(shù)據(jù)導(dǎo)入
  20. # cat 20180208.txt | /usr/bin/redis-cli --pipe
  21. All data transferred. Waiting for the last reply...
  22. Last reply received from server.
  23. errors: 0, replies: 593

向AI問(wèn)一下細(xì)節(jié)

免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如果涉及侵權(quán)請(qǐng)聯(lián)系站長(zhǎng)郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。

AI