title: REDIS-Python -> get all keys and respective values from 1 database
body: <p>I am trying to get all keys and values from a REDIS db. There are about 35000+ open connections on REDIS by the other users. I am using r.scan_iter()to get all the keys and I am appending them to a list. I am currently using pipeline.execute() to get all the values for these list of keys. Is this necessary to get the values for keys from redis? Or is there some way to access values of keys from r.scan_iter() loop. 
  Key = a|b|c
  Value = V1:X1 V2:X2 V3:X3</p>
  
  <p>My code is as below:</p>
  
  <pre><code>r = redis.Redis(host,port,db)
  #To get all the keys and then use pipeline to get corresponding values
  for key in r.scan_iter():
      pipe.hgetall(key.decode('utf-8'))
  values = pipe.execute()
  #To  loop through the values and read 
  for value in values:
       # Get all the values for each key
       for name, value in value.items():
  </code></pre>