使用Bigquery的库和api进行查询有限制吗?

时间:2023-02-13 15:46:53

I want to know if there is any limit when making queries to my data already loaded in bigquery?

我想知道在查询bigquery中已经加载的数据时是否有限制?

For example, if I want to extract bigquery information from a web application or from a "web service", what is my limit of selects, updates and deletes?

例如,如果我想从web应用程序或“web服务”中提取bigquery信息,那么选择、更新和删除的限制是什么?

The documentation tells me this:

文档告诉我:

Concurrent rate limit for interactive queries under on-demand pricing: 50 concurrent queries. Queries that return cached results, or queries configured using the dryRun property, do not count against this limit.

按需定价的交互式查询的并发率限制:50个并发查询。返回缓存结果的查询,或使用dryRun属性配置的查询,都不计入这个限制。

Daily query size limit: unlimited by default, but you may specify limits using custom quotas.

每日查询大小限制:默认为无限制,但您可以使用自定义配额指定限制。

But I can not understand if I have a limit on the number of consultations per day, and if so, what is my limit?

但我不明白我是否对每天的咨询次数有限制,如果有,我的限制是什么?

1 个解决方案

#1


2  

There is a limit to the number of slots you can allocate for queries at a particular time.

您可以在特定时间为查询分配的槽数是有限制的。

Some nuggets:

一些掘金:

  • Slot: represents one unit of computational capacity.
  • 槽:表示计算能力的一个单位。
  • Query: Uses as many slots as required so the query runs optimally (Currently: MAX 50 slots for On Demand Price) [A]
  • 查询:根据需要使用尽可能多的槽,以便查询以最佳方式运行(当前:按需价格最多可运行50个槽)[A]
  • Project: The slots used per project is based on the number of queries that run at the same time (Currently: MAX 2000 slots for On Demand Price)
  • 项目:每个项目使用的槽数基于同时运行的查询数(当前:按需价格最多2000个槽)

[A] This is all under the hood without user intervention. BigQuery makes an assessment of the query to calculate the number of slots required.

A .这都是在没有用户干预的情况下进行的。BigQuery对查询进行评估,以计算所需的槽数。

So if you do the math, worst case, if all your queries use 50 slots, you will not find any side effect until you have more than 40 queries running concurrently. Even in those situations, the queries will just be in the queue for a while and will start running after some queries are done executing.

如果你计算一下,最坏的情况,如果你所有的查询都使用了50个槽,那么在你同时运行超过40个查询之前,你不会发现任何副作用。即使在这些情况下,查询也只会在队列中停留一段时间,并在执行一些查询之后开始运行。

Slots become more worrisome when you are time sensitive to getting your data on time and they are run in an environment where:

当您对及时获取数据敏感时,插槽变得更加令人担忧,而且它们运行在以下环境中:

  • A lot of queries are running at the same time.
  • 许多查询同时运行。
  • Most of those queries that are running at the same time usually take a long time to execute on an empty load.
  • 大多数同时运行的查询通常需要很长时间才能在空负载上执行。

The best way to understand whether these limits will impact you or not is by monitoring the current activity within your project. Bigquery advises you to monitor your slots with Stackdriver.

了解这些限制是否会影响您的最佳方法是监视项目中的当前活动。Bigquery建议您使用Stackdriver监视您的槽。

Update: Bigquery addresses the problem of query prioritization in one of their blog posts - Truth 5: BigQuery supports query prioritization

更新:Bigquery在他们的博客帖子中解决了查询优先级的问题——事实5:Bigquery支持查询优先级。

#1


2  

There is a limit to the number of slots you can allocate for queries at a particular time.

您可以在特定时间为查询分配的槽数是有限制的。

Some nuggets:

一些掘金:

  • Slot: represents one unit of computational capacity.
  • 槽:表示计算能力的一个单位。
  • Query: Uses as many slots as required so the query runs optimally (Currently: MAX 50 slots for On Demand Price) [A]
  • 查询:根据需要使用尽可能多的槽,以便查询以最佳方式运行(当前:按需价格最多可运行50个槽)[A]
  • Project: The slots used per project is based on the number of queries that run at the same time (Currently: MAX 2000 slots for On Demand Price)
  • 项目:每个项目使用的槽数基于同时运行的查询数(当前:按需价格最多2000个槽)

[A] This is all under the hood without user intervention. BigQuery makes an assessment of the query to calculate the number of slots required.

A .这都是在没有用户干预的情况下进行的。BigQuery对查询进行评估,以计算所需的槽数。

So if you do the math, worst case, if all your queries use 50 slots, you will not find any side effect until you have more than 40 queries running concurrently. Even in those situations, the queries will just be in the queue for a while and will start running after some queries are done executing.

如果你计算一下,最坏的情况,如果你所有的查询都使用了50个槽,那么在你同时运行超过40个查询之前,你不会发现任何副作用。即使在这些情况下,查询也只会在队列中停留一段时间,并在执行一些查询之后开始运行。

Slots become more worrisome when you are time sensitive to getting your data on time and they are run in an environment where:

当您对及时获取数据敏感时,插槽变得更加令人担忧,而且它们运行在以下环境中:

  • A lot of queries are running at the same time.
  • 许多查询同时运行。
  • Most of those queries that are running at the same time usually take a long time to execute on an empty load.
  • 大多数同时运行的查询通常需要很长时间才能在空负载上执行。

The best way to understand whether these limits will impact you or not is by monitoring the current activity within your project. Bigquery advises you to monitor your slots with Stackdriver.

了解这些限制是否会影响您的最佳方法是监视项目中的当前活动。Bigquery建议您使用Stackdriver监视您的槽。

Update: Bigquery addresses the problem of query prioritization in one of their blog posts - Truth 5: BigQuery supports query prioritization

更新:Bigquery在他们的博客帖子中解决了查询优先级的问题——事实5:Bigquery支持查询优先级。