Alex Rivera | Logout

Iterating through keys in Redis

Asked 2012-02-02T12:24:44.200
12

I have just started with Redis. My DB contains about 1 billion records. Using HKEYS * results in an out of memory error.

Is there a way to iterate through keys? Something like HKEYS * but with a limit n?

Edit:

I am now using a loop which matches a pattern

for c in '1234567890abcedf':
    r.keys(c + '*')
Edit
Report

1 Answer

0

Sorry, at the current time, year 2012, the simple answer is no, however, with lua scripting you could do it, although that is not direct redis in the strictest sense.

answered 2012-05-11T07:46:48.407

Your Answer