This topic describes the compatibility of Orca with PolarDB for MySQL.
Redis protocol compatibility
Orca is compatible with some commands from Redis 7.0 and earlier versions. It also supports the RESP2 and RESP3 protocols. The following table lists the supported commands.
Orca does not support Redis commands that are not listed in the following table. It supports operations only within a single DB and does not support cross-DB commands, such as the MOVE command.
Category | Command | Supported |
Bitmap | BITCOUNT | Support |
BITOP | Support | |
BITPOS | Support | |
SETBIT | Support | |
GETBIT | Support | |
Other commands | No | |
Connection management | PING | Support |
ECHO | Support | |
HELLO | Support Note
| |
AUTH | Support Note
| |
CLIENT | Partially supported Note Only the | |
Other commands | No | |
Generic | DEL | Support |
UNLINK | Support | |
EXISTS | Support | |
KEYS | Support | |
RENAME | Support | |
RENAMENX | Support | |
TYPE | Support | |
EXPIRE | Support | |
EXPIREAT | Support | |
EXPIRETIME | Support | |
PERSIST | Support | |
PEXPIRE | Support | |
PEXPIREAT | Support | |
PEXPIRETIME | Support | |
TTL | Support | |
PTTL | Support | |
RANDOMKEY | Support | |
DUMP | Support | |
RESTORE | Support | |
INFO | Support | |
SCAN | Support | |
Other commands | Not supported | |
Hash | HDEL | Support |
HEXISTS | Support | |
HGET | Support | |
HGETALL | Support | |
HINCRBY | Support | |
HINCRBYFLOAT | Support | |
HKEYS | Support | |
HLEN | Support | |
HMGET | Support | |
HMSET | Support | |
HSET | Support | |
HSETNX | Support | |
HRANDFIELD | Support | |
HVALS | Support | |
HSTRLEN | Support | |
HSCAN | Support | |
HEXPIRE | Support | |
HEXPIREAT | Support | |
HEXPIRETIME | Supported | |
HPERSIST | Support | |
HPEXPIRE | Support | |
HPEXPIREAT | Support | |
HPEXPIRETIME | Support | |
HTTL | Support | |
HPTTL | Support | |
Other commands | No | |
List | LINDEX | Support |
LINSERT | Support | |
LLEN | Support | |
LMOVE | Support | |
LMPOP | Yes | |
LPOP | Support | |
LPOS | Support | |
LPUSH | Support | |
LPUSHX | Support | |
LRANGE | Support | |
LREM | Support | |
LSET | Support | |
LTRIM | Support | |
RPOP | Support | |
RPOPLPUSH | Support | |
RPUSH | Support | |
RPUSHX | Support | |
Other commands | No | |
Pub/Sub Note A client in the | PSUBSCRIBE | Support |
PUBLISH | Support | |
PUBSUB CHANNELS | Support | |
PUBSUB NUMPAT | Support | |
PUBSUB NUMSUB | Support | |
PUNSUBSCRIBE | Support | |
SUBSCRIBE | Support | |
UNSUBSCRIBE | Support | |
Other commands | No | |
Server management | DBSIZE | Supported |
FLUSHALL | Support Note
| |
FLUSHDB | Support Note
| |
Other commands | No | |
Set | SADD | Support |
SCARD | Support | |
SDIFF | Support | |
SDIFFSTORE | Support | |
SINTER | Support | |
SINTERCARD | Support | |
SINTERSTORE | Support | |
SISMEMBER | Support | |
SMEMBERS | Support | |
SMISMEMBER | Support | |
SMOVE | Support | |
SREM | Support | |
SUNION | Support | |
SUNIONSTORE | Support | |
SPOP | Support | |
SRANDMEMBER | Support | |
SSCAN | Support | |
Other commands | No | |
Sorted set | ZADD | Support |
ZCARD | Support | |
ZCOUNT | Support | |
ZDIFF | Support | |
ZDIFFSTORE | Support | |
ZINCRBY | Supported | |
ZINTERCARD | Support | |
ZINTERSTORE | Support | |
ZLEXCOUNT | Support Note In Redis, LEX operations are meaningful only when all elements in a sorted set have the same score. This forces a lexicographical sort. However, if the elements have different scores, the order of the returned elements is not guaranteed. In this case, the behavior of Orca and Redis may be inconsistent. | |
ZMPOP | Support | |
ZMSCORE | Support | |
ZPOPMAX | Support | |
ZPOPMIN | Support | |
ZRANGE | Support Note Usage: If you specify the optional | |
ZRANGEBYLEX | Support Note In Redis, LEX operations are meaningful only when all elements in a sorted set have the same score. This forces a lexicographical sort. However, if the elements have different scores, the order of the returned elements is not guaranteed. In this case, the behavior of Orca and Redis may be inconsistent. | |
ZRANGEBYSCORE | Support | |
ZRANGESTORE | Support | |
ZRANK | Support | |
ZREM | Support | |
ZREMRANGEBYLEX | Support Note In Redis, LEX operations are meaningful only when all elements in a sorted set have the same score. This forces a lexicographical sort. However, if the elements have different scores, the order of the returned elements is not guaranteed. In this case, the behavior of Orca and Redis may be inconsistent. | |
ZREMRANGEBYRANK | Support | |
ZREMRANGEBYSCORE | Support | |
ZREVRANGE | Support | |
ZREVRANGEBYLEX | Support Note In Redis, LEX operations are meaningful only when all elements in a sorted set have the same score. This forces a lexicographical sort. However, if the elements have different scores, the order of the returned elements is not guaranteed. In this case, the behavior of Orca and Redis may be inconsistent. | |
ZREVRANGEBYSCORE | Support | |
ZREVRANK | Supported | |
ZSCORE | Support | |
ZUNION | Support | |
ZUNIONSTORE | Support | |
ZRANDMEMBER | Support | |
ZSCAN | Support | |
Other commands | No | |
String | APPEND | Support |
DECR | Support | |
DECRBY | Support | |
GET | Support | |
GETDEL | Support | |
GETEX | Support | |
GETRANGE | Support | |
GETSET | Support | |
LCS | Support | |
INCR | Support | |
INCRBY | Support | |
INCRBYFLOAT | Support | |
MGET | Support | |
MSET | Support | |
MSETNX | Support | |
PSETEX | Support | |
SET | Support | |
SETEX | Supported | |
SETNX | Support | |
SETRANGE | Support | |
STRLEN | Support | |
SUBSTR | Support |
Key length limits
Redis limits the length of a single key to 512 MB. Orca limits the length of a single key to 4 GB.
For optimal performance, use a key no longer than 2560 bytes.