How to choose right key to reach the best performace of get() method.
If we suppose that suitation:
we want to save student_number(long) and teacher_number(long) into CB.
both number are in [1,10000].
To make the key unique, we should add some prefix or postfix with the number.
then we will have 2 choices:
choice A: let the key as 'student_prefix_' + student_number, 'teacher_prefix_' + teacher_number;
choice B: let the key as student_number + '_student_postfix', teacher_number + '_teacher_postfix';
which choice can get better performance for get() function? and why ?
thanks!
The performance statistics for Couchbase server look very good, so for most all purposes I think the recommendation is to use whatever makes most sense to you, rather that to try to improve performance with the key choice.
However I can see there could be cases where maximum computation speed would be wanted, so you could do some time tests to see if you can even measure an effect of longer versus shorter key names.
Thanks for the info.
However I can see there could be cases where maximum computation speed would be wanted, so you could do some time tests to see if you can even measure an effect of longer versus shorter key names.
Anyone who can share your experience?
Thanks.