tencent cloud

All product documents
TencentDB for Redis®
Sorted Sets Group
Last updated: 2024-11-25 15:32:55
Sorted Sets Group
Last updated: 2024-11-25 15:32:55
Redis 7.0 introduced the following commands: zmpop, bzmpop, and zintercard.
Command Group
Command
New Description
Sorted sets
ZMPOP numkeys key [key ...] <MIN | MAX> [COUNT count]
A new command.
Atomically pops the smallest or largest members from multiple sorted sets.
COUNT count: Specifies how many members to be popped at a time, with a default value of 1.
MIN or MAX: Determines whether to pop the smallest or largest members from the sets.
Supports multi-key operations.
BZMPOP timeout numkeys key [key ...] <MIN | MAX> [COUNT count]
A new command.
Atomically pops one or more members with the highest or lowest scores from one or more sorted sets and supports blocking operations. The timeout specifies the timeout period for waiting the command.
Supports multi-key operations.
ZINTERCARD numkeys key [key ...] [LIMIT limit]
A new command.
Used for the zset data type, this command calculates the intersection of two or more sorted sets and returns the number of elements in the intersection.
numkeys: Specifies the number of sorted sets.
key: Refers to the key names of the sorted sets.
AGGREGATE: Specifies the aggregation method.
Limit: Specifies the number of results to be returned.
The standard architecture of Redis 2.8, and the standard and cluster architectures of Redis 4.0, 5.0, 6.2, and 7.0 all support the following commands: zadd, zcard, zcount, zincrby, zinterstore, zlexcount, zrange, zrangebylex, zrangebyscore, zrank, zrem, zremrangebylex, zremrangebyrank, zremrangebyscore, zrevrange, zrevrangebylex, zrevrangebyscore, zscore, zrevrank, zscan, and zunionstore.
In cross-slot scenes for the cluster architecture, the zinterstore and zunionstore commands are not supported.
For more information, see the table below, where ✓ indicates support, x indicates not support, and - indicates that the command does not involve a cross-slot access scene.
Command
2.8 Memory Edition (Standard Architecture)
4.0 Memory Edition (Standard Architecture)
4.0 Memory Edition (Cluster Architecture)
5.0 Memory Edition (Standard Architecture)
5.0 Memory Edition (Cluster Architecture)
6.2 Memory Edition (Standard Architecture)
6.2 Memory Edition (Cluster Architecture)
7.0 Memory Edition (Standard Architecture)
7.0 Memory Edition (Cluster Architecture)
Memory Edition (Cluster Architecture) Cross-Slot Support
zadd
-
zcard
-
zcount
-
zincrby
-
zinterstore
x
zlexcount
-
zrange
-
zrangebylex
-
zrangebyscore
-
zrank
-
zrem
-
zremrangebylex
-
zremrangebyrank
-
zremrangebyscore
-
zrevrange
-
zrevrangebylex
-
zrevrangebyscore
-
zscore
-
zrevrank
-
zscan
-
zunionstore
x
zpopmax
x
x
x
-
zpopmin
x
x
x
-
bzpopmax
x
x
x
-
bzpopmin
x
x
x
-
zdiff
x
x
x
x
x
-
zdiffstore
x
x
x
x
x
-
zinter
x
x
x
x
x
x
x
x
x
-
zrandmember
x
x
x
x
x
-
zrangestore
x
x
x
x
x
-
zunion
x
x
x
x
x
-
zmscore
x
x
x
x
x
-
zmpop
x
x
x
x
x
x
x
-
bzmpop
x
x
x
x
x
x
x
-
zintercard
x
x
x
x
x
x
x
-
Was this page helpful?
You can also Contact Sales or Submit a Ticket for help.
Yes
No

Feedback

Contact Us

Contact our sales team or business advisors to help your business.

Technical Support

Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

7x24 Phone Support
Hong Kong, China
+852 800 906 020 (Toll Free)
United States
+1 844 606 0804 (Toll Free)
United Kingdom
+44 808 196 4551 (Toll Free)
Canada
+1 888 605 7930 (Toll Free)
Australia
+61 1300 986 386 (Toll Free)
EdgeOne hotline
+852 300 80699
More local hotlines coming soon