This article explains the MySQL InnoDB undo log—its definition, role in transaction rollback and MVCC, when it is created, where and how it is stored across different MySQL versions, the internal tablespace and rollback‑segment structures, log types, and real‑world examples of its usage.
This article explains the fundamentals of MVCC, transaction isolation levels, and related concepts such as ACID properties, dirty reads, non‑repeatable reads, phantom reads, hidden columns, undo logs, version chains, read views, and demonstrates how InnoDB implements these mechanisms with practical SQL examples and diagrams.
This article explains how MySQL handles concurrent transactions using MVCC, lock mechanisms, and various isolation levels, detailing dirty writes, dirty reads, non‑repeatable reads, phantom reads, and the internal structures such as ReadView that enable reliable data consistency.
This article explains MySQL's MVCC mechanism, detailing how multi-version concurrency control, undo logs, and ReadView work together to implement isolation levels, prevent dirty reads, non-repeatable reads, and phantom reads, and compares the behavior of Read Committed and Repeatable Read.
This article compiles twenty detailed MySQL interview questions covering redo log vs. binlog, index types and best practices, covering indexes, joint index matching rules, back‑table queries, left‑most prefix principle, lock mechanisms, MVCC, execution plans, master‑slave replication, XA transactions, and the Snowflake ID algorithm, providing clear explanations and example SQL code.
This article explains MySQL transaction concepts and ACID properties, isolation levels, MVCC mechanics, differences between InnoDB and MyISAM, query execution flow, redo and binlog, index structures, optimization strategies, lock mechanisms, deadlock handling, and best practices for schema changes and sharding.
This article explains MySQL transaction isolation levels, the four concurrency problems (dirty write, dirty read, non‑repeatable read, phantom), how MVCC and version chains work, and the differences between READ COMMITTED and REPEATABLE READ using practical examples and diagrams.
This article explains how MySQL's InnoDB engine implements ACID properties by detailing transaction atomicity, consistency, isolation levels, lock granularity, MVCC version chains, undo/redo logs, buffer pool behavior, and the interplay between redo log and binlog to ensure durability and data integrity.
This article explains how MySQL InnoDB guarantees the ACID properties—Atomicity, Consistency, Isolation, and Durability—through its lock mechanisms, multi‑version concurrency control, undo/redo logs, buffer pool management, and the interaction between binlog and redo log.
This article explains why locks are essential in MySQL, categorizes lock types, defines transactions and ACID properties, compares isolation levels, describes how InnoDB implements transactions and resolves deadlocks, and introduces MVCC as a concurrency control technique.
This article explains MySQL's four transaction isolation levels, focusing on the default Repeatable Read, how MVCC enables snapshot reads to avoid phantom reads, the differences between snapshot and current reads, and practical techniques such as serializable isolation and next‑key locking to fully prevent phantom anomalies.
This article explains YugabyteDB's two‑layer logical architecture, its tablet‑based distributed storage built on Raft groups, the RocksDB‑backed local DocDB, and how it implements distributed transactions using Hybrid Logical Clocks, two‑phase commit, and MVCC, while comparing it with TiDB, CockroachDB and other rivals.
This article provides a comprehensive technical overview of YugabyteDB, covering its two‑layer logical architecture, tablet‑based distributed storage with Raft groups, RocksDB‑backed local storage design, hybrid hash‑range partitioning, and the MVCC‑based two‑phase‑commit transaction model using Hybrid Logical Clocks.
This article explains the concept of locks in computing and databases, compares InnoDB and MyISAM storage engines, details transaction isolation phenomena such as dirty reads, non‑repeatable reads and phantom reads, and explores InnoDB lock types, lock algorithms, intention locks, auto‑increment lock modes, and MVCC mechanisms.
This article explains MySQL transaction fundamentals, the ACID properties, common concurrency problems, isolation level differences, and how InnoDB implements MVCC using version chains and consistency views, illustrated with practical examples and diagrams.
This article explains the role of timestamps in distributed transaction processing, comparing implementations such as MVCC‑based TSO, Google’s TrueTime, Lamport logical clocks, and Hybrid Logical Clocks, and discusses their impact on linearizability, consistency guarantees, and practical designs like TiDB Async Commit.
This article provides a comprehensive overview of distributed system fundamentals, covering core concepts such as nodes, replicas, consistency models, data distribution strategies, lease and quorum mechanisms, two‑phase commit, MVCC, Paxos, and the CAP theorem, along with practical considerations for designing robust, scalable services.
This article explains how CouchDB achieves eventual consistency through the CAP theorem, multi‑version concurrency control, incremental replication, and document validation, illustrating the trade‑offs between consistency, availability, and partition tolerance in distributed database systems.
This article explains the core concepts of MySQL transactions, the ACID properties, transaction states, isolation levels, multi‑version concurrency control (MVCC), and the various lock types and granularity used to ensure data consistency and concurrency control.
This article explains MySQL transaction fundamentals, covering ACID concepts, isolation levels, MVCC implementation, transaction start methods, and practical examples that illustrate how InnoDB ensures atomicity, consistency, isolation, and durability while avoiding common pitfalls such as dirty reads and long‑running transactions.
This article explains how MySQL's InnoDB engine applies row‑level locks for DELETE and SELECT statements under various index configurations and isolation levels, covering MVCC, snapshot vs current reads, two‑phase locking, gap and next‑key locks, and the impact of primary, unique, non‑unique, and missing indexes.
This article provides a comprehensive overview of MySQL fundamentals, covering transaction properties and isolation levels, MVCC mechanics, differences between InnoDB and MyISAM, query execution flow, redo and binlog, index structures, common pitfalls, and practical optimization and scaling strategies.
This article explains the concept of Multiversion Concurrency Control (MVCC), how it solves read‑write blocking, deadlocks and consistency issues, and details InnoDB’s implementation—including transaction IDs, hidden columns, undo logs, and the behavior of snapshot and current reads under various isolation levels.
This article explores the concurrency control strategies, persistence mechanisms, and compiled query processing techniques used by modern memory databases, comparing systems like Hekaton, Hyper, HANA, and others while highlighting performance trade‑offs and architectural considerations.
This article explains how MySQL implements transaction ACID properties by using redo and undo logs, lock mechanisms, and MVCC, detailing the roles of each component in achieving atomicity, durability, isolation, and consistency for reliable concurrent data processing.
This article explores the underlying mechanisms MySQL uses to enforce transaction isolation levels, detailing how InnoDB leverages locking, multi-version concurrency control, gap locks, and explicit versus implicit locks to prevent dirty reads, non‑repeatable reads, and phantom reads across the four standard isolation levels.
This article explains the four transaction isolation levels, defines phantom reads, and details how MySQL's InnoDB engine uses MVCC snapshot reads and next‑key locking (including the next‑key principle and lock composition) to prevent phantom reads under the REPEATABLE READ isolation level.
This article explains how MySQL implements transaction features such as atomicity, durability, and isolation by using redo logs, undo logs, lock mechanisms, and MVCC, and discusses the role of each component in ensuring data consistency and reliability.
This article explains why phantom reads occur under MySQL's REPEATABLE READ isolation, how InnoDB uses MVCC for snapshot reads and next‑key locks for current reads, and demonstrates the mechanisms with code examples and version‑tracking diagrams.
This article provides a comprehensive examination of MySQL/InnoDB locking, covering MVCC, snapshot vs. current reads, cluster indexes, two‑phase locking, isolation levels, detailed lock‑behaviour for various index and isolation combinations, complex query lock analysis, and deadlock detection techniques.
This article explains how MySQL implements transaction features such as atomicity, durability, and isolation by using redo logs, undo logs, lock mechanisms, and MVCC, detailing their roles, generation processes, and the impact of different isolation levels on data consistency.
This article explains MySQL's implicit and explicit locking mechanisms—including table, row, and intention locks—covers lock modes, MVCC, transaction isolation levels, optimistic and pessimistic locking, gap locks, and deadlock causes and solutions, providing practical SQL examples for each concept.
This article explains how MySQL implements transaction ACID properties by using redo logs for durability, undo logs for atomicity, lock mechanisms and MVCC for isolation, and discusses isolation levels, consistency, and practical examples with SQL code and diagrams.
This article analyzes a production incident where concurrent MySQL transactions caused an over‑deduction of account balance, explains the underlying MVCC mechanism, consistency view rules, and how different isolation levels (RR vs RC) affect data visibility and lead to negative balances.
This article analyzes a real‑world MySQL incident where concurrent transactions caused an account balance to become negative, explains the underlying MVCC mechanism, consistency view rules, and how different isolation levels (RR vs RC) affect data visibility and locking behavior.
This article explains MySQL’s transaction isolation levels, clarifies the differences between dirty reads, non‑repeatable reads and phantom reads, and demonstrates through experiments why the REPEATABLE READ level can prevent phantom reads, while also discussing its limitations, MVCC, and locking mechanisms.
This article explains the fundamentals of MySQL InnoDB transaction isolation levels, describes the four standard isolation grades, shows how InnoDB implements them in source code, and provides concrete case studies with SQL scripts to illustrate locking behavior and MVCC effects.
This article explains how MySQL's InnoDB engine applies locks for DELETE and SELECT statements, covering MVCC, snapshot and current reads, clustered indexes, left‑most prefix rules, two‑phase locking, isolation levels, gap and next‑key locks, and analyzes nine different index‑and‑isolation scenarios with detailed conclusions.
This article explains CouchDB’s eventual consistency model, its use of MVCC, CAP theorem trade‑offs, incremental replication, and document validation, illustrating how these mechanisms enable scalable, high‑availability distributed databases without locking, and includes a practical case study of syncing Songbird playlists.
The article explains MySQL InnoDB’s four transaction isolation levels, how the default Repeatable Read is realized through MVCC versioning and snapshot reads, and details the three lock types—record, gap, and next‑key—illustrating their roles in preventing dirty, non‑repeatable, and phantom reads.
This article analyzes how MySQL/InnoDB applies row-level locks for DELETE and SELECT statements under various index configurations and isolation levels, explaining MVCC, current vs. snapshot reads, two‑phase locking, gap and next‑key locks, and the impact of primary, unique, non‑unique, and missing indexes.
This article introduces JDTX, a novel distributed transaction middleware that combines ACID guarantees, high performance, and 1PC architecture, explains its design principles, compares two‑phase commit with flexible transactions, details its MVCC and WAL implementation, and outlines integration with Apache ShardingSphere and future roadmap.
This article explains the design and implementation of JDTX, a distributed transaction middleware that combines MVCC, WAL, and a one‑phase commit model to provide strong ACID guarantees, high performance, and multi‑database support while outlining its challenges and future roadmap.
This article introduces JDTX, a high‑performance, ACID‑compliant distributed transaction middleware, explains its architecture based on WAL and MVCC, compares rigid two‑phase commit and flexible BASE‑based approaches, and discusses the technical difficulties and future roadmap for integrating JDTX with Apache ShardingSphere and cloud‑native platforms.
OceanBase’s TPC‑C benchmark demonstrates how its distributed database achieves high durability, atomicity, isolation, and consistency on commodity cloud servers using Paxos‑based log replication, two‑phase commit, MVCC, and replicated tables, highlighting the architectural challenges and solutions for ACID compliance.
This article explains the fundamentals of Multi-Version Concurrency Control (MVCC), compares its implementation in PostgreSQL and InnoDB, and highlights key differences in version storage, transaction handling, vacuuming, and index updates.
This article explains InnoDB's Multi-Version Concurrency Control (MVCC) architecture, detailing row formats, undo log types, ReadView visibility rules, purge processes, and related concepts such as semi-consistent reads and index condition pushdown, with code examples and diagrams illustrating each mechanism.
A detailed investigation reveals that a seemingly trivial SELECT * FROM sbtest1 LIMIT 1 becomes slow due to InnoDB's MVCC visibility checks, a growing History List length, and a large number of deleted rows that must be scanned before a visible row is found.
This article examines a distributed system concurrency problem, compares lock‑based transactions with multiversion concurrency control (MVCC), and explains why MVCC often outperforms pessimistic locking in scenarios demanding high read responsiveness and low contention.
This article demonstrates how MySQL's repeatable-read isolation with consistent snapshots causes transaction A to read the original value 1 while transaction B reads the updated value 3, explaining InnoDB's MVCC versioning, active transaction arrays, and the distinction between consistent and current reads.
Tencent Cloud’s CynosDB uses a shared‑storage, primary‑multiple‑replica architecture built on the user‑space distributed file system CynosFS, separating compute from elastic block storage, sinking write‑ahead logs for asynchronous replay, and employing MVCC with Raft‑replicated segments to achieve high‑availability, scalable, and cost‑effective MySQL/PostgreSQL‑compatible performance.
CynosDB is Tencent Cloud’s high‑performance, highly‑available NewSQL distributed database that uses a shared‑storage architecture with primary and replica instances, log‑structured storage, RDMA/SPDK transmission, Raft consensus, SSI MVCC, two‑phase locking, and state‑machine replication to provide elastic scaling, fast recovery, and cost‑effective enterprise data management.
This article explains why auto‑increment primary keys are preferred, compares B+‑tree and hash indexes, discusses MySQL partitioning, isolation levels, MVCC, and provides practical tips for designing efficient database tables and indexes.
This article details the architecture and implementation techniques of T‑TDSQL’s dual‑temporal database system, covering full‑state data reading, history‑table creation, snapshot query syntax, transaction snapshot attributes, visibility algorithms, transaction‑state management, index design, and valid‑time creation, query, update, and delete operations.
This article explains the design of T‑TDSQL's full‑temporal data model, detailing its state and time attributes, storage strategies for historical data in MVCC databases, various storage formats and modes, and a novel algorithm for historical state visibility judgment.
T‑TDSQL, a temporal extension of Tencent's TDSQL, introduces a full‑temporal data model, scalable distributed architecture, MVCC‑based history visibility algorithms, and rich temporal features that address financial audit, data lineage, and high‑performance analytics for massive historical datasets.
This article explains InnoDB's transaction and index principles, covering ACID properties, transaction logs, MVCC, locking mechanisms, and B+ tree index structures to help backend developers understand how InnoDB ensures data consistency and high concurrency.
This article explains how MySQL InnoDB implements consistent reads using multi‑version concurrency control (MVCC), detailing isolation levels, undo‑log mechanics, hidden columns, rollback segments, transaction commit behavior, and the impact on SELECT, INSERT, UPDATE, and DELETE operations.
This article provides a comprehensive overview of MySQL’s logical server architecture, lock types, transaction fundamentals, ACID properties, isolation levels, MVCC mechanisms, and deadlock handling, including practical SQL examples and strategies for ensuring data consistency and performance.
This article provides a clear, step‑by‑step explanation of database transactions, covering the ACID properties, how atomicity, consistency, isolation, and durability are implemented, and introduces MVCC as a modern concurrency control technique with practical examples and diagrams.
This article explains MySQL InnoDB's locking mechanisms—including MVCC snapshot vs. current reads, two‑phase locking, isolation levels, lock types, GAP locks, and deadlock scenarios—by analyzing simple and complex SQL examples and showing how different index and isolation configurations affect lock acquisition.
This article explains how traditional ACID transactions fall short for modern large‑scale systems and presents lock‑free transaction methods, atomic and partial cache‑switch techniques, and a PostgreSQL‑style MVCC model for key‑value databases, including practical rules and trade‑offs.
This article critically examines Uber’s claim that MySQL outperforms PostgreSQL by dissecting the alleged PostgreSQL limitations, presenting detailed performance tests, and clarifying the true costs of write amplification, replication, and upgrade processes for both databases.
This article demonstrates how PostgreSQL 9.5's BRIN index leverages the allnulls and hasnulls flags in its regular pages to filter out unnecessary heap page scans, dramatically improving query performance while also discussing the impact of MVCC bloat and maintenance.
This article explains how TiKV implements multi-version concurrency control (MVCC) on top of RocksDB and details its two‑phase commit transaction model, including Prewrite and Commit phases, Percolator‑style optimizations, lock handling, conflict resolution, and garbage‑collection strategies.
This article provides an in‑depth analysis of MySQL/InnoDB locking mechanisms, covering MVCC snapshot vs current reads, cluster indexes, two‑phase locking, isolation levels, lock behavior for simple and complex SQL statements, and practical deadlock diagnosis techniques.
PostgreSQL uses Multi-Version Concurrency Control (MVCC) to ensure reads never block writes and vice versa, assigning transaction IDs to rows, managing visibility with xmin/xmax, supporting isolation levels, and requiring periodic VACUUM to clean dead rows and handle XID wraparound.