Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add a new blog #50

Merged
merged 4 commits into from
May 4, 2018
Merged

add a new blog #50

merged 4 commits into from
May 4, 2018

Conversation

siyu-hu
Copy link
Contributor

@siyu-hu siyu-hu commented May 4, 2018


TiDB 一个查询语句的简单流程:一个语句经过 parser 后会得到一个抽象语法树(AST),首先用经过合法性检查后的 AST 生成一个逻辑计划,接着会进行去关联化、谓词下推、聚合下推等规则化优化,然后通过统计数据计算代价选择最优的物理计划,最后执行。流程如下图 1。

![图 1](https://upload-images.jianshu.io/upload_images/542677-4654aac61268e6e9?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里在显示的时候少了 “图 1” 这样的标识
其他图也一样

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

select sum(s.a),count(t.b) from s join t on s.a = t.a and s.c < 100 and t.c > 10 group bys.a
```

(其中 a 是索引,b 也是索引)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这句话跟前面的语句有点不好对应?或者居中显示,或者放到 sql 语句下面?
其他带括号的注释也是

@xuechunL xuechunL merged commit ad02337 into master May 4, 2018
@xuechunL xuechunL deleted the siyu-0504 branch May 4, 2018 06:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants