Discussion:
[redis-db] redis mget vs pipeline
Shushant Arora
2017-11-05 11:04:52 UTC
Permalink
Hi

I have multiple keys to fetch from redis , which one is more performant
mget or pipeline ?
--
You received this message because you are subscribed to the Google Groups "Redis DB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to redis-db+***@googlegroups.com.
To post to this group, send email to redis-***@googlegroups.com.
Visit this group at https://groups.google.com/group/redis-db.
For more options, visit https://groups.google.com/d/optout.
Jan-Erik Rediger
2017-11-05 11:18:17 UTC
Permalink
Why not test it?

From a purely speculative point of view I'd say MGET:

* Only one command to be parsed
* One path through the code collecting the values
* List of values in a single answer might safe a tiny bit of bytes.
Post by Shushant Arora
Hi
I have multiple keys to fetch from redis , which one is more performant
mget or pipeline ?
--
You received this message because you are subscribed to the Google Groups "Redis DB" group.
Visit this group at https://groups.google.com/group/redis-db.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Redis DB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to redis-db+***@googlegroups.com.
To post to this group, send email to redis-***@googlegroups.com.
Visit this group at https://groups.google.com/group/redis-db.
For more options, visit https://groups.google.com/d/optout.
Shushant Arora
2017-11-05 11:48:03 UTC
Permalink
and if multiple keys are hash keys from different fields , can mget be used
? And if I go for hmgetall can I use multiple hmgetall in one go without
pipeline ?
Post by Jan-Erik Rediger
Why not test it?
* Only one command to be parsed
* One path through the code collecting the values
* List of values in a single answer might safe a tiny bit of bytes.
Post by Shushant Arora
Hi
I have multiple keys to fetch from redis , which one is more performant
mget or pipeline ?
--
You received this message because you are subscribed to the Google
Groups "Redis DB" group.
Post by Shushant Arora
To unsubscribe from this group and stop receiving emails from it, send
Visit this group at https://groups.google.com/group/redis-db.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the
Google Groups "Redis DB" group.
To unsubscribe from this topic, visit https://groups.google.com/d/
topic/redis-db/p2uVXE1g8kA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
Visit this group at https://groups.google.com/group/redis-db.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Redis DB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to redis-db+***@googlegroups.com.
To post to this group, send email to redis-***@googlegroups.com.
Visit this group at https://groups.google.com/group/redis-db.
For more options, visit https://groups.google.com/d/optout.
m***@andyh.io
2017-11-05 12:08:36 UTC
Permalink
You can.

The answer can be easily found out by sending the commands to a Redis server. If you really don't want to install a Redis server, you can try at the Redis documentation page which provides a sandbox page where you can try the commands.

Andy

Sent from my iPhone
and if multiple keys are hash keys from different fields , can mget be used ? And if I go for hmgetall can I use multiple hmgetall in one go without pipeline ?
Post by Jan-Erik Rediger
Why not test it?
* Only one command to be parsed
* One path through the code collecting the values
* List of values in a single answer might safe a tiny bit of bytes.
Post by Shushant Arora
Hi
I have multiple keys to fetch from redis , which one is more performant
mget or pipeline ?
--
You received this message because you are subscribed to the Google Groups "Redis DB" group.
Visit this group at https://groups.google.com/group/redis-db.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "Redis DB" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/redis-db/p2uVXE1g8kA/unsubscribe.
Visit this group at https://groups.google.com/group/redis-db.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Redis DB" group.
Visit this group at https://groups.google.com/group/redis-db.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Redis DB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to redis-db+***@googlegroups.com.
To post to this group, send email to redis-***@googlegroups.com.
Visit this group at https://groups.google.com/group/redis-db.
For more options, visit https://groups.google.com/d/optout.
m***@andyh.io
2017-11-05 12:36:47 UTC
Permalink
Correction: MGET only works for string value commands.

Sent from my iPhone
and if multiple keys are hash keys from different fields , can mget be used ? And if I go for hmgetall can I use multiple hmgetall in one go without pipeline ?
Post by Jan-Erik Rediger
Why not test it?
* Only one command to be parsed
* One path through the code collecting the values
* List of values in a single answer might safe a tiny bit of bytes.
Post by Shushant Arora
Hi
I have multiple keys to fetch from redis , which one is more performant
mget or pipeline ?
--
You received this message because you are subscribed to the Google Groups "Redis DB" group.
Visit this group at https://groups.google.com/group/redis-db.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "Redis DB" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/redis-db/p2uVXE1g8kA/unsubscribe.
Visit this group at https://groups.google.com/group/redis-db.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Redis DB" group.
Visit this group at https://groups.google.com/group/redis-db.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Redis DB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to redis-db+***@googlegroups.com.
To post to this group, send email to redis-***@googlegroups.com.
Visit this group at https://groups.google.com/group/redis-db.
For more options, visit https://groups.google.com/d/optout.
Loading...