Hi everyone,
We have been testing usage of Cloud Save, using queries and indexes.
Multiple property queries seem to work even though the properties involved have only separate single indexes configured for them (not compound indexes). Is that right ? Are we getting hit on performance ? Aren’t we supposed to define compound indexes for such cases ? If not, then for what cases compound indexes are needed for ?
The documentation says very little on this, just mentions queries and indexes and no mention of the need to define compound indexes or anything lie that -
The setup we checked -
We have a Cloud Save custom item (Game Data) set up with 3 sample properties - prop1, prop2 and … prop3. Each has an asc single separate index configured for it.
Trying to run this query seems to work -
var query = new QueryIndexBody(
fields:
[
new FieldFilter("prop1", "someValue1", FieldFilter.OpEnum.EQ),
new FieldFilter("prop2", "someValue2", FieldFilter.OpEnum.EQ)
],
returnKeys: ["someKey"]
);
Trying to filter one of them to FieldFilter.OpEnum.NE also seems to work.
Even using range filters seem to work
var query = new QueryIndexBody(
fields: [
new FieldFilter("prop1", "someValue1", FieldFilter.OpEnum.EQ),
new FieldFilter("prop2", "someValue2".ToString(), FieldFilter.OpEnum.EQ),
new FieldFilter("prop3", value3, FieldFilter.OpEnum.LT)
],
returnKeys: ["someKey"]
);
Anyone with experience on this ?
Thanks !