question

1StepCloser avatar image
1StepCloser asked

Is Get All Keys (Keys: null) Frowned Upon?

Thus far I've been primarily relying on one key calls, however I'd like to reduce the number of calls and thus batch request for the needed keys. My question: To what extent would the cost of an array of the keys you only need compare to just getting all keys (keys: null) and then selecting only those you need from the data batch?

I guess to further understand, is the cost of a call only derived from sending between client and server, or does merely calling for the keys within cloud script also have a significant (if any) cost?

Apologies ahead of time if this seems silly to those more versed, trying to determine the optimal methodology. Intuition tells me specific key selection, while more manage intensive, is probably more optimal.

data
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
brendan avatar image
brendan answered

All calls count towards the metered costs, whether they're made from a client, a server, or Cloud Script, as they have the same impact on the data tables. So in general, we'd recommend only querying for the keys you actually need in any given call. But using the Keys[] parameter, you can specify all the keys you need - it doesn't need to be just one vs all.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.