Range queries in Redis

16 views
Skip to first unread message

preetika tyagi

unread,
Oct 3, 2018, 7:23:00 PM10/3/18
to Redis DB
Does Redis support operations in which a range of keys are requested?
I cannot find a relevant command for this, however, I wanted to confirm if my understanding is correct.
Thanks!

Itamar Haber

unread,
Oct 3, 2018, 8:21:26 PM10/3/18
to Redis DB
Hello Preetika,

Redis does not support performing operations on ranges of key names. Some commands operate on multiple keys, but the key names have to be explicitly provided to thes.

I hope this makes sense to you.

Cheers,

--
You received this message because you are subscribed to the Google Groups "Redis DB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to redis-db+u...@googlegroups.com.
To post to this group, send email to redi...@googlegroups.com.
Visit this group at https://groups.google.com/group/redis-db.
For more options, visit https://groups.google.com/d/optout.


--

Itamar Haber
Technicalist Evangely

Phone: +972.54.567.9692

Redis Labs

hva...@gmail.com

unread,
Oct 4, 2018, 12:25:09 AM10/4/18
to Redis DB
There aren't that many situations were keys are ordered in a way that a numeric range makes sense to select them.  Those situations tend to be when you're working with lists or sorted sets, and the range selects only elements within the list/set.

The next closest thing would be a very small group of commands that can expand a pattern into a list of key names, like SCAN.
Reply all
Reply to author
Forward
0 new messages