Tag: design-database
All the articles with the tag "design-database".
-
System Design - How TiDB's Selection Executor Filters Chunks
Trace a root Selection from PhysicalSelection through executorBuilder and SelectionExec to a vectorized filter, including its row-at-a-time fallback and chunk controls.
-
System Design - How TiDB's LIMIT Executor Reads Only Enough Rows
Trace LIMIT with OFFSET through TiDB's PhysicalLimit, executorBuilder, LimitExec, and Chunk, including how chunk demand and session settings affect reads.
-
System Design - How TiDB Writes and Reads Its Slow Query Log
A source-level tour of TiDB's slow SQL path: ExecStmt's duration gate, SlowQueryLogItems formatting, the file logger, and the SLOW_QUERY virtual table.
-
System Design - How TiDB Locks Rows for SELECT FOR UPDATE
Trace a pessimistic SELECT FOR UPDATE from TiDB's executor through the TiKV MVCC lock command, including lock waits, timestamp conflicts, and the settings that control them.
-
System Design - How TiDB Tracks Query Memory in Source Code
Follow TiDB's memory trackers from StatementContext to the session quota and OOM action, with a focused walkthrough of the current source code and its key settings.
-
System Design - How TiDB Async Commit Works in Source Code
A focused source walkthrough of TiDB Async Commit: how a SQL COMMIT reaches tikv/client-go, how TiKV stores async-commit lock metadata and a minimum commit timestamp, and why TiDB can acknowledge before background lock finalization.