nerdexam
Google

PROFESSIONAL-CLOUD-DATABASE-ENGINEER · Question #18

You are starting a large CSV import into a Cloud SQL for MySQL instance that has many open connections. You checked memory and CPU usage, and sufficient resources are available. You want to follow…

The correct answer is A. Close idle connections or restart the instance before beginning the import operation. When Cloud SQL for MySQL has many open connections, each connection holds allocated memory and can compete for resources during a long-running import operation. Even if overall CPU and memory appear sufficient, connection overhead and lock contention can cause the import to…

Optimizing Database Performance

Question

You are starting a large CSV import into a Cloud SQL for MySQL instance that has many open connections. You checked memory and CPU usage, and sufficient resources are available. You want to follow Google-recommended practices to ensure that the import will not time out. What should you do?

Options

  • AClose idle connections or restart the instance before beginning the import operation.
  • BIncrease the amount of memory allocated to your instance.
  • CEnsure that the service account has the Storage Admin role.
  • DIncrease the number of CPUs for the instance to ensure that it can handle the additional import

How the community answered

(34 responses)
  • A
    71% (24)
  • B
    9% (3)
  • C
    18% (6)
  • D
    3% (1)

Explanation

When Cloud SQL for MySQL has many open connections, each connection holds allocated memory and can compete for resources during a long-running import operation. Even if overall CPU and memory appear sufficient, connection overhead and lock contention can cause the import to time out. The Google-recommended practice is to close idle connections or restart the instance before starting the import, freeing those resources. Option B (more memory) is unnecessary since resources are already sufficient. Option C (Storage Admin role) is about permissions, not timeouts - and the required role for Cloud SQL imports from GCS is Storage Object Viewer, not Storage Admin. Option D (more CPUs) is also unnecessary since CPU is not the bottleneck identified.

Topics

#Cloud SQL for MySQL#Database Import#Connection Management#Performance Tuning

Community Discussion

No community discussion yet for this question.

Full PROFESSIONAL-CLOUD-DATABASE-ENGINEER Practice