Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Practical uses of Seralization Isolation level?

Under what scenarios we use SERIALIZABLE Isolation level? I have seen some answers on website that says, when you want transaction to be completely isolated, we usually go for this.

What i would like to know from your own experience is that, when you've used this in your projects/or you've seen this to be used in other projects and what was the specific requirement that was not getting fulfilled by other isolation levels?

like image 920
Vicky Avatar asked Apr 20 '11 11:04

Vicky


1 Answers

SERIALIZABLE is useful when you build complex reports which require several queries.

In READ COMMITTED or REPEATABLE READ the queries could see the changes made between the transaction started and the moment they ran.

pg_dump, the PostgreSQL dump utility, starts it job with issuing SET TRANSACTION ISOLATION LEVEL SERIALIZABLE, to guarantee that the state of database being dumped would be that of the moment the utility was run, and the subsequent changes to the database could not interfere with the dump.

like image 193
Quassnoi Avatar answered Oct 16 '22 20:10

Quassnoi