Reputation: 297
HSET myhash field2 "Hi" field3 "World"
HSET myhash2 field2 "Hi" field3 "World"
I want to fetch the key-values for mhash and myhash2 in one operation. how to do this ?
Upvotes: 0
Views: 45
Reputation: 1
You want to get/modify the two keys in a single query to save some network transports? Do this in batch. If you want it, then you have to take the power of pipeline:
https://redis.io/docs/latest/develop/use/pipelining/
(printf 'HSET myhash field2 "Hi" field3 "World"\r\nHSET myhash2 field2 "Hi" field3 "World"\r\n'; sleep 1) | nc localhost 6379
Upvotes: 0
Reputation: 2043
There is no native way that redis supports fetching keys of two hash-maps in one operation
Upvotes: 1