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?
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 COMMANDis a classification for all queries not defined asSELECT,UPDATE,INSERT, orDELETE, in Query Insights.This
UTILITY COMMANDalso includes maintenance operations likeVACUUMand table commands likeCREATE,DROP, andCOPY.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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With