1.3 Go practices in TiDB 姚维Protocol Decode Protocol encode Session Context parser validator Logical Optimize Physical Optimize SQL AST TiDB Executor Logical Plan Physical Plan Distributed Coprocessor Statistics TiKV DDL Worker GC Worker BG Job Worker Schema Manager Privilege Manager Feedback SQL Data Data Data Data Packet Command Data AST Distributed system testing ● Errors can happen anywhere, any time ● Hardware ○ disk error ○ network Errorf("mock failpoint error") } AST Rewrite ● Define a group of marker functions ● Parse imports and prune a source file which does not import failpoint ● Traverse AST to find marker function calls ●0 码力 | 32 页 | 1.76 MB | 6 月前3
QCon北京2018-《TiDB架构与开源之路》-申砾count(*) from t; Architecture Evolution In ancient times • Command-Line interface • Basic CRUD • AST ---> Executor SQL Layer Mem KV We get SQL and transaction! But it is a toy. Persistent Storage0 码力 | 44 页 | 11.38 MB | 1 年前3
1.2 Go in TiDBNode DataSource from t Where c1 > 10 and c2 = “gopherchina” Projection count(c1) Logical Plan AST Example - Physical Plan Logical Plan IndexScan idx1: (10, +∞) Filter c2 = “gopherchina” Aggregation0 码力 | 27 页 | 935.47 KB | 6 月前3
TiDB v7.1 Documentation• parse: The query statements are parsed into abstract syntax tree (AST). • compile: Execution plans are compiled based on the AST from the parse phase and statistics. The compile phase contains logical queries to an Abstract Syntax Tree (AST), which can be skipped by PREPARE/EXECUTE state- ments. • tidb_session_compile_duration_seconds records the duration of compiling an AST to an execution plan, which can the parameterized query is parsed into an AST (Abstract Syntax Tree) and cached; in later execution, the execution plan is generated based on the stored AST and specific parameter values. When the execution0 码力 | 5716 页 | 104.74 MB | 1 年前3
TiDB v7.6 Documentation• parse: The query statements are parsed into abstract syntax tree (AST). • compile: Execution plans are compiled based on the AST from the parse phase and statistics. The compile phase contains logical queries to an Abstract Syntax Tree (AST), which can be skipped by PREPARE/EXECUTE state- ments. • tidb_session_compile_duration_seconds records the duration of compiling an AST to an execution plan, which can the parameterized query is parsed into an AST (Abstract Syntax Tree) and cached; in later execution, the execution plan is generated based on the stored AST and specific parameter values. When the execution0 码力 | 6123 页 | 107.24 MB | 1 年前3
TiDB v7.5 Documentation• parse: The query statements are parsed into abstract syntax tree (AST). • compile: Execution plans are compiled based on the AST from the parse phase and statistics. The compile phase contains logical queries to an Abstract Syntax Tree (AST), which can be skipped by PREPARE/EXECUTE state- ments. • tidb_session_compile_duration_seconds records the duration of compiling an AST to an execution plan, which can the parameterized query is parsed into an AST (Abstract Syntax Tree) and cached; in later execution, the execution plan is generated based on the stored AST and specific parameter values. When the execution0 码力 | 6020 页 | 106.82 MB | 1 年前3
TiDB v6.5 Documentation• parse: The query statements are parsed into abstract syntax tree (AST). • compile: Execution plans are compiled based on the AST from the parse phase and statistics. The compile phase contains logical queries to an Abstract Syntax Tree (AST), which can be skipped by PREPARE/EXECUTE state- ments. • tidb_session_compile_duration_seconds records the duration of compiling an AST to an execution plan, which can the parameterized query is parsed into an AST (Abstract Syntax Tree) and cached; in later execution, the execution plan is generated based on the stored AST and specific parameter values. When the execution0 码力 | 5282 页 | 99.69 MB | 1 年前3
TiDB v8.1 Documentation• parse: The query statements are parsed into abstract syntax tree (AST). • compile: Execution plans are compiled based on the AST from the parse phase and statistics. The compile phase contains logical queries to an Abstract Syntax Tree (AST), which can be skipped by PREPARE/EXECUTE state- ments. • tidb_session_compile_duration_seconds records the duration of compiling an AST to an execution plan, which can the parameterized query is parsed into an AST (Abstract Syntax Tree) and cached; in later execution, the execution plan is generated based on the stored AST and specific parameter values. When the execution0 码力 | 6321 页 | 107.46 MB | 1 年前3
TiDB v8.0 Documentation• parse: The query statements are parsed into abstract syntax tree (AST). • compile: Execution plans are compiled based on the AST from the parse phase and statistics. The compile phase contains logical queries to an Abstract Syntax Tree (AST), which can be skipped by PREPARE/EXECUTE state- ments. • tidb_session_compile_duration_seconds records the duration of compiling an AST to an execution plan, which can the parameterized query is parsed into an AST (Abstract Syntax Tree) and cached; in later 1705 execution, the execution plan is generated based on the stored AST and specific parameter values. When the0 码力 | 6327 页 | 107.55 MB | 1 年前3
TiDB v8.5 Documentation• parse: The query statements are parsed into abstract syntax tree (AST). • compile: Execution plans are compiled based on the AST from the parse phase and statistics. The compile phase contains logical queries to an Abstract Syntax Tree (AST), which can be skipped by PREPARE/EXECUTE state- ments. • tidb_session_compile_duration_seconds records the duration of compiling an AST to an execution plan, which can the parameterized query is parsed into an AST (Abstract Syntax Tree) and cached; in later execution, the execution plan is generated based on the stored AST and specific parameter values. When the execution0 码力 | 6730 页 | 111.36 MB | 10 月前3
共 33 条
- 1
- 2
- 3
- 4













