标签:
redis pipe 批量导入数据 速度非常快, 文本需要支持redis的协议, 使用Python生成文件 代码如下
delimiter = "\r\n"
data = "*3" + delimiter + "$3" + delimiter + "set" + delimiter + "$" + str(len(row[0])) + delimiter + row[0] + delimiter + "$" + str(len(row[1])) + delimiter + row[1] + delimiter + "\r\n"
/bin/cat pipefile | /usr/local/bin/redis-cli -h 10.10.1.110 -p 6412 --pipe
标签:
原文地址:http://blog.csdn.net/u012063703/article/details/44723617