Flashcardsfor IT Certifications

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.

Last updated: · Report an error on this page

Show all 11 Slow Queries, Locking & Missing Indexes practice questions and answers
  1. What is Query Insights?
    Tool to find and diagnose slow queries, load and query plans (Cloud SQL, AlloyDB, Spanner).
  2. How do you find slow queries in MySQL?
    Enable the slow query log (slow_query_log, long_query_time flags).
  3. How do you log slow queries in PostgreSQL?
    log_min_duration_statement flag.
  4. How do you examine a query plan?
    EXPLAIN / EXPLAIN ANALYZE (or query plans in Query Insights).
  5. What indicates a missing index?
    Full table scans on large tables in query plans.
  6. What is the index advisor?
    Recommends indexes to improve slow queries.
  7. How do you identify locks in PostgreSQL?
    pg_locks and pg_stat_activity.
  8. Spanner lock troubleshooting?
    Lock insights and transaction insights.
  9. What causes lock contention?
    Long transactions or many transactions updating the same rows.
  10. How do you reduce lock contention?
    Shorter transactions, proper indexes and avoiding hot rows.
  11. What is a deadlock?
    Two transactions waiting on each other's locks; one is aborted.