Get the App
SLTechnology News&Howtos  ›  Database  › 

Database transaction differences: the difference between committable reads and repeated reads

Shulou Source: shulou.com Published: 2022-06-01 09:05:17 09月14日 Update

This article comes from my own blog: http://www.wangerbao.com/?p=279

The default thing for Mysql is Repeatable Read Isolation Level.

The default thing for PostGres is to Read Committed Isolation Level. Now compare their differences based on examples.

Mysql:

Things 1 on the left and 2 things on the right.

Step one:

Thing 1 query, thing 2 query, their query results are the same.

Step 2:

Thing 1 update-query-but do not submit, thing 2 query, their results are inconsistent

Step 3:

Thing 1 submission-query, thing 2 query, their results are inconsistent-in fact, this is the difference between the two things.

Step 4:

Thing 1 query, thing 2 submit-query, their results are the same

Postgresql:

Things 1 on the left and things 2 on the right

Step one:

Thing 1 query, thing 2 query, query results are consistent.

Step 2:

Thing 1 modification-query, thing 2 query, query results are inconsistent

Step 3:

Thing 1 submission-query, thing 2 query, query results are consistent

Step 4:

Thing 1 query, thing 2 submit query, the result is consistent, no screenshot

Tags: Things queries consistency results right differences blogs examples screenshots comparisons updates transactions differences data databases processing Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno NVidia Shulou Information Redmi Microsoft Xiaomi