redis 生成測試數據

redis cluster 只有 0號數據庫.

redis-cli debug

# redis-cli -c -h 192.168.56.88 -p 7000
127.0.0.1:7000> debug populate 10000

或者

# redis-cli -c -h 192.168.56.88 -p 7000 debug populate 10000

shell

# vi /tmp/test.sh

#!/bin/bash
for i in {1..10000}
do
  echo "key${i} ${i}"
  redis-cli -c -h 192.168.56.88 -p 7000 set key${i} ${i}
done

參考:
https://blog.csdn.net/babyfish13/article/details/52981110

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章