Bird
0
0

Why does PostgreSQL use concurrency control instead of just locking the whole database during updates?

hard📝 Conceptual Q10 of 15
PostgreSQL - Transactions and Concurrency
Why does PostgreSQL use concurrency control instead of just locking the whole database during updates?
ABecause locking the whole database is faster
BTo allow multiple users to work efficiently without waiting too long
CTo prevent any data from being changed
DBecause PostgreSQL does not support locking
Step-by-Step Solution
Solution:
  1. Step 1: Understand locking scope impact

    Locking the whole database would block all users, causing delays.
  2. Step 2: Benefit of concurrency control

    Concurrency control allows many users to work at once efficiently by locking only needed parts.
  3. Final Answer:

    To allow multiple users to work efficiently without waiting too long -> Option B
  4. Quick Check:

    Concurrency control = Efficient multi-user access [OK]
Quick Trick: Fine-grained locks improve multi-user efficiency [OK]
Common Mistakes:
  • Thinking whole database locking is faster
  • Assuming concurrency control prevents all changes
  • Believing PostgreSQL lacks locking support

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More PostgreSQL Quizzes