温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

Redis批量导入文本数据

发布时间:2020-08-14 19:17:36 来源:ITPUB博客 阅读:224 作者:feelpurple 栏目:关系型数据库

  1. # 查看导入的文本文件,里面是具体的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客户端工具中,有管道选项
  17. # redis-cli --help
  18. --pipe Transfer raw Redis protocol from stdin to server.

  19. 执行数据导入
  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问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI