Cloud SQL 的查询见解“UTILITY COMMAND”成本

发布于 2025-01-12 07:47:53 字数 475 浏览 3 评论 0 原文

托管在 GCP 上的 Postgres 12.8 集群(1 个写入器,1 个读取器)。

每当我在“READER 实例上”出现 CPU 峰值并深入“查询见解”进行昂贵的查询时,每次成本最高的操作都是 UTILITY COMMAND。

我搜索 UTILITY COMMAND 并只得到 this

有人可以指导我如何深入了解“UTILITY COMMAND”以及如何降低 READER 实例的成本吗?

Postgres 12.8 cluster(1 writer, 1 reader) hosted on GCP.

Whenever I got a CPU spike 'On READER instance' and dig-in 'Query Insights' for costly queries, every time the most costly operation is UTILITY COMMAND.

I searched for UTILITY COMMAND and only got this

Can someone guide me how to dig inside 'UTILITY COMMAND' and how to make it less costly on READER instance?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

一袭白衣梦中忆 2025-01-19 07:47:53

这个问题很久以前就发布过。由于很难在 Google Cloud SQL Query Insights 中获取有关 UTILITY COMMAND 的信息,因此我将发布一个答案。
根据谷歌技术支持:

UTILITY COMMAND 是所有未定义为 SELECTUPDATEINSERT删除,在查询见解中。

UTILITY COMMAND还包括诸如VACUUM之类的维护操作以及诸如CREATEDROP和<代码>复制

所以这不是一个需要避免的问题,这是一组不同的查询,而不是上面显示的查询和维护操作,所有这些都在一个地方。

我在此处的 GitHub 线程中找到了此内容。

由于 Cloud SQL 是 Google 的托管服务,我想我们无法采取太多措施来降低其成本。

This question was posted a long time ago. Since it is hard to get information about UTILITY COMMAND in Google Cloud SQL Query Insights, I am going to post an answer.
According to Google technical support:

The UTILITY COMMAND is a classification for all queries not defined as SELECT, UPDATE, INSERT, or DELETE, in Query Insights.

This UTILITY COMMAND also includes maintenance operations like VACUUM and table commands like CREATE, DROP, and COPY.

So this is not an issue to be avoided, this is a group of different queries instead of the ones shown above and maintenance operations, all in just one place.

I found this on a GitHub thread on an issue here.

Since Cloud SQL is a managed service by Google, I guess there is not much that we can do to reduce its cost.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文