Reputation: 637
I get values with "KEYS p_*" command in redis.
But with "KEYS p_*" , if the redis has millions of keys,I will get too many values and bad performence.
So can I just get 100 values with "KEYS p_*" command?
Upvotes: 44
Views: 50482
Reputation: 3784
SCAN is recommended for production, so you can use something like:
SCAN 0 COUNT 100 MATCH p_*
and keep getting the next page
for more details see the SCAN command:
http://redis.io/commands/scan
Upvotes: 74