代码如下
import redis
dd = redis.ConnectionPool(max_connections=100, socket_keepalive=True)
aa = redis.Redis(connection_pool=dd)
import time
temps = 'ksljdfldksjfklsldkfjkdsjflkdsjflkdsklskdjfljewl'
for i in range(1, 100000):
aa.set(temps+str(i), temps)
这段代码运行完,花了七秒多?一定是我姿势不对,不应该这么慢啊