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 and supports the REdis Serialization Protocol (RESP) 2 and RESP3. The following table lists the supported commands.
Orca supports only the Redis commands that are listed in the following table. Orca also supports only single-DB operations and does not support cross-DB commands, such as MOVE.
Category | Command | Supported |
Bitmap | BITCOUNT | Support |
BITOP | Supported | |
BITPOS | Support | |
SETBIT | Support | |
GETBIT | Support | |
Other commands | Not supported | |
Connection management | PING | Supported |
ECHO | Support | |
HELLO | Support Note
| |
AUTH | Support Note
| |
CLIENT | Partially supported Note Only the | |
Other commands | Not supported | |
Generic | DEL | Support |
UNLINK | Support | |
EXISTS | Support | |
KEYS | Support | |
RENAME | Supported | |
RENAMENX | Support | |
TYPE | Support | |
EXPIRE | Supported | |
EXPIREAT | Supported | |
EXPIRETIME | Support | |
PERSIST | Supported | |
PEXPIRE | Support | |
PEXPIREAT | Support | |
PEXPIRETIME | Supported | |
TTL | Support | |
PTTL | Support | |
RANDOMKEY | Supported | |
DUMP | Support | |
RESTORE | Supported | |
INFO | Support | |
SCAN | Support | |
Other commands | Not supported | |
Hash | HDEL | Support |
HEXISTS | Support | |
HGET | Support | |
HGETALL | Supported | |
HINCRBY | Support | |
HINCRBYFLOAT | Support | |
HKEYS | Support | |
HLEN | Support | |
HMGET | Support | |
HMSET | Support | |
HSET | Support | |
HSETNX | Support | |
HRANDFIELD | Support | |
HVALS | Supported | |
HSTRLEN | Support | |
HSCAN | Support | |
HEXPIRE | Support | |
HEXPIREAT | Support | |
HEXPIRETIME | Supported | |
HPERSIST | Support | |
HPEXPIRE | Support | |
HPEXPIREAT | Supported | |
HPEXPIRETIME | Support | |
HTTL | Support | |
HPTTL | Support | |
Other commands | Not supported | |
List | LINDEX | Supported |
LINSERT | Support | |
LLEN | Supported | |
LMOVE | Supported | |
LMPOP | Support | |
LPOP | Supported | |
LPOS | Support | |
LPUSH | Support | |
LPUSHX | Support | |
LRANGE | Support | |
LREM | Support | |
LSET | Support | |
LTRIM | Support | |
RPOP | Support | |
RPOPLPUSH | Support | |
RPUSH | Support | |
RPUSHX | Supported | |
BLPOP | Support | |
BRPOP | Support | |
Other commands | Not supported | |
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 | Supported | |
Other commands | Not supported | |
Server management | DBSIZE | Support |
FLUSHALL | Support Note
| |
FLUSHDB | Support Note
| |
Other commands | Not supported | |
Set | SADD | Support |
SCARD | Support | |
SDIFF | Supported | |
SDIFFSTORE | Support | |
SINTER | Supported | |
SINTERCARD | Support | |
SINTERSTORE | Support | |
SISMEMBER | Supported | |
SMEMBERS | Support | |
SMISMEMBER | Support | |
SMOVE | Support | |
SREM | Support | |
SUNION | Supported | |
SUNIONSTORE | Supported | |
SPOP | Support | |
SRANDMEMBER | Support | |
SSCAN | Supported | |
Other commands | Not supported | |
Sorted set | ZADD | Support |
ZCARD | Support | |
ZCOUNT | Support | |
ZDIFF | Support | |
ZDIFFSTORE | Supported | |
ZINCRBY | Support | |
ZINTERCARD | Supported | |
ZINTERSTORE | Support | |
ZLEXCOUNT | Supported Note In Redis, LEX operations are meaningful only when all elements in a sorted set have the same score. These operations enforce lexicographical sorting. If scores are different, the return order of elements is not guaranteed. This can cause inconsistent behavior between Orca and Redis. | |
ZMPOP | Support | |
ZMSCORE | Support | |
ZPOPMAX | Support | |
ZPOPMIN | Support | |
ZRANGE | Support Note Usage: Sorting with the optional | |
ZRANGEBYLEX | Supported Note In Redis, LEX operations are meaningful only when all elements in a sorted set have the same score. These operations enforce lexicographical sorting. If scores are different, the return order of elements is not guaranteed. This can cause inconsistent behavior between Orca and Redis. | |
ZRANGEBYSCORE | Supported | |
ZRANGESTORE | Supported | |
ZRANK | Support | |
ZREM | Support | |
ZREMRANGEBYLEX | Supported Note In Redis, LEX operations are meaningful only when all elements in a sorted set have the same score. These operations enforce lexicographical sorting. If scores are different, the return order of elements is not guaranteed. This can cause inconsistent behavior between Orca and Redis. | |
ZREMRANGEBYRANK | Support | |
ZREMRANGEBYSCORE | Support | |
ZREVRANGE | Supported | |
ZREVRANGEBYLEX | Support Note In Redis, LEX operations are meaningful only when all elements in a sorted set have the same score. These operations enforce lexicographical sorting. If scores are different, the return order of elements is not guaranteed. This can cause inconsistent behavior between Orca and Redis. | |
ZREVRANGEBYSCORE | Support | |
ZREVRANK | Supported | |
ZSCORE | Support | |
ZUNION | Support | |
ZUNIONSTORE | Support | |
ZRANDMEMBER | Support | |
ZSCAN | Support | |
Other commands | Not supported | |
String | APPEND | Supported |
DECR | Support | |
DECRBY | Supported | |
GET | Help and Support | |
GETDEL | Support | |
GETEX | Support | |
GETRANGE | Support | |
GETSET | Supported | |
LCS | Supported | |
INCR | Supported | |
INCRBY | Support | |
INCRBYFLOAT | Support | |
MGET | Supported | |
MSET | Support | |
MSETNX | Supported | |
PSETEX | Support | |
SET | Supported | |
SETEX | Support | |
SETNX | Support | |
SETRANGE | Supported | |
STRLEN | Supported | |
SUBSTR | Support |
Key length limit
Redis supports a maximum key length of 512 MB. Orca increases this limit to 4 GB.
For optimal performance, we recommend that you use keys that are no longer than 2560 bytes.