Differences between multi get and getMultiple #5

Closed
mrsinham opened this Issue Apr 4, 2011 · 2 comments

Comments

Projects
None yet
2 participants
@mrsinham

mrsinham commented Apr 4, 2011

Hello,

I just want to know the differencies between multiple get inside a transaction and the getMultiple command. Are the commands sended in one time in the first case, are they queue on the server itself or on the client side ?

what is the more efficient between the two ways ?

Thx

@nicolasff

This comment has been minimized.

Show comment Hide comment
@nicolasff

nicolasff Apr 4, 2011

Contributor

Hello,

Your interpretation is correct.

getMultiple is the MGET command in Redis (see doc here: http://redis.io/commands/mget), so it'll be sent as a single command.
Using multi()->get('x')->get('y')->...->exec() will send N packets to Redis, which is not as efficient.

Nicolas

Contributor

nicolasff commented Apr 4, 2011

Hello,

Your interpretation is correct.

getMultiple is the MGET command in Redis (see doc here: http://redis.io/commands/mget), so it'll be sent as a single command.
Using multi()->get('x')->get('y')->...->exec() will send N packets to Redis, which is not as efficient.

Nicolas

@nicolasff nicolasff closed this Apr 4, 2011

@mrsinham

This comment has been minimized.

Show comment Hide comment
@mrsinham

mrsinham Apr 4, 2011

Thanks ;)

mrsinham commented Apr 4, 2011

Thanks ;)

@bigfg bigfg referenced this issue Aug 9, 2016

Closed

phpredis coredump #921

yatsukhnenko added a commit to yatsukhnenko/phpredis that referenced this issue Dec 2, 2016

@liupdhc liupdhc referenced this issue Apr 12, 2017

Open

-MOVED #1136

yatsukhnenko added a commit to yatsukhnenko/phpredis that referenced this issue Aug 15, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment