All Products
Search
Document Center

PolarDB:Compatibility of Orca

Last Updated:Mar 28, 2025

This topic describes the compatibility of Orca in a PolarDB for MySQL cluster.

Compatibility with Redis

Orca is compatible with specific commands of Redis 7.0 and later versions and supports RESP2 and RESP3. The following table describes the support of Orca for Redis commands.

Important

Orca does not support Redis commands that are not included in the following table. Orca only supports only operations within a single DB and does not support cross-DB commands such as the MOVE command.

Category

Command

Supported

Bitmap

BITCOUNT

Yes

BITOP

Yes

BITPOS

Yes

SETBIT

Yes

GETBIT

Yes

Other commands

No

Connection management

PING

Yes

ECHO

Yes

HELLO

Yes

Note
  • Usage: The same.

  • Returned value: Different. Only server and proto are returned for Orca.

AUTH

Yes

Note
  • Usage: Different.

    • In Redis, the AUTH [username] password syntax is used. The username parameter can be omitted.

    • In Orca, the AUTH username password syntax is used. The username parameter cannot be omitted.

  • Returned value: The same.

Other commands

No

Generic

DEL

Yes

UNLINK

Yes

EXISTS

Yes

KEYS

Yes

RENAME

Yes

RENAMENX

Yes

TYPE

Yes

EXPIRE

Yes

EXPIREAT

Yes

EXPIRETIME

Yes

PERSIST

Yes

PEXPIRE

Yes

PEXPIREAT

Yes

PEXPIRETIME

Yes

TTL

Yes

PTTL

Yes

RANDOMKEY

Yes

DUMP

Yes

RESTORE

Yes

INFO

Yes

SCAN

Yes

Other commands

No

Hash

HDEL

Yes

HEXISTS

Yes

HGET

Yes

HGETALL

Yes

HINCRBY

Yes

HINCRBYFLOAT

Yes

HKEYS

Yes

HLEN

Yes

HMGET

Yes

HMSET

Yes

HSET

Yes

HSETNX

Yes

HRANDFIELD

Yes

HVALS

Yes

HSTRLEN

Yes

HSCAN

Yes

Other commands

No

List

LINDEX

Yes

LINSERT

Yes

LLEN

Yes

LMOVE

Yes

LMPOP

Yes

LPOP

Yes

LPOS

Yes

LPUSH

Yes

LPUSHX

Yes

LRANGE

Yes

LREM

Yes

LSET

Yes

LTRIM

Yes

RPOP

Yes

RPOPLPUSH

Yes

RPUSH

Yes

RPUSHX

Yes

Other commands

No

Server management

DBSIZE

Yes

FLUSHALL

Yes

Note
  • Usage: Different.

    • In Redis, the FLUSHALL [ASYNC | SYNC] syntax is used. You can add the ASYNC or SYNC parameter to the command.

    • In Orca, the FLUSHALL syntax is used. You cannot add a parameter to the command.

  • Returned value: The same.

FLUSHDB

Yes

Note
  • Usage: Different.

    • In Redis, the FLUSHDB [ASYNC | SYNC] syntax is used. You can add the ASYNC or SYNC parameter to the command.

    • In Orca, the FLUSHDB syntax is used. You cannot add a parameter to the command.

  • Returned value: The same.

Other commands

No

Set

SADD

Yes

SCARD

Yes

SDIFF

Yes

SDIFFSTORE

Yes

SINTER

Yes

SINTERCARD

Yes

SINTERSTORE

Yes

SISMEMBER

Yes

SMEMBERS

Yes

SMISMEMBER

Yes

SMOVE

Yes

SREM

Yes

SUNION

Yes

SUNIONSTORE

Yes

SPOP

Yes

SRANDMEMBER

Yes

SSCAN

Yes

Other commands

No

Sorted set

ZADD

Yes

ZCARD

Yes

ZCOUNT

Yes

ZDIFF

Yes

ZDIFFSTORE

Yes

ZINCRBY

Yes

ZINTERCARD

Yes

ZINTERSTORE

Yes

ZLEXCOUNT

Yes

Note

In Redis, elements in a sorted set are ordered lexicographically when they share the same score. If the elements have different scores, their order may vary, which can lead to inconsistent results between Orca and Redis.

ZMPOP

Yes

ZMSCORE

Yes

ZPOPMAX

Yes

ZPOPMIN

Yes

ZRANGE

Yes

Note

Syntax: RANGE key start stop [BYSCORE | BYLEX] [REV] [LIMIT offset count] [WITHSCORES].

If you specify the optional parameter BYLEX, see the sorting result of the ZRANGEBYLEX command.

ZRANGEBYLEX

Yes

Note

In Redis, elements in a sorted set are ordered lexicographically when they share the same score. If the elements have different scores, their order may vary, which can lead to inconsistent results between Orca and Redis.

ZRANGEBYSCORE

Yes

ZRANGESTORE

Yes

ZRANK

Yes

ZREM

Yes

ZREMRANGEBYLEX

Yes

Note

In Redis, elements in a sorted set are ordered lexicographically when they share the same score. If the elements have different scores, their order may vary, which can lead to inconsistent results between Orca and Redis.

ZREMRANGEBYRANK

Yes

ZREMRANGEBYSCORE

Yes

ZREVRANGE

Yes

ZREVRANGEBYLEX

Yes

Note

In Redis, elements in a sorted set are ordered lexicographically when they share the same score. If the elements have different scores, their order may vary, which can lead to inconsistent results between Orca and Redis.

ZREVRANGEBYSCORE

Yes

ZREVRANK

Yes

ZSCORE

Yes

ZUNION

Yes

ZUNIONSTORE

Yes

ZRANDMEMBER

Yes

ZSCAN

Yes

Other commands

No

String

APPEND

Yes

DECR

Yes

DECRBY

Yes

GET

Yes

GETDEL

Yes

GETEX

Yes

GETRANGE

Yes

GETSET

Yes

LCS

Yes

INCR

Yes

INCRBY

Yes

INCRBYFLOAT

Yes

MGET

Yes

MSET

Yes

MSETNX

Yes

PSETEX

Yes

SET

Yes

SETEX

Yes

SETNX

Yes

SETRANGE

Yes

STRLEN

Yes

SUBSTR

Yes

Key length limits

In Redis, the maximum length of a single key is 512 MB. In Orca, the maximum length of a single key is 4 GB.

Note

We recommend that you use a key that does not exceed 2560 bytes to achieve the optimal performance.