Tag: design-tidb
All the articles with the tag "design-tidb".
-
System Design - How TiDB's Parallel Sort Executor Merges Rows
Trace TiDB's PhysicalSort, SortExec, parallelSortWorker, and multiWayMerger as they sort chunks and merge worker results, with memory and spill settings.
-
System Design - How TiDB's Apply Executor Runs a Correlated Subquery
Trace one outer row through PhysicalApply, the executor builder, NestedLoopApplyExec, and ApplyCache to see how TiDB evaluates correlated subqueries.
-
System Design - How TiDB's Table Reader Streams Rows from TiKV
Follow one TiKV range scan from TiDB's TableReader builder through a DAG request, SelectResult, ordered result handler, and output chunks.
-
System Design - How TiDB's UNION ALL Executor Merges Chunks
Trace TiDB's root UnionAllExec from planner to worker goroutines, reusable chunks, error delivery, and the session concurrency knob.
-
System Design - How TiDB's Projection Executor Runs Expressions
Trace a root TiDB Projection from physical plan to child chunks, expression evaluation, and ordered parallel workers; learn why it sometimes runs sequentially.
-
System Design - How TiDB's TopN Executor Keeps Only the Best Rows
Trace ORDER BY with OFFSET and LIMIT through TiDB's PhysicalTopN, executor builder, TopNExec, and chunk heap, including memory and spill settings.