本章节介绍引擎版本(版本号)为5.0的云数据库Redis版实例支持的命令,包括Redis 5.0标准版、Redis 5.0集群版、和Redis 5.0读写分离版。

支持的Redis命令

表 1. Redis命令支持表1
Keys(键) Strings(字符串) Hashes(哈希表) Lists(列表) Sets(集合) Sorted Sets(有序集合) Streams(流)
DEL APPEND HDEL BLPOP SADD ZADD XINFO
DUMP BITCOUNT HEXISTS BRPOP SCARD ZCARD XADD
EXISTS BITOP HGET BRPOPLPUSH SDIFF ZCOUNT XTRIM
EXPIRE BITPOS HGETALL LINDEX SDIFFSTORE ZINCRBY XDEL
EXPIREAT DECR HINCRBY LINSERT SINTER ZRANGE XRANGE
MOVE DECRBY HINCRBYFLOAT LLEN SINTERSTORE ZRANGEBYSCORE XREVRANGE
PERSIST GET HKEYS LPOP SISMEMBER ZRANK XLEN
PEXPIRE GETBIT HLEN LPUSH SMEMBERS ZREM XREAD
PEXPIREAT GETRANGE HMGET LPUSHX SMOVE ZREMRANGEBYRANK XGROUP
PTTL GETSET HMSET LRANGE SPOP ZREMRANGEBYSCORE XREADGROUP
RANDOMKEY INCR HSET LREM SRANDMEMBER ZREVRANGE XACK
RENAME INCRBY HSETNX LSET SREM ZREVRANGEBYSCORE XCLAIM
RENAMENX INCRBYFLOAT HVALS LTRIM SUNION ZREVRANK XPENDING
RESTORE MGET HSCAN RPOP SUNIONSTORE ZSCORE
SORT MSET RPOPLPUSH SSCAN ZUNIONSTORE
TTL MSETNX RPUSH ZINTERSTORE
TYPE PSETEX RPUSHX ZSCAN
SCAN SET ZRANGEBYLEX
OBJECT SETBIT ZLEXCOUNT
UNLINK SETEX ZREMRANGEBYLEX
SETNX ZPOPMAX
SETRANGE ZPOPMIN
STRLEN BZPOPMIN
BZPOPMAX
表 2. Redis命令支持表2
HyperLogLog Pub/Sub(发布/订阅) Transaction(事务) Connection(连接) Server(服务器) Scripting(脚本) Geo(地理位置)
PFADD PSUBSCRIBE DISCARD AUTH FLUSHALL EVAL GEOADD
PFCOUNT PUBLISH EXEC ECHO FLUSHDB EVALSHA GEOHASH
PFMERGE PUBSUB MULTI PING DBSIZE SCRIPT EXISTS GEOPOS
PUNSUBSCRIBE UNWATCH QUIT TIME SCRIPT FLUSH GEODIST
SUBSCRIBE WATCH SELECT INFO SCRIPT KILL GEORADIUS
UNSUBSCRIBE KEYS SCRIPT LOAD GEORADIUSBYMEMBER
CLIENT KILL
CLIENT LIST
CLIENT GETNAME
CLIENT SETNAME
CONFIG GET
MONITOR
SLOWLOG
SWAPDB
MEMORY
CLIENT UNBLOCK
CLIENT ID
LOLWUT
说明
  • 在Redis集群实例中,client list命令列出所有连接到该proxy的user connection。其中,id、age、idle、addr、fd、name、db、multi、omem、cmd字段和Redis内核表达的意思一样。sub、psub在proxy层没有区分,要么都为1,要么都为0。qbuf、qbuf-free、obl、oll字段目前没有意义。
  • 在Redis集群实例中,client kill命令目前支持两种形式:client kill ip:portclient kill addr ip:port