DELAPARRA
Index
Color
NL
Category: SQL

READ COMMITTED

Explained by Updated

What is READ COMMITTED?

READ COMMITTED: Each statement only sees data committed before it started. The default in PostgreSQL and Oracle. READ COMMITTED is a transaction isolation level where every statement sees only data that was committed before that statement started. It is the default in PostgreSQL, Oracle and SQL Server. It prevents dirty reads, so you never see another transaction's unfinished changes. It does allow non-repeatable reads: if you read the same row twice in one transaction, another transaction may have committed a change in between, and you see the new value the second time.

Definition source Coders Lingo, CC BY 4.0

Frequently asked questions about READ COMMITTED

What should you keep in mind with READ COMMITTED?

For most web requests this is fine and offers good performance. Where a decision depends on a value staying the same, such as checking a balance and then deducting from it, lock the row with SELECT ... FOR UPDATE or use an atomic update. That protects the critical step without raising the isolation level for everything.

What does an example of READ COMMITTED look like?

SET TRANSACTION ISOLATION LEVEL READ COMMITTED;

At a glance

CategorySQL
Explained by
Updated

More SQL terms

All terms starting with R

Skills

Download all skills (zip)

Manuals

Related services

Need any help?

Stuck on one of these in your own project? Tell me what you are working on and I will tell you how I would approach it.