zpopmax
ZPOPMAX
Apply for Redis Developer Course
|
Redis Regular Inspection / Technical Support
|
Redis Enterprise Server
|
|---|
Pop members with the highest scores
Usage: zpopmax key [count].
The default count is 1.
Example
| Command> | zadd city 50 Tokey 60 Seoul 70 Beijing 80 "New York" |
| Result> | 4 |
| Command> | zpopmax city |
| Result> |
1) "New York" 2) "80" |
| Command> | zpopmax city 2 |
| Result> |
1) "Beijing" 2) "70" 3) "Seoul" 4) "60" |
Syntax
ZPOPMAX key [count]
- Available since version 5.0.0.
- Time complexity is O(log(N)*M). N is the number of members in the set, and M is the number of members returned.
| << ZPOPMIN | ZPOPMAX | BZPOPMIN >> |
|---|
Email
답글이 올라오면 이메일로 알려드리겠습니다.
