zoukankan      html  css  js  c++  java
  • redis

    docker 下配置 redis
    docker run --name redis01 -p 7479:6379 --net cfbnet -v /home/cfb/configproperties/redis/redis01/redis01-config:/etc/redis.conf -v /home/cfb/configproperties/redis/redis01/redis01-log:/data/redis/redis-log/redis.log -v /home/cfb/configproperties/redis/redis01/redis01-data:/data redis-server /etc/redis/redis.conf --appendonly yes redis --requirepass 123456

    **zunionstore ** 集合的并

    
    zunionstore  statistics:monthly:money:union 2 statistics:monthly:money:777888 statistics:monthly:money:777999
    
    alidoc:0>zrange statistics:monthly:money:union 0 -1 withscores
    1) "陕A1UYT3"
    2) 14
    3) "陕A1UYT4"
    4) 14
    5) "陕A1UYT2"
    6) 27
    7) "陕A1UYT0"
    8) 39
    9) "陕A1UYT1"
    10) 89
    alidoc:0>zrange statistics:monthly:money:777888 0 -1 withscores
    1) "陕A1UYT0"
    2) 0
    3) "陕A1UYT2"
    4) 0
    5) "陕A1UYT3"
    6) 0
    7) "陕A1UYT4"
    8) 0
    9) "陕A1UYT1"
    10) 25
    alidoc:0>zrange statistics:monthly:money:777999 0 -1 withscores
    1) "陕A1UYT3"
    2) 14
    3) "陕A1UYT4"
    4) 14
    5) "陕A1UYT2"
    6) 27
    7) "陕A1UYT0"
    8) 39
    9) "陕A1UYT1"
    10) 64
    

    能确定数据类型的,一定要声明其类型

    zset存储数据进行读取偶发异常,无效的值,开头不能是0。指定类型后,强制加上了双引号“”,导致查询的结果出来是双层双引号

  • 相关阅读:
    Python 元类
    Rsync 基础配置
    linux shell find
    找最大的目录
    云主机的上下行带宽
    关于c3p0 ResourcePoolException: Attempted to use a closed or broken resource pool
    recover_file
    MegaCli 监控raid状态
    influxdb
    在Ubuntu 16.04如何安装Java使用apt-get的
  • 原文地址:https://www.cnblogs.com/cfb513142804/p/13638192.html
Copyright © 2011-2022 走看看