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

支持的Redis命令

表 1. Redis命令支持表1
Keys(键) String(字符串) Hash(哈希表) List(列表) Set(集合) SortedSet(有序集合)
DEL APPEND HDEL BLPOP SADD ZADD
DUMP BITCOUNT HEXISTS BRPOP SCARD ZCARD
EXISTS BITOP HGET BRPOPLPUSH SDIFF ZCOUNT
EXPIRE BITPOS HGETALL LINDEX SDIFFSTORE ZINCRBY
EXPIREAT DECR HINCRBY LINSERT SINTER ZRANGE
MOVE DECRBY HINCRBYFLOAT LLEN SINTERSTORE ZRANGEBYSCORE
PERSIST GET HKEYS LPOP SISMEMBER ZRANK
PEXPIRE GETBIT HLEN LPUSH SMEMBERS ZREM
PEXPIREAT GETRANGE HMGET LPUSHX SMOVE ZREMRANGEBYRANK
PTTL GETSET HMSET LRANGE SPOP ZREMRANGEBYSCORE
RANDOMKEY INCR HSET LREM SRANDMEMBER ZREVRANGE
RENAME INCRBY HSETNX LSET SREM ZREVRANGEBYSCORE
RENAMENX INCRBYFLOAT HVALS LTRIM SUNION ZREVRANK
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
SETRANGE
STRLEN
表 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
说明
  • 在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

其它Redis命令