快上网专注成都网站设计 成都网站制作 成都网站建设
成都网站建设公司服务热线:028-86922220

网站建设知识

十年网站开发经验 + 多家企业客户 + 靠谱的建站团队

量身定制 + 运营维护+专业推广+无忧售后,网站问题一站解决

Redis批量导入文本数据

  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


本文标题:Redis批量导入文本数据
本文链接:http://6mz.cn/article/gocpci.html

其他资讯