# MVCC - Cont'd

![`smart`](MVCC02_aa_001_20220511.png)

------------------------------------------------------------------------------
So how does the MVCC mechanism work? Let's start a query when TSO is 120 (start_st = 120) and query the values of key = 1, key = 2, and key = 4.

First, we'll have 2 pointers to scan Write CF and Lock CF from the beginning; in Write CF, we scan to KEY = 1_110 (user key = 1, the committed TSO is 110).

In Lock CF, we also located KEY = 1; this lock was clearly an uncommitted transaction; we ignored it. Since the values that have been committed are recorded in Write CF, and in order of time from near to far, the KEY = 1_110 in Write CF is the most recent commit where the TSO was less than 120, so we found the value KEY = 1_100, VALUE = Jack in DEFAULT CF, according to the KEY = 1_110, VALUE = 100 in Write CF.