8000 Differences between multi get and getMultiple · Issue #5 · phpredis/phpredis · GitHub
[go: up one dir, main page]

Skip to content

Differences between multi get and getMultiple #5

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Differences between multi get and getMultiple #5

mrsinham opened this issue Apr 4, 2011 · 2 comments
Labels

Comments

@mrsinham
Copy link
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
Copy link
Member

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

@mrsinham
Copy link
Author
mrsinham commented Apr 4, 2011

Thanks ;)

@bigfg bigfg mentioned this issue Aug 9, 2016
@liupdhc liupdhc mentioned this issue Apr 12, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants
0