Understanding querying performance between batch get and single get

In reference to a thread, where I saw that it might be possible single get is more performant than batch get.

We are using java client - but the use case is that there are 3 different keys which have values in form of Set of integers. Now, while querying want to get these 3 sets and perform union and intersection operations on these sets.

I am planning to do a batch get for these 3 keys and do that in Java.

Q1. Which one seems to be a better performance alternative - batch get or single get? Q2. Is there a way to refer these 3 keys in lua and perform the operations there to return the final set - is it possible and will it increase performance?

To reduce the number of keys/calls thought of storing 2 of the related values as bins in one key and one as separate key. Is it right way to think?

Please advice. Thanks.

1 Like