CCNA Pcdoe Manage Databases Questions

75 of 175 questions · Page 1/3 · Pcdoe Manage Databases topic · Answers revealed

1
MCQhard

A company has a Cloud Bigtable cluster using HDD storage. They are migrating to a workload that requires lower latency, so they need to switch to SSD storage. How should they accomplish this?

A.Add more nodes to the existing cluster to improve latency.
B.Export data to Avro files, create a new SSD cluster, and import the data.
C.Modify the existing cluster's storage type to SSD using the Cloud Console.
D.Create a new Bigtable cluster with SSD storage in the same instance, replicate data, then delete the old cluster.
AnswerD

Correct approach: create new cluster, replicate, switch traffic, delete old.

Why this answer

Option D is correct because Cloud Bigtable does not support in-place conversion of storage type from HDD to SSD. The proper migration path is to create a new cluster with SSD storage within the same instance, enable replication to keep data synchronized, and then delete the old HDD cluster. This approach minimizes downtime and ensures data consistency.

Exam trap

Cisco often tests the misconception that you can change the storage type of an existing cluster via the console or that exporting/importing is the only option, when in fact replication-based migration within the same instance is the recommended and least disruptive method.

How to eliminate wrong answers

Option A is wrong because adding more nodes to an HDD cluster improves throughput and reduces hotspotting but does not change the underlying storage latency; HDDs still have higher read/write latency than SSDs. Option B is wrong because exporting to Avro files and importing into a new SSD cluster is possible but introduces significant downtime and operational complexity compared to using replication within the same instance. Option C is wrong because Cloud Bigtable does not allow modifying the storage type of an existing cluster; the storage type is fixed at cluster creation and cannot be changed via the Cloud Console or any API.

2
Multi-Selecthard

A company is using Bigtable for real-time analytics and notices that some queries are experiencing high latency. They suspect a hot spot due to a row key design that uses a monotonically increasing value. Which two actions should they take to diagnose and mitigate the hot spottedness? (Choose TWO.)

Select 2 answers
A.Increase the number of nodes to spread the load
B.Redesign the row key to include a hash prefix or a field that distributes writes evenly
C.Create a Bigtable table with a different column family
D.Use Key Visualiser in the Google Cloud console to analyse row key distribution
E.Switch from HDD to SSD storage type
AnswersB, D

A more distributed row key avoids hot spots.

Why this answer

Key Visualiser helps identify hot spots by showing row key distribution. Prefixing the row key with a field that distributes writes (like a hash prefix) is a common mitigation strategy.

3
MCQeasy

A team needs to monitor CPU utilization on Cloud SQL databases and receive an alert when it exceeds 80% for more than 5 minutes. Which Google Cloud service should they use?

A.Cloud Monitoring
B.Cloud Audit Logs
C.Active Assist
D.Cloud Logging
AnswerA

Correct. Cloud Monitoring allows creating alerting policies based on metric thresholds.

Why this answer

Cloud Monitoring (formerly Stackdriver Monitoring) is the correct service because it provides built-in metrics for Cloud SQL, including CPU utilization, and allows you to create alerting policies based on threshold conditions (e.g., CPU > 80% for 5 minutes). It integrates directly with Cloud SQL and can trigger notifications via email, Pub/Sub, or other channels when the condition is met.

Exam trap

Cisco often tests the distinction between monitoring (metrics-based alerting) and logging (event-based storage), so candidates mistakenly choose Cloud Logging because they think 'logs' include performance data, but Cloud Monitoring is the dedicated service for metric thresholds and alerting.

How to eliminate wrong answers

Option B (Cloud Audit Logs) is wrong because it records administrative actions and data access events, not real-time performance metrics like CPU utilization; it is used for auditing and compliance, not monitoring thresholds. Option C (Active Assist) is wrong because it provides recommendations for cost optimization, security, and performance (e.g., idle resources), but does not support custom alerting on metric thresholds. Option D (Cloud Logging) is wrong because it stores and analyzes log data (text-based events), not numeric time-series metrics; while logs can be used for debugging, they cannot directly trigger alerts on CPU utilization thresholds without additional metric extraction.

4
MCQmedium

You have a Memorystore for Redis instance that serves as a session store for a web application. The instance is running low on memory and is approaching the maxmemory limit. You want to ensure that the least recently used keys are evicted first when memory is full. Which eviction policy should you configure?

A.allkeys-lru
B.noeviction
C.volatile-lru
D.volatile-ttl
AnswerC

Volatile-lru evicts least recently used keys among those with an expire set. Sessions usually have TTL, so this is the correct policy.

Why this answer

The volatile-lru policy evicts keys with an expire set (TTL) using the LRU algorithm. For a session store, sessions typically have a TTL, so volatile-lru is appropriate. allkeys-lru would evict any key regardless of TTL, which might remove important keys. noeviction would cause write errors when memory is full. volatile-ttl evicts based on TTL, not LRU.

5
MCQhard

A Cloud Bigtable instance is experiencing high read latency due to hot spots. The operations team uses the Key Visualizer tool and identifies that a small set of row keys are being read disproportionately. Which action should they take to mitigate the hot spotting?

A.Increase the number of nodes in the Bigtable cluster to handle the load.
B.Change the storage type from HDD to SSD to improve performance.
C.Redesign the row key scheme to distribute the workload across more tablets.
D.Enable replication across multiple zones.
AnswerC

Row key design is critical. Using a hash or adding a salt prefix spreads reads across nodes.

Why this answer

Option C is correct because hot spotting in Cloud Bigtable is typically caused by a suboptimal row key design that concentrates read/write traffic on a small number of tablets. Redesigning the row key scheme to distribute the workload—for example, by adding a hash prefix or using a more granular key—spreads requests across multiple tablets, alleviating the hotspot. Key Visualizer explicitly identifies the skewed row keys, guiding the redesign effort.

Exam trap

Cisco often tests the misconception that scaling resources (nodes or storage type) can fix design-level hotspots, when in fact the correct answer is always to address the data distribution pattern at the row key level.

How to eliminate wrong answers

Option A is wrong because increasing the number of nodes adds more compute and storage capacity but does not fix the underlying row key design flaw; the hotspot will persist on the same tablets, and additional nodes may even exacerbate the imbalance. Option B is wrong because changing storage from HDD to SSD improves I/O latency but does not address the root cause of uneven data distribution; the hotspot will still concentrate reads on a few tablets. Option D is wrong because enabling replication across zones provides high availability and disaster recovery, but it does not redistribute the row key load; the same hot row keys will still be read disproportionately in each replica.

6
MCQhard

Your Cloud Bigtable instance is experiencing hot spots, causing performance degradation. You want to identify the specific row keys causing the hot spots. Which tool should you use?

A.Cloud Monitoring dashboard
B.Key Visualiser
C.cbt command-line tool
D.Cloud Logging
AnswerB

Key Visualiser is specifically designed to detect hot spots by showing traffic distribution across row keys.

Why this answer

Key Visualiser is a Cloud Bigtable tool that visualises read/write traffic across the row key space, helping identify hot spots (rows with disproportionate traffic). Cloud Monitoring provides overall metrics but not row-level detail. Cloud Logging logs queries but not aggregated heat maps. cbt is the command-line tool for administrative tasks but does not provide visualisation.

7
MCQmedium

A company uses Cloud SQL for PostgreSQL and needs to enable point-in-time recovery (PITR) with a retention period of 14 days. Currently, automated backups are configured with a 7-day retention. What should the engineer do to meet this requirement?

A.Increase the backup retention period to 14 days; PITR is automatically extended.
B.Set the 'transaction log retention' to 14 days in the Cloud SQL instance settings.
C.Note that Cloud SQL for PostgreSQL only supports up to 7 days of PITR retention; consider exporting logs to Cloud Storage for longer recovery.
D.Enable binary logging and set the binary log retention to 14 days.
AnswerC

Correct. The maximum PITR retention is 7 days. For longer retention, export logs to Cloud Storage and use custom scripts for recovery.

Why this answer

Cloud SQL PITR is based on write-ahead log (WAL) archiving. The transaction log retention is set via the 'transaction log retention' setting, not the backup retention. PITR for PostgreSQL in Cloud SQL supports up to 7 days of log retention; 14 days is not supported.

The engineer must accept the limitation or use a different approach.

8
MCQmedium

A Cloud Bigtable instance is experiencing high latency on reads. The operations team suspects a hot spot. Which tool should they use to identify the hot spot?

A.Stackdriver Debugger
B.Bigtable cbt tool
C.Key Visualiser
D.Cloud Monitoring dashboard
AnswerC

Correct. Key Visualiser provides a heatmap of row key access patterns to detect hot spots.

Why this answer

Key Visualizer is the correct tool because it is specifically designed to visualize access patterns in Cloud Bigtable and identify hot spots—regions of a table that receive disproportionate read/write traffic. It generates heatmaps of row key access, allowing operators to pinpoint uneven load distribution that causes high latency.

Exam trap

Cisco often tests the distinction between general monitoring tools (Cloud Monitoring) and purpose-built diagnostic tools (Key Visualizer), trapping candidates who assume any monitoring dashboard can identify hot spots without row-key-level granularity.

How to eliminate wrong answers

Option A is wrong because Stackdriver Debugger is used for inspecting application code state in production, not for analyzing Bigtable access patterns or hot spots. Option B is wrong because the Bigtable cbt tool is a command-line interface for reading/writing data and managing tables, but it does not provide visualization or analysis of access patterns to identify hot spots. Option D is wrong because Cloud Monitoring dashboard provides metrics like latency and throughput but lacks the row-key-level heatmap visualization needed to pinpoint specific hot spot row ranges.

9
Multi-Selectmedium

A company is running a Cloud SQL for MySQL instance and needs to create a read replica in a different region for disaster recovery. They also want to be able to promote the replica to a standalone instance if needed. Which three steps should they take? (Choose THREE.)

Select 3 answers
A.Enable binary logging on the primary instance
B.Set the replica's database flags to enable read-only mode
C.Use gcloud sql instances create <replica-name> --master-instance-name <primary> --region <target-region>
D.Run gcloud sql instances promote-replica <replica-name> to promote it
E.Create the replica in the same region as the primary
AnswersA, C, D

Binary logging must be enabled for replication.

Why this answer

Cross-region replicas are created using the gcloud command with the --region flag and the --master-instance-name pointing to the primary. After creation, replication must be verified. If needed, the replica can be promoted using gcloud sql instances promote-replica.

10
MCQmedium

You are troubleshooting a Cloud SQL read replica that is experiencing high replication lag. You check the 'replication_lag' metric and see it is consistently above 60 seconds. What is the most likely cause of this lag?

A.The replica's automatic storage increase is disabled.
B.The replica has point-in-time recovery enabled.
C.The primary instance has a heavy write workload.
D.The replica is using a different storage type than the primary.
AnswerC

A heavy write load on the primary generates more changes than the replica can apply, causing lag.

Why this answer

Option C is correct because high replication lag in Cloud SQL is most commonly caused by a heavy write workload on the primary instance. When the primary processes a large volume of write operations (e.g., INSERT, UPDATE, DELETE), the replica must replay those changes from the binary log, and if the rate of writes exceeds the replica's ability to apply them, lag accumulates. This is a fundamental behavior of MySQL asynchronous replication, where the replica is always slightly behind the primary under load.

Exam trap

Cisco often tests the misconception that replication lag is caused by replica configuration issues (like storage or PITR) rather than the primary's workload, leading candidates to overlook the most direct and common cause.

How to eliminate wrong answers

Option A is wrong because disabling automatic storage increase on the replica does not directly cause replication lag; it only prevents the replica from automatically expanding its disk when storage runs low, which could lead to replica failure or read-only mode, not lag. Option B is wrong because enabling point-in-time recovery (PITR) on the replica does not cause replication lag; PITR uses transaction logs for backup purposes and does not interfere with the replication process. Option D is wrong because using a different storage type (e.g., SSD vs.

HDD) on the replica may affect read performance but does not inherently cause replication lag, as Cloud SQL replicas can use different storage types without impacting the replication stream.

11
Multi-Selectmedium

A company is using Cloud SQL for MySQL and wants to perform disaster recovery testing by promoting a read replica to a standalone instance. Which TWO actions are required? (Choose 2)

Select 2 answers
A.Stop replication on the replica using the Cloud Console or gcloud.
B.Delete the replica and recreate it as a primary instance.
C.Enable point-in-time recovery on the replica.
D.Disable binary logging on the replica.
E.Promote the replica using the 'promote' action in Cloud Console or gcloud.
AnswersA, E

Correct. Replication must be stopped before promotion.

Why this answer

To promote a read replica to a standalone instance, you must stop replication on the replica and then promote it. The promotion process converts the replica into an independent primary instance.

12
MCQhard

A Firestore database in Native mode has a collection with a composite index on fields (city, age). A new query filters on 'city == 'London' AND 'age > 30' ORDER BY 'name'. The query is slow and reads many documents. What should the engineer do?

A.Remove the ORDER BY clause to improve performance.
B.Create a composite index on (city, name).
C.Create a composite index on (city, age, name).
D.Create a single-field index on 'name'.
AnswerC

This index covers the equality, inequality, and ordering, allowing an efficient merge scan.

Why this answer

The query filters on `city == 'London'` and `age > 30`, then orders by `name`. For Firestore to efficiently satisfy both the equality and inequality filters combined with an `ORDER BY`, the composite index must include the fields in the correct order: equality fields first, then the inequality field, then the sort field. Option C provides the index `(city, age, name)`, which matches this pattern exactly, allowing Firestore to perform a targeted index scan without reading extra documents.

Exam trap

Cisco often tests the misconception that adding any index on the sort field alone (Option D) or on the equality and sort fields (Option B) is sufficient, but the trap is that Firestore requires the inequality filter field to be included in the composite index before the sort field to avoid a full scan.

How to eliminate wrong answers

Option A is wrong because removing `ORDER BY` would only hide the symptom; the query would still need to filter on `city` and `age`, and without a proper index, it would still scan many documents. Option B is wrong because an index on `(city, name)` does not include the `age` field used in the inequality filter, so Firestore would still need to scan all documents matching `city == 'London'` and then filter `age > 30` in memory, causing high read costs. Option D is wrong because a single-field index on `name` does not help with the equality filter on `city` or the inequality filter on `age`, so the query would fall back to a collection scan.

13
Multi-Selecthard

An organisation wants to back up their Cloud Spanner database and store the backup in a different region for disaster recovery. They require the backup to be in a format that can be restored into Spanner with minimal effort. Which THREE actions should they take? (Choose three.)

Select 3 answers
A.Export the database using gcloud spanner databases export to CSV format
B.Specify a different location for the backup at creation time for cross-region storage
C.Use Dataflow to import the backup into a new instance
D.Restore the backup to a new database using gcloud spanner databases restore
E.Create a database-level backup using gcloud spanner databases backup
AnswersB, D, E

Backups can be stored in a different region by specifying the --location flag.

Why this answer

Option B is correct because Cloud Spanner allows you to specify a different location for the backup at creation time, enabling cross-region storage for disaster recovery. This ensures the backup is stored in a separate region, meeting the requirement for geographic redundancy without additional export or import steps.

Exam trap

Cisco often tests the misconception that exporting to CSV or using Dataflow is required for cross-region backup, when in fact Spanner's native backup and restore features handle location specification and restoration directly.

14
MCQmedium

You manage a Memorystore for Redis instance that is regularly hitting its maximum memory limit. The application can tolerate some data loss and prefers to keep the most recently used data. Which eviction policy should you configure?

A.noeviction
B.volatile-lru
C.volatile-ttl
D.allkeys-lru
AnswerB

volatile-lru evicts the least recently used keys among those with an expiry set, matching the requirement.

Why this answer

volatile-lru evicts keys with an expiry set (volatile keys) using an LRU (least recently used) algorithm. This fits the requirement: the application can tolerate loss of expired data, and it prefers to keep recently used data. allkeys-lru would evict any key, which might include important unexpired keys.

15
Multi-Selectmedium

Your organisation uses Cloud Spanner for a globally distributed application. You need to set up a backup strategy that allows restoring the database to a specific point in time within the last 7 days, with minimal impact on performance. Which THREE actions should you take? (Choose THREE.)

Select 3 answers
A.Export the database daily using Dataflow to Cloud Storage.
B.Use gcloud spanner databases import to restore from previous exports.
C.Create full database backups using gcloud spanner backups create and set retention to 7 days.
D.Enable point-in-time recovery (PITR) with a 7-day retention period.
E.Use Cloud Scheduler to trigger regular full backups via gcloud commands.
AnswersC, D, E

Full backups complement PITR and provide a restore baseline.

Why this answer

Spanner supports database-level backups (full backup to GCS), point-in-time recovery (PITR) via the built-in feature (which uses the versioning of Spanner), and export/import for long-term retention. For point-in-time restore within 7 days, PITR is ideal. Also, taking full backups regularly ensures you have a restore point.

Option A (use Cloud Scheduler to trigger backups) automates backups. Option C (enable PITR) is built-in. Option D (perform full backups using gcloud spanner backups create) creates backups.

Option B is not needed if PITR is enabled. Option E is for import/export but is slower.

16
MCQeasy

You need to create a read replica of a Cloud SQL for PostgreSQL instance in a different region for disaster recovery. What must be true about the primary instance to support cross-region replicas?

A.The primary instance must have point-in-time recovery disabled.
B.The primary instance must be using a regional (high-availability) configuration.
C.The primary instance must have the 'cloudsql.logical_decoding' flag set to 'off'.
D.The primary instance must have automated backups enabled.
AnswerB

Cross-region replicas require the primary to be regional (not zonal) to ensure availability during failover.

Why this answer

Cross-region read replicas require the primary instance to have binary logging (for MySQL) or WAL archiving (for PostgreSQL) enabled. Additionally, the primary must be in a regional (not zonal) configuration. For PostgreSQL, this means the primary must have the 'cloudsql.logical_decoding' flag set to 'on' and WAL archiving enabled.

17
MCQeasy

A company is designing a mobile application backend that requires real-time synchronization across users and offline support. Which Google Cloud database service is most suitable?

A.Bigtable
B.Cloud SQL
C.Cloud Spanner
D.Firestore
AnswerD

Correct. Firestore offers real-time listeners and offline data persistence.

Why this answer

Firestore is designed for real-time sync, offline support, and mobile/web applications. It provides real-time listeners and offline data persistence.

18
MCQeasy

A Cloud SQL for MySQL instance is experiencing high CPU utilisation (>80%) and slow query performance. The instance has auto-storage increase enabled. Which step should the engineer take to immediately reduce CPU load?

A.Increase the instance tier to a larger machine type
B.Reduce the max_connections parameter
C.Create a cross-region read replica to offload reads
D.Enable auto-storage increase if not already enabled
AnswerA

Increasing the machine type provides more CPU and memory, directly reducing CPU utilisation.

Why this answer

High CPU utilisation is often due to insufficient compute capacity. Increasing the instance tier (vertical scaling) provides more CPU and memory, reducing load. Enabling auto-storage increase only adds disk space, not compute.

Creating a read replica distributes read traffic but does not help with CPU load on the primary for write-heavy workloads. Adjusting max_connections may help marginally but is not as effective as increasing compute capacity.

19
MCQhard

An organization is using Cloud SQL for MySQL with automated backups enabled. They need to restore a backup to a new instance in a different region for testing. The backup is stored in the same region as the source. How can they achieve this with minimal operational overhead?

A.Use gcloud sql backups restore with the --restore-instance flag pointing to a new instance in the target region.
B.Create a cross-region read replica from the source, then promote it in the target region.
C.Restore the backup directly to a new instance in the target region using the Cloud Console.
D.Restore the backup to a new instance in the same region, then use export/import to move data to the target region.
AnswerD

Export/import is a reliable cross-region data movement method.

Why this answer

Option D is correct because Cloud SQL backups are region-specific and cannot be restored directly to a different region. The minimal-operational-overhead approach is to restore the backup to a new instance in the same region, then use the export/import feature (e.g., SQL dump or CSV) to move the data to the target region. This avoids the complexity and cost of maintaining a cross-region read replica, while still achieving the goal with built-in tools.

Exam trap

Cisco often tests the misconception that Cloud SQL backups are globally accessible and can be restored to any region, when in fact they are region-locked and require an export/import workflow for cross-region data transfer.

How to eliminate wrong answers

Option A is wrong because the `gcloud sql backups restore` command does not support a `--restore-instance` flag; backups can only be restored to an existing instance in the same region, not to a new instance in a different region. Option B is wrong because creating a cross-region read replica and promoting it incurs ongoing replication costs and operational overhead (e.g., managing replication lag, failover), which is not minimal for a one-time testing need. Option C is wrong because the Cloud Console does not allow restoring a backup directly to a new instance in a different region; the restore operation is constrained to the same region as the backup.

20
Multi-Selecthard

Your company runs a global e-commerce platform on Cloud Spanner. You need to capture real-time changes to a table (e.g., orders) and stream them to a downstream analytics pipeline in near real-time. Which TWO Google Cloud features or services should you combine to achieve this? (Choose two.)

Select 2 answers
A.Cloud Functions
B.Dataflow streaming pipeline
C.Cloud Pub/Sub
D.Cloud SQL for PostgreSQL
E.Cloud Spanner change streams
AnswersB, E

Dataflow is the recommended service to read and process Spanner change streams.

Why this answer

Option B is correct because a Dataflow streaming pipeline can consume Cloud Spanner change streams in near real-time, process the data (e.g., transform, filter, aggregate), and write it to a downstream analytics system. Dataflow provides exactly-once processing semantics and auto-scaling, making it ideal for continuous change data capture (CDC) pipelines.

Exam trap

The trap here is that candidates often confuse Cloud Pub/Sub as a required component for streaming, but Cloud Spanner change streams can be read directly by Dataflow without Pub/Sub, making Pub/Sub an unnecessary intermediate step for this specific use case.

21
MCQmedium

A Cloud Firestore database in Native mode is used for a mobile app. The app queries a collection with a composite filter on two fields. Queries are slow and the app shows an error that an index is required. What should the developer do?

A.Use a database export and import to regenerate indexes.
B.Create a composite index in the Firebase Console or gcloud CLI.
C.Restructure the data to use a single field for the filter.
D.Enable the automatic index creation in the Firestore settings.
AnswerB

Composite indexes are manually created and are required for multi-field queries.

Why this answer

Cloud Firestore requires an index to support composite filters (queries filtering on multiple fields). When a query uses a composite filter and no matching index exists, Firestore returns an error indicating an index is required. The correct solution is to create the necessary composite index manually via the Firebase Console or the gcloud CLI, as Firestore does not automatically create composite indexes for queries with equality and range filters on different fields.

Exam trap

Cisco often tests the misconception that Firestore automatically creates all necessary indexes, but in reality, only single-field indexes are auto-created; composite indexes must be manually defined by the developer.

How to eliminate wrong answers

Option A is wrong because exporting and importing the database does not regenerate indexes; it only moves data and existing index definitions, not create new ones. Option C is wrong because restructuring data to use a single field would change the query logic and may not satisfy the app's requirements, and it avoids the proper solution of creating the needed composite index. Option D is wrong because Firestore automatically creates single-field indexes but does not automatically create composite indexes; enabling automatic index creation is not a setting available in Firestore.

22
Multi-Selectmedium

A Memorystore for Redis instance needs to be scaled to handle increased traffic. Which TWO methods can you use? (Choose 2)

Select 2 answers
A.Increase the maxmemory parameter.
B.Change the eviction policy to allkeys-lru.
C.Vertically scale by changing the tier to a larger machine type.
D.Horizontally scale by enabling Redis Cluster (clustering) for sharding.
E.Add read replicas in the same zone.
AnswersC, D

Memorystore supports vertical scaling by changing the tier.

23
MCQmedium

Your Firestore database in Native mode contains a collection with millions of documents. You need to query documents where the 'tags' field (an array) contains the string 'urgent'. What must you ensure in your index configuration?

A.No additional index configuration is required; Firestore automatically creates the necessary index for array fields.
B.Ensure the 'tags' field is not indexed, and then create a composite index with the array-contains filter.
C.Create an index exemption for the 'tags' field to enable array queries.
D.Create a composite index on 'tags' and '__name__' for the collection.
AnswerA

Firestore automatically indexes array fields for array-contains queries.

Why this answer

Firestore automatically creates a single-field index for array fields. However, to query array-contains, you need an index on the field with the array-contains filter. Firestore automatically creates a single-field index for the 'tags' field, so no additional index is needed.

If the query includes additional equality clauses, a composite index may be required, but for a simple array-contains, it's automatic.

24
MCQeasy

A DevOps engineer needs to monitor Cloud SQL for MySQL replication lag on a read replica to ensure data freshness. Which Cloud Monitoring metric should they create an alert on?

A.cloudsql.googleapis.com/database/replication/lag
B.cloudsql.googleapis.com/database/replica/state
C.cloudsql.googleapis.com/database/postgresql/replication/lag
D.cloudsql.googleapis.com/database/mysql/replication/seconds_behind_master
AnswerA

Correct. The metric for replication lag in Cloud SQL is 'replication_lag'.

Why this answer

The metric 'replication_lag' in Cloud SQL measures the seconds behind the primary. Cloud SQL for MySQL uses 'seconds_behind_master' internally, but the exposed metric is 'replication_lag'.

25
MCQeasy

A company is using Memorystore for Redis and needs to persist data across restarts. Which option should they use?

A.Take periodic snapshots and store them in Cloud Storage
B.Enable AOF persistence in Memorystore settings
C.Use a standard tier instance with persistence enabled
D.Enable auto-backup in Memorystore
AnswerA

Snapshots to GCS are the recommended method for persistence.

Why this answer

Memorystore for Redis does not natively support AOF persistence; it relies on periodic RDB snapshots to persist data. By taking these snapshots and storing them in Cloud Storage, you can restore the Redis instance after a restart or failure, ensuring data durability across restarts.

Exam trap

Cisco often tests the misconception that Memorystore supports AOF persistence like self-managed Redis, but in reality, it only supports RDB snapshots for data persistence.

How to eliminate wrong answers

Option B is wrong because Memorystore for Redis does not support AOF (Append-Only File) persistence; it only uses RDB snapshots. Option C is wrong because the standard tier in Memorystore does not include persistence; persistence is only available in the Basic tier (which is not recommended for production) or by manually managing snapshots. Option D is wrong because auto-backup in Memorystore is a feature for backing up configuration and metadata, not for persisting Redis data across restarts.

26
MCQmedium

A company uses Bigtable and wants to change the storage type from HDD to SSD to improve read performance. What must the engineer do to implement this change?

A.Use gcloud bigtable clusters update with the --storage-type flag.
B.Modify the cluster settings and change the storage type to SSD.
C.Export the data to Cloud Storage, create a new SSD cluster, and import the data.
D.Create a new cluster with SSD, replicate data to it, then delete the old cluster.
AnswerD

This is the correct approach. You must create a new cluster with the desired storage type and then migrate.

Why this answer

Bigtable does not support in-place conversion of a cluster's storage type from HDD to SSD. The correct approach is to create a new cluster with SSD storage, configure replication to replicate data from the existing HDD cluster to the new SSD cluster, and then delete the old HDD cluster. This ensures zero downtime and data consistency during the migration.

Exam trap

Cisco often tests the misconception that you can update storage type via a command or UI setting, when in fact Bigtable treats storage type as an immutable cluster property requiring a new cluster and replication-based migration.

How to eliminate wrong answers

Option A is wrong because the gcloud bigtable clusters update command does not support a --storage-type flag; storage type is an immutable property of a cluster and cannot be changed after creation. Option B is wrong because cluster settings do not allow modifying the storage type; attempting to change it in the console or API will result in an error as the storage type is fixed at cluster creation time. Option C is wrong because exporting data to Cloud Storage and re-importing is unnecessary and introduces downtime; Bigtable's replication feature allows seamless migration without manual export/import.

27
MCQmedium

A Memorystore for Redis instance is running out of memory. The application uses a mix of cache and session data. Which eviction policy should be chosen to minimize cache misses while ensuring session data is not evicted?

A.noeviction
B.volatile-ttl
C.allkeys-lru
D.allkeys-random
AnswerB

Evicts only keys with TTL set (cache), leaving session data (no TTL) intact.

Why this answer

The volatile-ttl policy evicts keys with a TTL set, prioritizing those with the shortest remaining TTL. Since session data typically has a TTL and cache data may or may not, this policy allows you to protect session data by assigning it a longer TTL, while cache data with shorter TTLs is evicted first, minimizing cache misses.

Exam trap

Cisco often tests the misconception that allkeys-lru is always the best for cache performance, but here the requirement to protect session data makes volatile-ttl the correct choice because it only evicts keys with TTLs, allowing session data to be preserved by setting a longer TTL.

How to eliminate wrong answers

Option A is wrong because noeviction prevents any eviction, causing write operations to fail with OOM errors when memory is full, which does not resolve the memory pressure. Option C is wrong because allkeys-lru evicts the least recently used key from the entire keyspace, regardless of TTL, so session data with a TTL could be evicted if it is not recently used. Option D is wrong because allkeys-random evicts random keys from the entire keyspace, providing no control over which data is removed, risking eviction of session data and increasing cache misses.

28
MCQhard

A company has a Cloud SQL for MySQL instance with automated backups enabled. They need to restore the database to a specific timestamp from 2 days ago. The backup retention is set to 7 days. How should they perform this restore?

A.Export the database and import it into a new instance
B.Create an on-demand backup and restore from that backup
C.Use gcloud sql instances clone with the --point-in-time flag and the desired timestamp
D.Use gcloud sql instances restore-backup with the backup ID from 2 days ago
AnswerC

Cloning with --point-in-time allows restoration to any timestamp within the binary log retention period.

Why this answer

Option C is correct because Cloud SQL for MySQL supports point-in-time recovery (PITR), which allows you to restore a database to a specific timestamp within the backup retention period (here, 7 days). The `gcloud sql instances clone` command with the `--point-in-time` flag creates a new instance that reflects the database state at the exact requested timestamp, leveraging the transaction logs retained by automated backups.

Exam trap

The trap here is that candidates confuse `gcloud sql instances restore-backup` (which restores from a full backup only) with point-in-time recovery, not realizing that the clone command with `--point-in-time` is the correct method for timestamp-based restores.

How to eliminate wrong answers

Option A is wrong because exporting and importing the database is a manual, full-database dump and restore process that does not support point-in-time recovery; it would only restore to the state at the time of the export, not to a specific timestamp from 2 days ago. Option B is wrong because creating an on-demand backup captures the database state only at the moment the backup is taken, and you cannot restore from that backup to a different timestamp; it does not provide the granularity needed for a point-in-time restore. Option D is wrong because `gcloud sql instances restore-backup` restores from a specific full backup (identified by backup ID), not to a precise timestamp; it would restore the database to the state at the time that backup was taken, which may not match the desired timestamp from 2 days ago.

29
Multi-Selectmedium

A financial services company uses Cloud Spanner for transaction processing. They need to capture real-time changes from the database to stream to a downstream analytics system. Which THREE services or features can achieve this?

Select 3 answers
A.Cloud SQL for PostgreSQL
B.Cloud Pub/Sub
C.Bigtable replication
D.Spanner change streams
E.Cloud Dataflow
AnswersB, D, E

Pub/Sub can deliver change stream events to subscribers.

Why this answer

Cloud Pub/Sub is correct because it is a fully managed real-time messaging service that can ingest and stream change events from Spanner change streams to downstream analytics systems. It provides at-least-once delivery, low latency, and integrates natively with Spanner via change streams to capture row-level mutations.

Exam trap

Cisco often tests the distinction between services that capture changes (Spanner change streams) and services that transport or process those changes (Pub/Sub, Dataflow), leading candidates to mistakenly select services like Bigtable replication or Cloud SQL that serve different purposes.

30
MCQhard

A gaming company uses Cloud Spanner to store player profiles and game state. They need to run a one-time analytic query on historical data that would take minutes and cannot impact production performance. What is the best approach?

A.Create a read-only replica and query it
B.Use the gcloud spanner databases execute-sql command with --query-mode=read-only
C.Export the required data to BigQuery using Dataflow and run the query there
D.Run the query using a read-only transaction with strong reads
AnswerC

Moving data to BigQuery separates analytic workloads from production.

Why this answer

Option C is correct because exporting the data to BigQuery via Dataflow isolates the analytic workload from Cloud Spanner, ensuring zero impact on production performance. Cloud Spanner is designed for transactional workloads, not heavy analytic queries that take minutes, and BigQuery is purpose-built for such analytics. This approach also avoids consuming Spanner's CPU or memory resources, which could degrade real-time game state operations.

Exam trap

Cisco often tests the misconception that read-only replicas or transactions are fully isolated from production performance, but in Cloud Spanner they still share instance resources and can cause degradation under sustained analytic queries.

How to eliminate wrong answers

Option A is wrong because a read-only replica in Cloud Spanner still shares the same underlying instance resources (CPU, memory) and can experience performance degradation under heavy analytic queries, impacting production. Option B is wrong because the gcloud spanner databases execute-sql command with --query-mode=read-only still executes the query on the primary Spanner instance, consuming resources and potentially affecting production performance. Option D is wrong because a read-only transaction with strong reads still runs on the primary Spanner instance and can cause contention or resource exhaustion, especially for long-running queries.

31
MCQmedium

A data analytics company uses Bigtable for high-throughput writes. They notice that some rows are receiving a disproportionate number of reads and writes, causing performance degradation. Which tool should they use to identify and resolve this hot spotting issue?

A.cbt tool
B.Cloud Logging
C.Key Visualiser
D.Cloud Monitoring
AnswerC

Key Visualiser is the correct tool to identify hot spotting by visualising row key access patterns.

Why this answer

Key Visualizer is the correct tool because it is specifically designed to analyze Bigtable access patterns and visualize hot spotting—where a small number of rows or row ranges receive a disproportionate share of reads and writes. It provides heatmaps and time-series graphs that pinpoint the exact keys causing performance degradation, enabling you to redesign your row keys or implement salting to distribute load evenly.

Exam trap

The trap here is that candidates confuse Cloud Monitoring (general metrics) with Key Visualizer (specialized Bigtable access pattern analysis), assuming any monitoring tool can diagnose hot spots, but only Key Visualizer provides the key-level heatmap required for this specific Bigtable issue.

How to eliminate wrong answers

Option A is wrong because the cbt tool is a command-line interface for interacting with Bigtable (e.g., creating tables, reading/writing data), but it does not provide any built-in analysis or visualization of access patterns to identify hot spots. Option B is wrong because Cloud Logging captures operational logs (e.g., errors, requests) but does not offer the specialized heatmap or key-level analysis needed to detect and resolve hot spotting in Bigtable. Option D is wrong because Cloud Monitoring provides metrics and alerts for overall system health (e.g., CPU, latency), but it lacks the granular, key-range-specific visualization that Key Visualizer offers for diagnosing hot spots.

32
MCQmedium

A company runs a Cloud SQL for PostgreSQL instance that is nearing its storage limit of 500 GB. The database administrator needs to increase storage capacity online without any downtime. What should they do?

A.Use the gcloud sql instances patch command with --storage-size flag
B.Enable automatic storage increase and wait for it to trigger
C.Delete and recreate the instance with a larger disk
D.Shut down the instance, increase the disk size, and restart
AnswerA

Correct. The gcloud sql instances patch command can resize storage online.

Why this answer

Option A is correct because the `gcloud sql instances patch` command with the `--storage-size` flag allows you to increase the storage capacity of a Cloud SQL for PostgreSQL instance online without any downtime. Cloud SQL supports live storage increases by automatically resizing the underlying persistent disk while the instance remains available, so no restart or maintenance window is required.

Exam trap

Cisco often tests the misconception that storage increases require a restart or downtime, but Cloud SQL supports online storage scaling via the gcloud command, making options that involve shutdown or recreation incorrect.

How to eliminate wrong answers

Option B is wrong because enabling automatic storage increase only triggers when the instance reaches a predefined threshold (typically 90% of current capacity), and it increases storage in small increments (e.g., 10 GB), which may not be sufficient to immediately address a near-limit situation and could still risk downtime if the threshold is crossed unexpectedly. Option C is wrong because deleting and recreating the instance would cause complete downtime and data loss unless a backup is restored, which is not a zero-downtime solution. Option D is wrong because shutting down the instance to increase disk size introduces downtime, which violates the requirement of no downtime; Cloud SQL does not require a shutdown for storage increases.

33
MCQmedium

A company uses Cloud Spanner for a global inventory application. They need to add a new index to a large table without downtime. What is the recommended approach?

A.Create the index using ALTER TABLE with 'ONLINE' clause
B.Use gcloud spanner databases ddl update with --async flag
C.Take a backup, create index on a new instance, and switch traffic
D.Use CREATE INDEX; Spanner handles it as a non-blocking operation
AnswerD

Spanner perform index creation as a background operation that does not block writes.

Why this answer

Option D is correct because Cloud Spanner's CREATE INDEX operation is inherently non-blocking; it performs the index backfill as a background process without locking the table or blocking reads and writes. This allows the index to be added to a large table with zero downtime, as Spanner manages the consistency and availability of the data throughout the operation.

Exam trap

Cisco often tests the misconception that Cloud Spanner requires special syntax or flags (like ONLINE or --async) to achieve non-blocking DDL, when in fact all DDL operations in Spanner are designed to be non-blocking by default.

How to eliminate wrong answers

Option A is wrong because Cloud Spanner does not support an 'ONLINE' clause in ALTER TABLE; that syntax is specific to Oracle and other databases, not Spanner. Option B is wrong because the --async flag in gcloud spanner databases ddl update merely returns immediately without waiting for the DDL operation to complete, but the underlying CREATE INDEX operation is still the same non-blocking mechanism; the flag does not change the blocking behavior—it only affects the client-side wait. Option C is wrong because taking a backup and creating an index on a new instance is unnecessary overhead; Spanner's native non-blocking index creation eliminates the need for such a cumbersome migration, which would also introduce potential data inconsistency and extended downtime during traffic switch.

34
MCQhard

A team is using Firestore in Native mode. They have a collection 'users' with an array field 'roles'. They need to query all users where roles contains 'admin'. What index configuration is required?

A.Create a single-field index on roles with ascending order.
B.Create an index exemption on the 'roles' field.
C.Create a composite index on roles and the default field.
D.No index is needed; Firestore automatically supports array-contains queries.
AnswerB

Correct. An index exemption is required for array fields to support array-contains queries.

Why this answer

Firestore supports array membership queries using the 'array-contains' operator. An index exemption for the array field is required because Firestore does not automatically index array fields for array-contains queries. The exemption is created manually.

35
Multi-Selecthard

A Cloud Bigtable instance is configured with asynchronous replication across two regions for disaster recovery. The team needs to ensure that read-after-write consistency is maintained within a region. Which three strategies should they implement? (Choose THREE.)

Select 3 answers
A.After writing, have the application wait for a confirmation that the write is durable before performing a read.
B.Use single-cluster routing for read/write operations within the primary region.
C.Disable replication and use only the primary cluster.
D.Use multi-cluster routing to distribute reads across regions.
E.Monitor replication lag metrics to ensure replicas are up to date.
AnswersA, B, E

Application-level confirmation ensures consistency.

Why this answer

Option A is correct because in Cloud Bigtable, writes are acknowledged only after they are committed to the tablet server's log and replicated to the underlying Colossus file system. By waiting for this confirmation before performing a read, the application ensures that the read will see the latest write, providing read-after-write consistency within the region.

Exam trap

The trap here is that candidates confuse asynchronous replication with eventual consistency and assume that monitoring replication lag alone can guarantee read-after-write consistency, when in fact only application-level write confirmation and single-cluster routing provide that guarantee within a region.

36
MCQmedium

A company uses Cloud SQL for PostgreSQL and wants to create a cross-region read replica for disaster recovery (DR) purposes. They also want the option to promote the replica to a standalone instance in the event of a regional outage. What should the engineer do?

A.Export the database as a SQL file and import it into a new instance in the target region during DR.
B.Create a cross-region read replica and use gcloud sql instances promote-replica to promote it during DR.
C.Create a same-region read replica and enable point-in-time recovery on it.
D.Configure cross-region backup replicas and restore from backup in the target region.
AnswerB

This is the correct approach. Cross-region replica provides DR, and promotion makes it a standalone instance.

Why this answer

Option B is correct because Cloud SQL for PostgreSQL supports cross-region read replicas, which can be promoted to standalone instances using the `gcloud sql instances promote-replica` command. This provides a managed DR solution with minimal data loss (asynchronous replication) and faster failover compared to export/import or backup restore methods.

Exam trap

Cisco often tests the distinction between read replicas (which can be promoted for DR) and backups (which require manual restore), leading candidates to mistakenly choose backup-based options like D or export/import like A.

How to eliminate wrong answers

Option A is wrong because exporting and importing a SQL file is a manual, time-consuming process that does not provide near-real-time replication, leading to significant data loss and longer recovery time objectives (RTO). Option C is wrong because a same-region read replica does not protect against a regional outage; it only provides read scalability and high availability within the same region. Option D is wrong because Cloud SQL does not support 'cross-region backup replicas'; backups are regional and must be manually copied or restored to another region, which is slower and less automated than a cross-region read replica promotion.

37
MCQhard

A financial services company uses Cloud Spanner for a globally distributed application. They need to add a new column to an existing table that contains billions of rows. The change must not cause any downtime or performance degradation. How should the engineer implement this schema change?

A.Use ALTER TABLE ADD COLUMN; Spanner applies the change online without downtime.
B.Export the table, modify the schema in a temporary table, and import it back.
C.Use CREATE INDEX to add the column as an index.
D.Create a new table with the additional column, backfill data from the old table, then rename the tables.
AnswerA

Correct. Spanner's DDL is online and non-blocking.

Why this answer

Cloud Spanner supports online schema changes via the `ALTER TABLE ADD COLUMN` statement, which applies the change asynchronously without locking the table or causing downtime. Spanner uses a multi-phase approach to add columns, allowing reads and writes to continue uninterrupted while the schema change propagates across all nodes and regions.

Exam trap

Cisco often tests the misconception that schema changes on large distributed databases require manual backfill or table recreation, but Spanner's online DDL handles this transparently without downtime.

How to eliminate wrong answers

Option B is wrong because exporting and re-importing a table with billions of rows would cause significant downtime and performance degradation, defeating the requirement for zero downtime. Option C is wrong because `CREATE INDEX` does not add a column; it creates an index on existing columns, and adding a column requires `ALTER TABLE`. Option D is wrong because creating a new table, backfilling data, and renaming tables would require complex coordination and likely cause downtime or data inconsistency, whereas Spanner's native `ALTER TABLE` handles the change online without such manual steps.

38
Multi-Selectmedium

A company wants to migrate from an on-premises MySQL database to Cloud SQL. They need to minimize downtime and ensure data consistency. Which two steps should they include in the migration plan? (Choose TWO.)

Select 2 answers
A.Create a read replica in the same region for validation before cutover
B.Use Cloud SQL's import functionality to load a mysqldump file
C.Set up continuous replication from the on-premises database to the Cloud SQL instance using Database Migration Service
D.Take a consistent snapshot of the on-premises database at the time of cutover
E.Disable binary logging on the on-premises database to reduce overhead
AnswersC, D

DMS supports continuous replication to minimize downtime.

Why this answer

Option C is correct because Database Migration Service (DMS) supports continuous replication using MySQL binary logs, enabling a near-zero-downtime migration by keeping the Cloud SQL instance synchronized with the on-premises database until cutover. Option D is correct because taking a consistent snapshot (e.g., using mysqldump with --single-transaction or a storage-level snapshot) at cutover ensures data consistency and provides a fallback point if the migration fails.

Exam trap

Cisco often tests the misconception that a simple import/export (like mysqldump) is sufficient for minimal downtime, but the key is that continuous replication (via DMS) is required to keep the target synchronized during the migration window.

39
MCQhard

A company uses Cloud Spanner and needs to export a full database to Cloud Storage in a format that preserves both the schema and data for long-term archival. The export must be restorable into a new Spanner database later. Which export method should they use?

A.Use gcloud spanner databases backup create to create a backup that is stored in Cloud Storage.
B.Use gcloud spanner databases export to export the data to Cloud Storage in CSV format.
C.Use Dataflow to read the Spanner tables and write them to Cloud Storage as Parquet files.
D.Use gcloud spanner databases restore to copy the database to a new instance.
AnswerA

This creates a managed backup in Cloud Storage in Avro + Protobuf format, suitable for archival and restore.

Why this answer

Cloud Spanner provides managed database-level backups that export the database to Cloud Storage in Avro format with a Protobuf schema. This format preserves schema and data and can be restored via the backup restore feature. Import/export using Dataflow is slower and more complex for full database archival.

The gcloud spanner databases export command uses Dataflow and is not the recommended approach for backups. Cloud console also initiates the backup process.

40
MCQeasy

A Cloud Memorystore for Redis instance needs to ensure data is not lost during a maintenance event. The team decides to enable persistence. However, Memorystore does not support Redis persistence. What is the recommended alternative?

A.Use the Standard tier with replication and take regular snapshots to Cloud Storage using a scheduled script.
B.Migrate to Cloud SQL for MySQL and use its backup feature.
C.Enable AOF persistence in Memorystore.
D.Increase the maxmemory setting and rely on the allkeys-lru eviction policy.
AnswerA

Standard tier provides replication; snapshots to Cloud Storage provide persistency.

Why this answer

Cloud Memorystore for Redis does not support native Redis persistence (RDB or AOF). To prevent data loss during maintenance events, the recommended alternative is to use the Standard tier (which provides replication and automatic failover) and supplement it with scheduled snapshots exported to Cloud Storage. This approach ensures a durable backup outside the Redis instance that can be restored if needed.

Exam trap

Cisco often tests the misconception that Memorystore supports all native Redis features, including persistence commands like BGSAVE or CONFIG SET appendonly yes, when in fact these are explicitly disabled in the managed service.

How to eliminate wrong answers

Option B is wrong because Cloud SQL for MySQL is a relational database, not an in-memory cache, and migrating to it would fundamentally change the architecture and performance characteristics of the application. Option C is wrong because Cloud Memorystore for Redis does not support AOF persistence; enabling it is not possible in the managed service. Option D is wrong because increasing maxmemory and relying on the allkeys-lru eviction policy only manages memory usage under pressure, it does not provide any durability or persistence to prevent data loss during maintenance events.

41
Multi-Selectmedium

A company uses Cloud SQL for MySQL with automated backups enabled. They want to ensure they can recover their database in the event of a regional outage. Which TWO actions should they take? (Choose two.)

Select 2 answers
A.Increase the backup retention period to 30 days.
B.Create a cross-region read replica.
C.Enable cross-region backup replicas.
D.Enable point-in-time recovery with a 7-day retention.
E.Schedule more frequent on-demand backups.
AnswersB, C

A cross-region read replica can be promoted to a standalone instance in the event of a regional outage.

Why this answer

Option B is correct because a cross-region read replica in Cloud SQL for MySQL provides a standby copy of the database in a different region, which can be promoted to a primary instance during a regional outage, enabling recovery with minimal data loss. Option C is correct because cross-region backup replicas (also known as cross-region backup copies) allow backups to be stored in a separate region, ensuring that backup data survives a regional disaster and can be used to restore the database in another region.

Exam trap

Cisco often tests the distinction between high-availability features (like read replicas) and disaster recovery features (like cross-region backups), and the trap here is that candidates confuse point-in-time recovery or increased retention within a single region as sufficient for regional disaster recovery, when they only protect against local failures or accidental data loss.

42
MCQmedium

A Memorystore for Redis instance is experiencing out-of-memory errors, causing keys to be evicted. The application relies on all keys being present. The current maxmemory-policy is allkeys-lru. What should the engineer do to prevent evictions?

A.Change the eviction policy to noeviction.
B.Change the eviction policy to volatile-lru.
C.Enable persistence to Cloud Storage to offload memory.
D.Scale up the instance to a higher tier with more memory.
AnswerA

noeviction prevents eviction; writes will fail instead of losing keys.

Why this answer

With noeviction policy, Redis will return errors instead of evicting keys, preserving all data. However, writes may fail if memory is full. A better solution is to increase memory or use a cluster.

43
MCQmedium

A Cloud SQL for PostgreSQL read replica is experiencing replication lag of several minutes. You need to reduce the lag. What is the most effective solution?

A.Disable automated backups on the primary to free up resources.
B.Promote the replica to a standalone instance and recreate the replica.
C.Increase the CPU and memory of the read replica to speed up applying changes.
D.Increase the CPU and memory of the primary instance.
AnswerC

Replica lag can be reduced by scaling up the replica to handle the write load.

Why this answer

Option C is correct because replication lag in Cloud SQL for PostgreSQL read replicas is often caused by the replica being unable to keep up with the rate of write-ahead log (WAL) apply from the primary. Increasing the CPU and memory of the read replica directly improves its ability to replay WAL records faster, reducing the lag. This is the most effective solution as it addresses the bottleneck at the replica side without impacting the primary instance.

Exam trap

Cisco often tests the misconception that replication lag is always a primary-side issue, leading candidates to incorrectly choose scaling the primary (Option D) instead of identifying the replica as the bottleneck.

How to eliminate wrong answers

Option A is wrong because disabling automated backups on the primary does not directly affect replication lag; backups run independently and do not consume resources that would significantly impact WAL generation or replication throughput. Option B is wrong because promoting the replica to a standalone instance and recreating it would cause downtime and data loss, and does not address the underlying cause of lag; it is a disruptive workaround, not a solution. Option D is wrong because increasing the CPU and memory of the primary instance may improve its write performance but does not help if the replica is the bottleneck; replication lag is typically a replica-side issue where the replica cannot apply changes as fast as the primary generates them.

44
Multi-Selectmedium

A company is running a production Cloud SQL for PostgreSQL instance and wants to implement point-in-time recovery (PITR) with a 7-day retention window. They also need to ensure that automated backups are taken daily. Which two configurations must be enabled? (Choose TWO.)

Select 2 answers
A.Set the database flag 'archive_mode' to 'on' for WAL archiving
B.Enable binary logging by setting 'log_bin' flag
C.Configure automated backups via Cloud SQL backup settings
D.Create a cross-region backup replica
E.Set the backup retention to 7 days using gcloud sql instances patch --backup-start-time
AnswersA, C

WAL archiving is required for PITR in PostgreSQL.

Why this answer

PITR requires WAL archiving, which is enabled by setting the 'archive_mode' to 'on' (or 'always') in the database flags. Automated backups are scheduled via the backup configuration in Cloud SQL. The retention period for PITR is set separately under backup settings.

45
MCQeasy

A team is using Cloud SQL for PostgreSQL and wants to monitor replication lag on their read replicas. Which metric should they use?

A.cloudsql.googleapis.com/database/replication/lag
B.cloudsql.googleapis.com/database/network/received_bytes_count
C.cloudsql.googleapis.com/database/disk/bytes_used
D.cloudsql.googleapis.com/database/cpu/utilization
AnswerA

This metric directly shows the replication lag in seconds.

Why this answer

Cloud SQL provides a metric called 'replication_lag' for read replicas, which measures the time (in seconds) the replica is behind the primary. CPU utilisation and disk usage are for performance, not replication. For PostgreSQL, the metric is valid.

46
MCQhard

A company uses Firestore in Native mode. They have a collection with 1 million documents and frequently run queries that filter on two fields: status and createdAt. The queries are slow. What should the team do?

A.Create a composite index on (status, createdAt)
B.Create an index exemption for the status field
C.Use the Datastore mode instead
D.Add an index exemption for the createdAt field
AnswerA

Composite indexes are required for queries on multiple fields to be efficient.

Why this answer

Firestore creates single-field indexes automatically but for multi-field queries, a composite index must be created manually. Without it, queries may be slow or fail.

47
Multi-Selectmedium

A company is using Cloud SQL for PostgreSQL and needs to perform a disaster recovery drill by promoting a read replica to a standalone instance. They also need to ensure the replica is as current as possible before promotion. Which TWO steps should they take? (Choose two.)

Select 2 answers
A.Promote the replica using gcloud sql instances promote-replica
B.Enable binary logging on the replica
C.Check the replication_lag metric on the replica to confirm it is within acceptable range
D.Create an on-demand backup of the primary before promotion
E.Force a failover to the replica
AnswersA, C

Promotion converts the read replica into a standalone instance.

Why this answer

Option A is correct because `gcloud sql instances promote-replica` is the standard command to promote a Cloud SQL read replica to a standalone instance, making it a primary that can accept writes. Option C is correct because checking the `replication_lag` metric ensures the replica has applied all pending changes from the primary before promotion, minimizing data loss. This step is critical because promoting a replica that is behind can result in lost transactions.

Exam trap

The trap here is that candidates confuse promoting a read replica with performing a failover in a high-availability cluster, leading them to select 'Force a failover to the replica' instead of the correct promotion command.

48
MCQmedium

A company has a Cloud SQL for PostgreSQL instance with a read replica in another region. They want to perform disaster recovery testing without affecting the primary. What should they do?

A.Promote the read replica to a standalone instance and use it for testing.
B.Use the replica as a failover target; testing is not allowed.
C.Enable point-in-time recovery on the replica and restore to a new instance.
D.Create a clone of the primary instance and test on that.
AnswerA

Promoting the replica makes it an independent instance, suitable for DR testing.

Why this answer

Promoting the read replica to a standalone instance detaches it from the primary, creating an independent writable Cloud SQL instance. This allows you to perform disaster recovery testing (e.g., failover validation, data integrity checks) without any impact on the primary instance, as the replica no longer replicates changes from the primary.

Exam trap

The trap here is that candidates assume read replicas are permanently read-only and cannot be used for testing, or they confuse promoting a replica with cloning the primary, which would impact the primary's performance.

How to eliminate wrong answers

Option B is wrong because Cloud SQL read replicas can be promoted to standalone instances for testing; there is no restriction that 'testing is not allowed' — the misconception is that replicas are read-only and cannot be used for write operations, but promotion makes them writable. Option C is wrong because point-in-time recovery (PITR) is a feature of the primary instance, not directly on a read replica; you cannot enable PITR on a replica and restore to a new instance — you would need to restore from the primary's backups or use the replica's data after promotion. Option D is wrong because creating a clone of the primary instance would require the primary to be online and could cause additional load or replication lag; the correct approach is to use the already-existing read replica to avoid any impact on the primary.

49
MCQmedium

An organization runs a Cloud SQL for MySQL instance for its e-commerce platform. During a load test, they notice the CPU utilization consistently exceeds 80% and queries are slowing down. The instance is using 2 vCPUs. The team needs to improve performance with minimal downtime. What should they do?

A.Increase the number of vCPUs and memory via vertical scaling
B.Create a cross-region read replica
C.Enable automatic storage increase
D.Shard the database using application-level sharding
AnswerA

Vertical scaling adds more CPU and memory, directly addressing high CPU utilization. Cloud SQL supports this online.

Why this answer

Increasing vCPUs and memory vertically (scaling up) is the quickest way to improve CPU-bound performance with minimal downtime. Cloud SQL supports online vertical scaling. Read replicas are for read offloading, not CPU-bound write performance.

Auto-storage increase addresses storage, not CPU.

50
MCQhard

A development team uses Cloud Spanner and needs to add a new index to a table with 10 TB of data. They require that the operation does not block writes or cause downtime. Which approach should they take?

A.Create a new table with the index and batch copy data from the original table.
B.Schedule a maintenance window, then create the index during the window.
C.Execute 'CREATE INDEX' statement; Spanner will build the index in the background without blocking.
D.Drop the table and recreate it with the index, then restore from backup.
AnswerC

Spanner supports non-blocking index creation.

Why this answer

In Cloud Spanner, CREATE INDEX is a non-blocking operation. It can be executed online while the database remains available for reads and writes. Option A is correct.

Option B (batch updates) is unnecessary. Option C (maintenance window) is incorrect because Spanner handles online schema changes. Option D (drop and recreate) causes downtime.

51
MCQhard

A Cloud Spanner database is experiencing high CPU utilization (above 80%). The team wants to add an index to optimize a frequently used query. The schema change must not cause downtime. How should they proceed?

A.Export the database, create the index in a new instance, then import.
B.Use gcloud spanner databases ddl update with --async flag.
C.Stop the application, run the DDL statement, then restart.
D.Create the index using the Google Cloud Console; it will be applied online.
AnswerD

Spanner supports online schema changes, including index creation, without downtime.

Why this answer

Spanner supports online schema changes; CREATE INDEX is non-blocking and can be executed via DDL without downtime.

52
Multi-Selecthard

A company runs Memorystore for Redis with a Standard tier instance. They want to scale to higher throughput and memory capacity beyond the current tier limits. Which TWO actions should they take?

Select 2 answers
A.Switch from HDD to SSD storage.
B.Enable Redis Cluster to shard data across multiple nodes.
C.Add a cross-region replica to increase read capacity.
D.Increase the maxmemory setting beyond the tier limit.
E.Upgrade to a larger tier (e.g., from M5 to M10).
AnswersB, E

Redis Cluster allows horizontal scaling.

Why this answer

Redis Cluster shards data across multiple nodes, allowing horizontal scaling beyond the limits of a single Standard tier instance. This enables higher throughput and memory capacity by distributing the dataset across multiple primary nodes, each handling a subset of the keyspace.

Exam trap

Cisco often tests the distinction between vertical scaling (upgrading tier) and horizontal scaling (sharding), and candidates may mistakenly think that increasing maxmemory or adding replicas can overcome tier limits, when in fact replicas do not increase total memory capacity and maxmemory is bounded by the instance's physical RAM.

53
MCQhard

You are responsible for a Cloud Spanner instance that serves a global user base. A new feature requires adding an index on a column of an existing table that contains millions of rows. The table is actively used by production traffic. What is the recommended approach to add the index with minimal impact?

A.Create a second table with the index already defined, then copy the data using batch writes and switch traffic. This avoids any impact to the original table.
B.Take a full database backup to Cloud Storage, restore it to a new instance, create the index on the restored instance, and then fail over to the new instance.
C.Use the gcloud command 'gcloud spanner databases ddl update' with an ALTER TABLE statement to add the index. This will lock the table briefly but is acceptable.
D.Use the gcloud command 'gcloud spanner databases ddl update' with a CREATE INDEX statement. The operation will be non-blocking and will not impact production traffic.
AnswerD

Correct. CREATE INDEX in Spanner is an online, non-blocking operation.

Why this answer

Cloud Spanner supports online, non-blocking index creation. The CREATE INDEX statement processes the index in the background and does not block reads or writes on the table. This is the most efficient and least impactful method.

Using a backup/restore or export/import is unnecessarily complex and disruptive.

54
MCQmedium

A company uses Cloud SQL for MySQL to run an e-commerce application. They need to ensure that they can recover the database to any point within the last 4 days. They also want to minimize storage costs. Which configuration should they use?

A.Enable automated backups with a 4-day retention schedule.
B.Enable binary logging with the 'log_bin' flag and set the transaction log retention to 4 days in the backup configuration.
C.Enable binary logging and set the transaction log retention to 4 days. Disable automated backups.
D.Enable point-in-time recovery by setting the 'point_in_time_recovery' flag to true with a 4-day window.
AnswerB

Correct configuration for PITR with 4-day retention.

Why this answer

Point-in-time recovery (PITR) in Cloud SQL for MySQL requires binary logging, which can be enabled with the 'log_bin' flag. The transaction log retention period can be set from 1 to 7 days. For 4-day recovery, set the retention to 4 days.

Option C is correct: enable binary logging and set retention to 4 days. Option A is wrong because automated backups alone only restore to backup time, not any point. Option B is wrong because disabling binary logs prevents PITR.

Option D is wrong because the retention is set via the backup configuration, not a separate flag.

55
MCQmedium

A startup uses Memorystore for Redis as a session store. They are concerned about losing session data if the instance fails. Which option provides the best durability for session data without significant application changes?

A.Increase the maxmemory setting to store more data
B.Take regular snapshots of the instance using gcloud commands
C.Enable Redis persistence (RDB/AOF) on the Memorystore instance
D.Configure a cross-region replica to provide high availability
AnswerD

Cross-region replicas provide failover capability, protecting against zone/regional failures with minimal application changes.

Why this answer

Option D is correct because configuring a cross-region replica in Memorystore for Redis provides high availability and durability by replicating data asynchronously to a replica instance in a different region. If the primary instance fails, the replica can be promoted, minimizing session data loss without requiring significant application changes, as the application continues to connect to the same endpoint or a new primary endpoint.

Exam trap

Cisco often tests the misconception that enabling persistence (RDB/AOF) provides high availability and durability against instance failures, when in reality persistence only protects against data loss on restart and does not provide automatic failover or cross-region resilience.

How to eliminate wrong answers

Option A is wrong because increasing the maxmemory setting only allows more data to be stored in memory but does not provide any durability or protection against data loss if the instance fails; it simply expands the available memory capacity. Option B is wrong because taking regular snapshots using gcloud commands is a manual, external backup process that does not provide automatic failover or real-time durability; it introduces operational overhead and potential data loss between snapshots, and it requires application changes to handle failover. Option C is wrong because enabling Redis persistence (RDB/AOF) on a Memorystore instance provides local disk-based persistence but does not protect against instance-level failures (e.g., zone or regional outages) and can introduce performance overhead; it also does not offer automatic failover, and the application would still experience downtime during recovery.

56
Multi-Selecthard

A company is using Memorystore for Redis as a session store. They need to scale horizontally to handle increasing traffic and ensure high availability with automatic failover. Which TWO actions should they take?

Select 2 answers
A.Create multiple standalone instances and route traffic manually
B.Use Persistent Disk for data persistence
C.Enable Redis Cluster mode (sharding)
D.Use the Standard tier with replication
E.Use the Basic tier
AnswersC, D

Redis Cluster distributes data across multiple shards for horizontal scaling.

Why this answer

Memorystore for Redis supports sharding for horizontal scaling, and standard tier provides replication with automatic failover.

57
MCQmedium

A company uses Memorystore for Redis with the 'volatile-lru' eviction policy. They notice that recently added keys with TTL are being evicted even though there is still memory available. What is the most likely cause?

A.The volatile-lru policy evicts only keys with an expiry set, and there are many keys without expiry occupying memory
B.The allkeys-lru policy would be more appropriate
C.The maxmemory setting is not configured
D.The maxmemory-policy is misconfigured
AnswerA

volatile-lru evicts only keys with TTL. If many non-volatile keys consume memory, volatile keys may be evicted even if overall memory appears free.

Why this answer

The 'volatile-lru' eviction policy in Memorystore for Redis evicts only keys that have a TTL (expiry) set, using an LRU (Least Recently Used) algorithm among those keys. If many keys without expiry are consuming memory, the eviction process will still target only the volatile keys, even if overall memory is not fully exhausted, because the policy is constrained to evict only from the subset of keys with TTLs. This explains why recently added keys with TTL are being evicted prematurely — the non-volatile keys are 'protected' from eviction, forcing the eviction of volatile keys to free memory.

Exam trap

Cisco often tests the misconception that 'volatile-lru' evicts all keys when memory is low, when in fact it only evicts keys with TTLs, leaving non-volatile keys untouched even if they are consuming the majority of memory.

How to eliminate wrong answers

Option B is wrong because 'allkeys-lru' would evict any key (including those without expiry) based on LRU, which would not specifically cause the eviction of recently added TTL keys if memory is still available; the issue here is that non-volatile keys are occupying memory and not being evicted, not that the policy is too aggressive. Option C is wrong because if 'maxmemory' were not configured, Redis would use unlimited memory and no eviction would occur at all, contradicting the observation that eviction is happening. Option D is wrong because the 'maxmemory-policy' is correctly set to 'volatile-lru' as stated; the misconfiguration is not in the policy itself but in the understanding that this policy only evicts volatile keys, which is the intended behavior.

58
MCQmedium

A company uses Firestore in Native mode for their application. They need to query a collection where documents must match a specific field value and be sorted by a different field. The query filters on 'status' and orders by 'timestamp'. What should the engineer do to ensure the query performs optimally?

A.Create an index exemption to improve query performance.
B.Use a collection group query to bypass index requirements.
C.Rely on automatic single-field indexes; they will cover the query.
D.Create a composite index on the 'status' and 'timestamp' fields.
AnswerD

A composite index is required for queries with both an equality filter and an order by on different fields.

Why this answer

Option D is correct because Firestore requires a composite index when a query includes both an equality filter on one field (status) and an order by clause on a different field (timestamp). Without this composite index, Firestore cannot efficiently satisfy both the filter and the sort order in a single index scan, leading to suboptimal performance or query failure. Creating a composite index on (status, timestamp) allows Firestore to use a single index to match the filter and return results in the requested order.

Exam trap

Cisco often tests the misconception that automatic single-field indexes are sufficient for all queries, but the trap here is that queries combining an equality filter and an order by on different fields always require a composite index.

How to eliminate wrong answers

Option A is wrong because index exemptions do not exist in Firestore; the concept of index exemptions applies to other Google Cloud services like BigQuery, not Firestore. Option B is wrong because collection group queries are used to query across all collections with the same name, not to bypass index requirements; they still require appropriate indexes. Option C is wrong because automatic single-field indexes only cover queries that filter or order by a single field; a query with both a filter on one field and an order by on a different field requires a composite index.

59
MCQeasy

You need to monitor the disk usage of your Cloud SQL instances and receive an alert when disk usage exceeds 80%. Which GCP service should you use to set up this alert?

A.Cloud Monitoring
B.Cloud Audit Logs
C.Cloud Logging
D.Cloud Billing reports
AnswerA

Cloud Monitoring provides metrics and alerting for Cloud SQL disk usage.

Why this answer

Cloud Monitoring (formerly Stackdriver) is the GCP service for monitoring metrics and setting up alerting policies. Cloud Logging is for logs, Cloud Audit Logs for audit trails, and Cloud Billing reports for cost tracking.

60
MCQmedium

A company uses Cloud Bigtable to store session data. They need to monitor replication lag between clusters in different zones. Which metric should they use?

A.Instance-level 'replication_lag' metric.
B.Cluster-level 'cpu_load' metric.
C.Use Key Visualizer to identify replication delays.
D.Table-level 'rows_returned' metric.
AnswerA

Correct. Replication lag is measured in seconds and available in Cloud Monitoring.

Why this answer

Option A is correct because Cloud Bigtable exposes an instance-level 'replication_lag' metric that measures the time delay (in seconds) between clusters in a replicated instance. This metric directly reflects how far behind a replica cluster is relative to the primary cluster, making it the appropriate choice for monitoring replication lag between zones.

Exam trap

Cisco often tests the distinction between metrics that measure performance (like CPU load) versus metrics that measure data freshness (like replication lag), and candidates may confuse Key Visualizer's diagnostic capabilities with real-time monitoring metrics.

How to eliminate wrong answers

Option B is wrong because 'cpu_load' is a cluster-level metric that measures CPU utilization, not replication lag; it does not indicate how current a replica is. Option C is wrong because Key Visualizer is a tool for analyzing access patterns and hotspotting, not for monitoring real-time replication lag; it provides historical heatmaps, not a continuous lag metric. Option D is wrong because 'rows_returned' is a table-level metric that counts rows returned by read requests, which has no relation to replication delay between clusters.

61
Multi-Selectmedium

A company uses Cloud Spanner for a global application. They need to capture real-time changes to certain tables for downstream processing. Which two services or features can be used together to achieve this? (Choose TWO.)

Select 2 answers
A.Spanner change streams
B.Cloud Pub/Sub Lite
C.Cloud SQL for PostgreSQL
D.Cloud Functions
E.Cloud Dataflow
AnswersA, E

Change streams provide a log of row-level changes.

Why this answer

Spanner change streams capture transactional changes in near real-time. Dataflow can read from change streams and stream the changes to downstream systems like Pub/Sub, BigQuery, or Cloud Storage.

62
MCQmedium

An engineer needs to restore a Cloud Spanner database from a backup that was taken 2 hours ago. The backup is stored in Cloud Storage. What steps are required?

A.Use gcloud spanner databases restore --backup=<backup-id> --destination-database=<db-name>
B.Create a new instance and use gcloud spanner instances restore.
C.Use gcloud spanner databases import from the Cloud Storage backup file.
D.Restore is not possible; you must use point-in-time recovery.
AnswerA

Correct. Restore from backup to a new database using the backup ID.

Why this answer

Cloud Spanner backups are stored within the instance's allocated storage, not directly in Cloud Storage. To restore, you use the backup ID (created via gcloud or console) and restore to a new database. Import/export is a different mechanism.

63
Multi-Selecteasy

A development team is using Firestore in Native mode. They want to ensure that queries on array fields return correct results. Which two actions should they take? (Choose TWO.)

Select 2 answers
A.Create a composite index for every query involving array fields.
B.Set index exemptions for arrays and maps to disable automatic indexing.
C.Use the 'array-contains' operator only on indexed arrays.
D.Manually create indexes for each array field in the Firestore console.
E.Understand that array fields are automatically indexed as single-field indexes.
AnswersB, E

Index exemptions allow you to control which fields are indexed, which can improve write performance and reduce costs.

Why this answer

Firestore automatically creates single-field indexes including for array fields. However, if a query uses array-contains-any, a composite index may be needed. Index exemptions can be used to exclude certain fields from automatic indexing to control costs.

64
Multi-Selectmedium

A company uses Memorystore for Redis and wants to achieve high availability with automatic failover. They also need to periodically back up the data to Cloud Storage for disaster recovery. Which TWO features should they use? (Choose two.)

Select 2 answers
A.Standard Tier (replication)
B.Export functionality to Cloud Storage
C.Redis Cluster
D.AOF persistence
E.Basic Tier
AnswersA, B

Standard Tier provides a replica in a different zone for automatic failover.

Why this answer

Standard Tier (replication) provides a primary-replica architecture with automatic failover, ensuring high availability. The Export functionality allows you to manually or scheduled export Redis data to Cloud Storage, enabling point-in-time recovery for disaster recovery purposes.

Exam trap

Cisco often tests the distinction between high-availability features (replication/failover) and durability/backup features (persistence/export), tricking candidates into selecting AOF persistence or Redis Cluster as solutions for disaster recovery to Cloud Storage.

65
MCQmedium

An engineer needs to create a cross-region read replica for a Cloud SQL for MySQL instance to improve read scalability and provide disaster recovery. What must be configured on the primary instance to support cross-region replication?

A.Enable binary logging on the primary instance.
B.Enable automated backups and point-in-time recovery.
C.Configure a Cloud VPN between the regions.
D.Set the primary instance to use MySQL 8.0.
AnswerA

Correct. Binary logging is required for any replication, especially cross-region.

Why this answer

Cross-region replication for Cloud SQL for MySQL relies on MySQL's native binary log (binlog) based replication. Enabling binary logging on the primary instance records all data changes in binary log files, which the read replica in another region uses as the source for applying changes. Without binary logging enabled, the primary instance cannot provide the change stream necessary for cross-region replication to function.

Exam trap

Cisco often tests the misconception that network connectivity (like VPN) or backup features are required for replication, when in fact the core requirement is enabling the binary log on the primary instance to provide the change stream.

How to eliminate wrong answers

Option B is wrong because automated backups and point-in-time recovery are not prerequisites for replication; they are separate features for data recovery and do not provide the ongoing change stream needed for replication. Option C is wrong because Cloud SQL cross-region replication uses Google's internal network and does not require a Cloud VPN; the replication traffic traverses Google's backbone, not a customer-managed VPN tunnel. Option D is wrong because MySQL 8.0 is not a requirement for cross-region replication; Cloud SQL supports replication for MySQL 5.7 and 8.0, and the version must be compatible between primary and replica, but the key enabler is binary logging, not the specific major version.

66
MCQmedium

A Cloud SQL for MySQL instance is running out of storage. The team wants to increase storage automatically without manual intervention. However, they also want to control costs and avoid a sudden increase in storage beyond 1 TB. What should they do?

A.Set up a Cloud Function to monitor disk usage and resize the disk when needed.
B.Enable auto-storage increase and set the maximum storage size to 1 TB.
C.Manually increase disk size by 10% each time usage reaches 80%.
D.Enable auto-storage increase; it automatically stops at 1 TB.
AnswerB

Auto-increase with a cap meets both requirements.

Why this answer

Cloud SQL offers 'auto-storage increase' feature that automatically adds storage in increments when usage is high. To cap the growth, set the maximum storage size. Option C is correct.

Option A (automatic increase without cap) could exceed 1 TB. Option B (manual resize) is not automatic. Option D (increase disk size) is manual and not automatic.

67
MCQmedium

A Cloud Bigtable instance is experiencing high read latency. The team suspects hot spotting on a single node. Which tool should they use to identify the hotspot?

A.Cloud Logging to review request logs
B.Key Visualizer
C.Bigtable Admin API to list tables
D.Cloud Monitoring (Stackdriver) to check CPU utilization
AnswerB

Key Visualizer provides heatmaps of reads/writes to detect hot spots.

Why this answer

Key Visualizer is the correct tool because it is specifically designed to analyze access patterns in Cloud Bigtable and identify hot spotting—where a small range of row keys receives a disproportionate amount of traffic. It visualizes read and write heatmaps across row key space and time, allowing teams to pinpoint the exact keys causing the hotspot. Unlike general-purpose monitoring tools, Key Visualizer provides row-key-level granularity essential for diagnosing hot spotting.

Exam trap

Cisco often tests the distinction between general-purpose monitoring tools (Cloud Monitoring, Cloud Logging) and purpose-built diagnostic tools (Key Visualizer), trapping candidates who assume any monitoring tool can identify row-key-level hotspots.

How to eliminate wrong answers

Option A is wrong because Cloud Logging captures request logs at the instance level, but it does not provide row-key-level heatmaps or access pattern analysis needed to identify hot spotting; it is useful for debugging errors, not visualizing key distribution. Option C is wrong because the Bigtable Admin API is used for administrative operations like creating, listing, or deleting tables and clusters, not for monitoring real-time access patterns or detecting hotspots. Option D is wrong because Cloud Monitoring (Stackdriver) can show CPU utilization metrics, which may indicate overall load but cannot reveal which specific row keys are causing the hotspot; high CPU could be due to many factors unrelated to key distribution.

68
MCQmedium

An application uses Cloud Firestore. The team notices that queries on a collection with an array field are slow. They want to create an index on the array field. What should they do?

A.Create a collection group index on the field.
B.Create a composite index on the array field and another field.
C.Create an index exemption for the array field.
D.Rely on the automatically created single-field index.
AnswerC

Index exemptions enable array indexing.

Why this answer

Option C is correct because Cloud Firestore does not support single-field indexes on array fields; instead, it automatically creates array indexes for equality queries. However, to optimize queries involving array fields, you can create an index exemption to exclude the automatic array index and then manually define a composite index that includes the array field. This allows you to control indexing behavior and improve query performance for specific use cases.

Exam trap

Cisco often tests the misconception that array fields can be indexed like other fields, leading candidates to choose composite index options, but Firestore's indexing rules explicitly prohibit array fields in composite indexes, requiring an index exemption approach instead.

How to eliminate wrong answers

Option A is wrong because a collection group index is used for queries that span multiple collections with the same name, not for indexing array fields. Option B is wrong because composite indexes in Firestore cannot include an array field as part of the index; array fields are only indexed for equality queries using the automatic array index. Option D is wrong because Firestore does not automatically create single-field indexes for array fields; it only creates an automatic array index for equality queries, which may not be sufficient for performance optimization.

69
MCQmedium

A company runs a Cloud Bigtable instance with SSD storage and wants to switch to HDD storage to reduce costs. The instance cannot tolerate downtime for data migration. What is the correct approach?

A.Create a new Cloud Bigtable cluster with HDD storage and migrate data
B.Increase the number of nodes to reduce per-node cost
C.Add a cross-region replica and then promote it with HDD storage
D.Use the gcloud bigtable clusters update command to change storage type
AnswerA

To change storage type, you must create a new cluster with the desired type and migrate the data.

Why this answer

Option A is correct because Cloud Bigtable does not support in-place conversion of storage type from SSD to HDD. The only way to switch storage without downtime is to create a new cluster with HDD storage, then use a replicated setup (e.g., via a replication cluster or application-level dual-write) to migrate data while the original cluster remains operational. This ensures zero downtime during the migration.

Exam trap

The trap here is that candidates assume a simple update command or replica promotion can change storage type, but Cloud Bigtable does not allow in-place storage type changes or replication across different storage types, forcing a new cluster creation with data migration.

How to eliminate wrong answers

Option B is wrong because increasing the number of nodes does not change the storage type from SSD to HDD; it only scales throughput and capacity, not the underlying storage medium, so it does not reduce per-node cost in the context of switching to HDD. Option C is wrong because cross-region replication in Cloud Bigtable requires both clusters to use the same storage type (SSD or HDD); you cannot add a replica with a different storage type and then promote it, as replication is not supported across different storage types. Option D is wrong because the gcloud bigtable clusters update command does not support changing the storage type; it can only modify node count or other cluster settings, not the underlying storage medium.

70
MCQmedium

A Cloud Spanner database is experiencing increased read traffic. You need to add an index to improve query performance without downtime. What is the correct approach?

A.Export the database, create the index in a new instance, then import.
B.Use the ALTER TABLE statement to add the index as a constraint.
C.Create a secondary index using the 'CREATE INDEX WITH OFFLINE' option to avoid blocking.
D.Use the CREATE INDEX statement. Spanner creates indexes online without blocking writes or reads.
AnswerD

Spanner supports online index creation; the index is built in the background without downtime.

71
MCQhard

You are running a Memorystore for Redis instance with persistence disabled. The application requires high availability and data durability after a zone failure. What is the most cost-effective approach?

A.Use a Basic tier instance and schedule periodic exports to Cloud Storage.
B.Enable persistence using the AOF or RDB configuration in Memorystore.
C.Use a Standard tier instance with cross-zone replication.
D.Deploy a Redis Cluster across multiple regions using Memorystore.
AnswerC

Standard tier provides Multi-Zone replication for HA; data is replicated across zones.

Why this answer

Option C is correct because Standard tier Memorystore for Redis instances provide cross-zone replication by default, ensuring automatic failover and data durability in the event of a zone failure. This meets the high availability and data durability requirements without the need for manual exports or complex multi-region setups, making it the most cost-effective solution.

Exam trap

The trap here is that candidates often confuse data persistence (AOF/RDB) with high availability (cross-zone replication), leading them to choose Option B, which only addresses durability after a crash, not zone failure recovery.

How to eliminate wrong answers

Option A is wrong because Basic tier instances are single-zone and lack replication, so they cannot provide high availability or data durability after a zone failure; periodic exports to Cloud Storage only provide point-in-time recovery, not automatic failover. Option B is wrong because enabling AOF or RDB persistence in Memorystore only protects against data loss from restarts or crashes, not against zone failures, and it does not provide cross-zone high availability. Option D is wrong because deploying a Redis Cluster across multiple regions introduces significant complexity, higher latency, and increased cost due to inter-region traffic and multi-region replication, which is overkill for a single zone failure scenario.

72
MCQeasy

A game development company wants to use Memorystore for Redis as a session store. They need to ensure that when memory is full, the least recently used keys are evicted first. Which eviction policy should they configure?

A.volatile-lru
B.allkeys-lru
C.volatile-ttl
D.noeviction
AnswerB

This evicts the least recently used keys from the entire keyspace, which matches the requirement.

Why this answer

Option B (allkeys-lru) is correct because the requirement is to evict the least recently used keys from the entire keyspace when memory is full. The 'allkeys-lru' policy applies the LRU algorithm to all keys, regardless of whether they have an expiry set, which matches the need to evict the least recently used keys first across the entire dataset.

Exam trap

Cisco often tests the distinction between 'volatile-lru' and 'allkeys-lru', trapping candidates who assume that session stores always use TTL-based keys and thus choose 'volatile-lru', but the requirement explicitly states 'least recently used keys' without restricting to keys with expiry.

How to eliminate wrong answers

Option A (volatile-lru) is wrong because it only evicts keys with an expiry set (volatile keys), but the requirement is to evict from all keys, not just those with TTL. Option C (volatile-ttl) is wrong because it evicts keys with the shortest remaining TTL, not the least recently used keys, which does not satisfy the LRU requirement. Option D (noeviction) is wrong because it returns errors on write operations when memory is full, rather than evicting any keys, which would break the session store functionality.

73
MCQmedium

A company runs an e-commerce application on Cloud SQL for MySQL. They need to recover the database to a specific point in time 15 minutes ago after an accidental data deletion. What must be configured beforehand?

A.Create a cross-region replica for failover
B.Enable automated backups only
C.Configure binary logging and set a PITR retention period
D.Set up an on-demand backup every hour
AnswerC

Binary logging is required for PITR, and the retention period determines how far back you can recover.

Why this answer

Point-in-time recovery (PITR) in Cloud SQL for MySQL relies on binary logging (binlog) to capture all write operations. To recover to a specific moment (e.g., 15 minutes ago), you must enable automated backups (which provide the base restore point) and configure binary logging with a retention period that covers the desired recovery window. Option C correctly specifies both requirements: binary logging must be enabled, and a PITR retention period (e.g., 1–7 days) must be set to retain the necessary binlog files for replay.

Exam trap

Cisco often tests the misconception that automated backups alone are sufficient for point-in-time recovery, but candidates must recognize that binary logging and a PITR retention period are required to replay transactions beyond the last snapshot.

How to eliminate wrong answers

Option A is wrong because a cross-region replica provides disaster recovery and failover capability, not the granular transaction logs needed for point-in-time recovery; it does not enable binlog-based PITR. Option B is wrong because enabling automated backups alone only creates daily backup snapshots; without binary logging, you can only restore to the time of the last backup, not to a specific minute. Option D is wrong because on-demand backups are manual snapshots taken at a specific moment; they do not provide continuous transaction log replay, so you cannot recover to an arbitrary point between backups.

74
MCQmedium

You have a Cloud Bigtable instance with a single cluster. To improve availability and durability, you want to enable replication across two regions. After configuring replication, you notice that reads from the replica cluster show data that is not yet consistent with the primary. What is the expected consistency model for Bigtable replication?

A.Read-your-writes consistency from the primary
B.Eventually consistent reads from replicas
C.Strongly consistent reads from any cluster
D.Strict serializability across clusters
AnswerB

Bigtable uses async replication, so replicas are eventually consistent. This is the expected behavior.

Why this answer

Cloud Bigtable replication uses an eventually consistent model for reads from replica clusters. When you write to the primary cluster, the data is asynchronously replicated to the replica cluster using a distributed replication pipeline. This means that reads from the replica cluster may return stale data until the replication process completes, and there is no guarantee of immediate consistency with the primary.

Exam trap

Cisco often tests the misconception that replication in Bigtable provides strong consistency across all clusters, similar to a synchronous replication setup, when in fact it is eventually consistent and only the primary cluster guarantees strong consistency.

How to eliminate wrong answers

Option A is wrong because read-your-writes consistency is a property of the primary cluster, not of replicas; Bigtable does not guarantee that a write to the primary is immediately visible from the replica. Option C is wrong because strongly consistent reads are only guaranteed from the primary cluster, not from any cluster; replicas provide only eventual consistency. Option D is wrong because strict serializability is not supported across clusters in Bigtable replication; replication is asynchronous and does not provide global ordering or serializability.

75
MCQhard

You are managing a Cloud SQL for PostgreSQL instance with point-in-time recovery (PITR) enabled. The retention period is set to 7 days. A developer accidentally dropped a critical table 3 days ago. You need to restore the database to the state just before the table was dropped, without affecting the current production instance. What should you do?

A.Enable binary logging and reconfigure PITR retention to 10 days, then wait for the logs to catch up.
B.Use the gcloud sql backups create command to create an on-demand backup, then restore the original instance to that backup.
C.Use the gcloud sql instances clone command with the --point-in-time flag to clone the instance to a new instance at the timestamp just before the table was dropped.
D.Use the gcloud sql instances restore-backup command to restore the original instance to the backup from 3 days ago.
AnswerC

Cloning with --point-in-time creates a new instance restored to that exact timestamp, preserving the original instance. This is the correct procedure.

Why this answer

Option C is correct because the gcloud sql instances clone command with the --point-in-time flag allows you to create a new Cloud SQL instance that is a clone of the original at a specific timestamp. Since PITR is enabled and the retention period is 7 days, you can specify a timestamp just before the table was dropped (3 days ago) to restore the database to that exact state without affecting the current production instance. This approach meets the requirement of restoring to a point in time without overwriting the original instance.

Exam trap

The trap here is that candidates may confuse the clone command with the restore-backup command, thinking they must restore the original instance to a previous backup, but the question explicitly requires not affecting the current production instance, making clone the correct choice.

How to eliminate wrong answers

Option A is wrong because binary logging is not a configurable setting in Cloud SQL for PostgreSQL (it uses PostgreSQL's WAL archiving for PITR, not MySQL-style binary logs), and increasing retention to 10 days does not help recover a table dropped 3 days ago without restoring from a backup or clone. Option B is wrong because creating an on-demand backup captures the current state, not the state from 3 days ago, so restoring to that backup would not recover the dropped table. Option D is wrong because restoring the original instance to a backup from 3 days ago would overwrite the current production instance, which violates the requirement to not affect the current production instance.

Page 1 of 3 · 175 questions totalNext →

Ready to test yourself?

Try a timed practice session using only Pcdoe Manage Databases questions.

CCNA Pcdoe Manage Databases Questions — Page 1 of 3 | Courseiva