来自云代码的数据库查询计数吗? [英] Does database queries from cloud code count?

查看:48
本文介绍了来自云代码的数据库查询计数吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Parse 有 30 个请求/秒的限制.但是不清楚这是计算哪些操作,例如我了解到缓存查询不计入此限制.

Parse has a 30 req/s limit. However it is not very clear what operations this is counting, for example I learned that cached queries do not count to this limit.

我的问题是,如果我从云代码调用查询,是设备云操作计数为限制还是云数据库操作计数为限制,或者它们都计数?

My question is if I call queries from the cloud code does the device-cloud operation count for the limit or does cloud-database operation count for the limit or do they both count?

推荐答案

将 Parse 视为一项业务.他们根据每秒提交的 API 请求数来赚钱.显然,你做得越多,他们可能赚到的钱就越多.因此,为了您的最大利益,总是可以安全地假设您查询的所有内容都将对您不利.缓存数据是从过去 查询中缓存的,因此没有理由再次向您收取设备上已有信息的费用.或者可能有,但我会给 Parse 带来怀疑的好处.

Think about Parse as a business. They make money based on the number of API requests submitted per second. Obviously the more you do, they more they potentially earn. So in your best interests, it's always safe to assume everything you query will be counted against you. Cached data is cached from a past query, so there is no reason to charge you again for the information that's already on the device. Or there may be, but I'll give Parse the benefit of the doubt on that one.

具体回答您的问题,是的,云代码查询也不例外,每次查询将向您收取 1 个请求.

To answer your question specifically, yes, cloud code queries are no different, you will be charged 1 request per query.

查看他们的官方文档以详细了解他们的津贴这里查看标题为什么"的部分被视为 API 请求".从字面上看,它没有任何假设或误解的余地:

See their official docs for a thorough breakdown on their allowances HERE see the section titled 'What is Considered An API Request'. It literally leaves no room for assumption or misinterpretation :

每当您通过 iOS、Android、JavaScript、Windows、Xamarin、Unity 或 REST API 代表您的应用对 Parse 进行网络调用时,它都被视为 API 请求.

Anytime you make a network call to Parse on behalf of your app via the iOS, Android, JavaScript, Windows, Xamarin, Unity, or REST API, it counts as an API request.

此外,最好注意每个查询 1 个 API 请求加上每个保存操作的 1 个额外请求(前提是您保存了任何内容)

Also, it might be a good thing to note it's 1 API request per query plus 1 additional request for each save operation (provided your saving anything)

EDIT 我忘了提及他们最近引入的本地数据存储,同样,当您固定查询时,它也属于相同的规定.

EDIT I forgot to mention local data store they recently introduced, again, it falls under the same stipulations when you pin the queries.

这篇关于来自云代码的数据库查询计数吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆