i using jedis fetching data redis database server. need push data on mysql. redis server has millions of records in it. using below statements can copy data in set:
string pattern = "users*";//all keys starting users set<string> users = jedis.keys(pattern)//read keys in set
now users
set has records. there may million records match pattern in redis database. consume memory. how can thing below
for(all keys match pattern){ set<string> set = current (current+10000) records server ...code push 10k records mysql... current = current + 10001; }
or please suggest if there elegant approach this
yes, can. use scan command that. @ jedis scan test examples of usage.