What is the expected complexity of Delete, Read & List operations for storage?
Nakama provides the above-listed four APIs for the Storage object. As it uses CockroachDB on the database handling side, I’m not sure if the delete, read, and list operations behave similarly to a Cockroach DB database that has indices built on Collection, Key, and UserID. If yes, are the indices on the basis of all three or a combination of any two (i.e. a composite index) or a separate index on each of the fields or both or none?
Say, out of the two below, which query would be more optimized?
{Details}
- Server Framework Runtime language - Go
A.
objectIds:= [] * runtime.StorageRead { & runtime.StorageRead {
Collection: "save",
Key: "save1",
UserID: userID,
},
}
records, err:= nk.StorageRead(ctx, objectIds)
B.
objectIds:= [] * runtime.StorageRead { & runtime.StorageRead {
Collection: "save",
Key: "save1",
},
}
records, err:= nk.StorageRead(ctx, objectIds)
Media: