This article comes from your own blog: http://www.wangerbao.com/?p=279
MySQL default thing is repeat read (REPEATABLE read isolation level),
Postgres default things are read Committed isolation level, and now compare their differences according to the instance.
Mysql:
Left for thing 1, right for thing 2.
The first step:
Things 1 queries, things 2 queries, and their query results are consistent.
650) this.width=650; "src=" Http://www.wangerbao.com/wp-content/uploads/2015/11/20151105152812_22969.png "style=" Border:none;vertical-align:middle;height:auto; "/>
Step Two:
Things 1 Update-query-but do not commit, things 2 query, their results inconsistent
650) this.width=650; "Src=" http://www.wangerbao.com/wp-content/uploads/2015/11/20151105152821_59754.png "Style=" Border:none;vertical-align:middle;height:auto; "/>
Step Three:
Things 1 commits-queries, things 2 queries, their results are inconsistent ——— actually the difference between the 2 things is here.
650) this.width=650; "src=" Http://www.wangerbao.com/wp-content/uploads/2015/11/20151105152833_51660.png "style=" Border:none;vertical-align:middle;height:auto; "/>
Fourth Step:
Things 1 queries, things 2 commits-queries, their results are consistent
650) this.width=650; "src=" Http://www.wangerbao.com/wp-content/uploads/2015/11/20151105152845_84863.png "style=" Border:none;vertical-align:middle;height:auto; "/>
Postgresql:
Left for thing 1, right for thing 2
The first step:
Things 1 query, things 2 query, query results are consistent.
650) this.width=650; "Src=" http://www.wangerbao.com/wp-content/uploads/2015/11/20151105152859_80131.png "Style=" Border:none;vertical-align:middle;height:auto; "/>
Step Two:
Things 1 Modification-queries, things 2 queries, inconsistent query results
650) this.width=650; "Src=" http://www.wangerbao.com/wp-content/uploads/2015/11/20151105152922_18522.png "Style=" Border:none;vertical-align:middle;height:auto; "/>
Step Three:
Thing 1 Commit-query, Thing 2 query, query results consistent
650) this.width=650; "src=" Http://www.wangerbao.com/wp-content/uploads/2015/11/20151105152935_63031.png "style=" Border:none;vertical-align:middle;height:auto; "/>
Fourth Step:
Things 1 Query, things 2 submit query, the result is consistent, no
This article is from the "www.wangerbao.com" blog, make sure to keep this source http://wangerbao.blog.51cto.com/4363165/1916026
Database transaction differences: can be committed read and read-repeat differences