D2: Slow Queries, Locking & Missing Indexes
Google Cloud Professional Cloud Database Engineer exam practice questions · 11 flashcards
Question
What is Query Insights?
1 / 11
Tip: Space flips the card, ← / → navigate.
Show all 11 Slow Queries, Locking & Missing Indexes practice questions and answers
- What is Query Insights?Tool to find and diagnose slow queries, load and query plans (Cloud SQL, AlloyDB, Spanner).
- How do you find slow queries in MySQL?Enable the slow query log (slow_query_log, long_query_time flags).
- How do you log slow queries in PostgreSQL?log_min_duration_statement flag.
- How do you examine a query plan?EXPLAIN / EXPLAIN ANALYZE (or query plans in Query Insights).
- What indicates a missing index?Full table scans on large tables in query plans.
- What is the index advisor?Recommends indexes to improve slow queries.
- How do you identify locks in PostgreSQL?pg_locks and pg_stat_activity.
- Spanner lock troubleshooting?Lock insights and transaction insights.
- What causes lock contention?Long transactions or many transactions updating the same rows.
- How do you reduce lock contention?Shorter transactions, proper indexes and avoiding hot rows.
- What is a deadlock?Two transactions waiting on each other's locks; one is aborted.