Performance-wise ,is it recommended to store objects as multiple values for a single key in a KVM, ? where Value: [ { color: "red", code: "#f00" }, { color: "green", code: "#0f0" }, { color: "blue", code: "#00f" }]
Also, is there a limit on the number of multi-values?
Solved! Go to Solution.
Hi @Surbhi, consider using a composite key made of multiple parameters. E.g.,
... <Key> <Parameter ref="key1"><Parameter> <Parameter ref="color"><Parameter> </Key> ...
As Prithpal mentioned, this not only eliminates need to sort through your object at retrieval time, but this also reduces the size of your KVM entry since you don't need to store a structure, itself. More details can be found here.
As for limit, there is no known limit on number of values for a given key.
Edit: I clarified the sample. I'm not sure what your key is in your question, so I substituted with 'key1' in the example I provided.