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