🔍

PCDBE — questions

Page 9 of 9 · 170 total questions.

Topic 1 · Question 161

You are using Memorystore for Redis to cache frequently accessed data and improve your application’s performance. In the event of a complete regional outage, the application will failover to another region. You want to ensure that the Memorystore instance in the new region does not start from an empty cache after failover. What should you do?

  • AUse Memorystore Standard Tier. Disable read replicas.
  • BUse Memorystore Standard Tier. Configure at least one read replica.
  • CSchedule exports of the Memorystore instance. Specify a dual-region Cloud Storage bucket as the export destination. (correct answer)
  • DEnable Redis RDB snapshots for Memorystore.
Reveal answer & explanation
Correct answer: C

The correct answer is C. Option C: Schedule exports of the Memorystore instance. Specify a dual-region Cloud Storage bucket as the export destination.

Explanation

Cloud Storage provides durable, scalable object storage that is fully managed. Memorystore provides managed in-memory Redis/Memcached caching to reduce latency and offload databases.

Topic 1 · Question 162

Your company is using a multi-region Spanner instance. The instance stores data from an application which does a lot of writes without reading the data. You are noticing a lot of latency regression. You want to reduce latency and improve performance. What should you do?

  • AEnable leader-aware routing in the client library. (correct answer)
  • BAdd additional indexes to the table.
  • CDisable leader-aware routing in the client library.
  • DIncrease the number of Spanner nodes.
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: Enable leader-aware routing in the client library.

Topic 1 · Question 163

You are designing a new ecommerce application on Google Cloud. You expect high and bursty write volumes during peak sales periods. You need to configure Spanner to ensure consistent database performance during this sales period. What should you do?

  • AImplement sharding to distribute the write load across multiple Spanner instances.
  • BConfigure read-only transactions to improve read performance during peak periods.
  • CUse interleaved tables to reduce the number of cross-node transactions.
  • DEnable autoscaling in the Spanner instance, and set the maximum number of nodes to match the peak write volume. (correct answer)
Reveal answer & explanation
Correct answer: D

The correct answer is D. Option D: Enable autoscaling in the Spanner instance, and set the maximum number of nodes to match the peak write volume.

Explanation

Cloud Spanner is a horizontally scalable, strongly consistent relational database with global reach.

Topic 1 · Question 164

Your application uses a Cloud SQL for MySQL instance. Recently, you have noticed performance degradation during peak hours, leading to slow response times and frustrated users. You suspect that inefficient queries might be contributing to these issues. You want to pinpoint and analyze these problematic queries and pass them to the application team for optimizations. What should you do?

  • AUse the underprovisioned instance recommender.
  • BIncrease the Cloud SQL instance read_buffer_size flag.
  • CEnable and use Query Insights. (correct answer)
  • DCreate a Cloud Monitoring alert based on the database/mysql/queries metric.
Reveal answer & explanation
Correct answer: C

The correct answer is C. Option C: Enable and use Query Insights.

Topic 1 · Question 165

You are migrating your on-premises PostgreSQL database to Spanner. You need to identify a solution for handling existing integer-based table primary keys. You want minimal changes to the applications while also following Google-recommended practices. What should you do?

  • AUse application generated sequential integer values as primary keys.
  • BUpdate default primary key values to max(primary_key) + 1.
  • CUse a UUID function that generates UUID Version 4 values as primary keys.
  • DGenerate values by using BIT_REVERSED_POSITIVE sequences. (correct answer)
Reveal answer & explanation
Correct answer: D

The correct answer is D. Option D: Generate values by using BIT_REVERSED_POSITIVE sequences.

Topic 1 · Question 166

You have a Cloud SQL for MySQL instance with a table of product information including a column of product descriptions. Your application development team is building a customer facing chatbot and would like to find the product that most closely matches a freeform text description provided by the customer. How should you enable this functionality?

  • ACreate a stored procedure that uses a regular expression to match the customer’s search text to values in the product description column.
  • BCreate and populate a column of product description embeddings on the product table and perform an approximate nearest neighbor search using the customer’s search text. (correct answer)
  • CUse the LIKE operator to match the customer’s search text to the product description and return similar rows.
  • DCreate a SQL script that compares the product description and the customer’s search text by using the SOUNDEX function.
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: Create and populate a column of product description embeddings on the product table and perform an approximate nearest neighbor search using the customer’s search text.

Topic 1 · Question 167

You are migrating an on-premises online transactional process (OLTP) PostgreSQL database to Google Cloud. You want to reduce the administrative overhead on database maintenance activities, such as vacuum and memory tuning. You are also planning to introduce analytic use cases in this database. You need the migration to have minimal schema and application changes. What should you do?

  • AUse Spanner with PGAdapter.
  • BUse Cloud SQL for PostgreSQL.
  • CUse AlloyDB for PostgreSQL. (correct answer)
  • DDeploy a self-managed PostgreSQL database on Compute Engine.
Reveal answer & explanation
Correct answer: C

The correct answer is C. Option C: Use AlloyDB for PostgreSQL.

Explanation

AlloyDB is a managed PostgreSQL-compatible database for demanding transactional and analytical workloads.

Topic 1 · Question 168

You are developing a Python application that will connect to AlloyDB for PostgreSQL as the backend datastore. Your organization’s security requirements do not allow the use of usernames and passwords for database authentication. How should you develop your application?

  • AUse any PostgreSQL-compatible Python client. Connect to the AlloyDB cluster by using Identity-Aware Proxy (IAP).
  • BUse the AlloyDB Python connector. Use automated IAM authentication for connectivity. (correct answer)
  • CUse the AlloyDB Python connector. Enforce SSL connectivity to AlloyDB by using the gcloud alloydb instance update command with the --ssl-mode=ENCRYPTED_ONLY option.
  • DUse any PostgreSQL-compatible Python client. Use a service account name and credential as the username and password respectively during connection.
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: Use the AlloyDB Python connector. Use automated IAM authentication for connectivity.

Explanation

AlloyDB is a managed PostgreSQL-compatible database for demanding transactional and analytical workloads. Cloud IAM grants fine-grained, least-privilege access to Google Cloud resources.

Topic 1 · Question 169

Your company is migrating from an on-premises database to a single-region Spanner instance. The current database supports 40,000 reads each second, and 7,000 writes each second, at 1 KB row sizes at peak. You need to determine the most cost-effective size for the Spanner instance to handle the equivalent current workload. What should you do?

  • ASelect a 4-node Spanner instance. (correct answer)
  • BSelect a 6-node Spanner instance.
  • CSelect a 1-node Spanner instance.
  • DRecommend a multi-region Spanner instance.
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: Select a 4-node Spanner instance.

Explanation

Cloud Spanner is a horizontally scalable, strongly consistent relational database with global reach. This option delivers the requirement at the lowest cost.

Topic 1 · Question 170

Your e-learning platform runs on a Cloud SQL for PostgreSQL instance (16 VCPUs, 60 GB memory and 1TB SSD) serving users in North America. Your analytics team runs complex reporting queries that often consume 80% of CPU resources, causing slow response times for student transactions during peak hours. Current workload includes 8,000 transactions per second with 60% reads and 40% writes. The reporting queries involve JOIN operations across multiple large tables with millions of rows requiring highly efficient analytical processing. The platform also experiences sudden spikes in analytical reporting demand, requiring an elastic scaling of read capacity. You need to improve the query performance for your analytics team to run their reports efficiently without impacting transactional users. You also need to plan for future traffic growth. What should you do?

  • AUpgrade to Cloud SAL for PostgreSQL Enterprise Edition and route transaction and analytical queries to the primary instance.
  • BMigrate to AlloyDB for PostgreSQL and upgrade the machine type of the primary instance to 32 vCPU. Create materialized views for common analytical queries.
  • CMigrate to AlloyDB for PostgreSQL with a 16 vCPU primary instance and enable columnar engine for analytical workloads, using read pools for query isolation. (correct answer)
  • DUpgrade the Cloud SQL for PostgreSQL instance to db-n1-highmem-32 and implement connection pooling with PgBouncer to handle increased load.
Reveal answer & explanation
Correct answer: C

The correct answer is C. Option C: Migrate to AlloyDB for PostgreSQL with a 16 vCPU primary instance and enable columnar engine for analytical workloads, using read pools for query isolation.

Explanation

AlloyDB is a managed PostgreSQL-compatible database for demanding transactional and analytical workloads. This option decouples the components so they scale independently and absorb load spikes.

Showing questions 161170 of 170 · Page 9 of 9