zrangestore
ZRANGESTORE
Apply for Redis Developer Course
|
Redis Regular Inspection / Technical Support
|
Redis Enterprise Server
|
|---|
Store the query result in another key
Stores the query result in another key.
The query method is the same as ZRANGE.
This command is available since version 6.2.
Example
| Command> | zadd mycity 10 Seoul 20 Busan 30 Daegu 40 Incheon 50 Gwangju 60 Gyeonggi |
| Result> | 6 |
| Command> | zrangestore mycity2 mycity 0 -1 |
| Result> |
1) "Seoul" 2) "Busan" 3) "Daegu" 4) "Incheon" 5) "Gwangju" 6) "Gyeonggi" |
| Command> | zrange mycity2 0 -1 |
| Result> |
1) "Seoul" 2) "Busan" 3) "Daegu" 4) "Incheon" 5) "Gwangju" 6) "Gyeonggi" |
Syntax
ZRANGESTORE dst src min max [ BYSCORE | BYLEX] [REV] [LIMIT offset count]
- Available since version 6.2.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.
| Related commands | ZREVRANGE, LRANGE, |
| << ZRANGE | ZRANGESTORE | ZLS >> |
|---|
Email
답글이 올라오면 이메일로 알려드리겠습니다.
