CodeBlanks Logo Icon CodeBlanks

SERIALIZABLE

Learn the highest level.

SERIALIZABLE

SERIALIZABLE is the highest level. Transactions run as if sequential. All issues are prevented.

SET TRANSACTION ISOLATION LEVEL SERIALIZABLE;

Safest but slowest.

SERIALIZABLE — details

SERIALIZABLE also prevents phantom reads. But locking reduces performance.

Transactions behave as if they ran one after another; on a conflict the database aborts one with an error and the application must retry it.

Practice SERIALIZABLE

Set the isolation level to SERIALIZABLE.

Starter code

query.sql
-- highest level
SET

Sample solution

query.sql
SET TRANSACTION ISOLATION LEVEL SERIALIZABLE;

Expected output

İzolasyon ayarlandı

Questions and answers

Review the lesson questions together with their answers. To test yourself, solve the lesson interactively.

1 SERIALIZABLE

Question
SET TRANSACTION ISOLATION LEVEL ____
Answer
SET TRANSACTION ISOLATION LEVEL SERIALIZABLE

Explanation: SERIALIZABLE is the right answer.

2 SERIALIZABLE: match the terms

Term Meaning
SERIALIZABLE highest
phantom prevented
sequential safe
slow locking

3 Which is the safest isolation?

  • SERIALIZABLE Correct answer
  • READ UNCOMMITTED
  • READ COMMITTED
  • REPEATABLE READ

Explanation: SERIALIZABLE is the safest.

All lessons in Advanced