-
Notifications
You must be signed in to change notification settings - Fork 1.2k
sql: introduce invisible index #3011
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
Conversation
| - 不支持 `VISIBLE/INVISIBLE` 的索引 | ||
| - 其他类型的 Index Type (HASH/BTREE/RTREE) 只有语法支持,功能不支持 | ||
| + Add Column | ||
| - 不支持同时创建多个列 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This feature has implemented in TiDB, this line should be removed.
| ERROR 3522 (HY000): A primary key index cannot be invisible | ||
| ``` | ||
|
|
||
| 这里的**主键**包括隐式的主键,隐式主键指的是当表中不存在显式的主键时,第一个 UNIQUE 索引(要求满足索引上的每一列都是 NOT NULL)会成为隐式的主键。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please describe that implict PK doesnt exist in tidb actaully, but we treat it exists so that invisible index behaves the same with mysql
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bb7133 addressed
|
@Deardrops Does this PR apply to v4.0? |
@TomShawn This PR only apply to |
bb7133
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, good job!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rest LGTM
|
@AilinKid Addressed, PTAL |
AilinKid
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
@TomShawn this PR has LGT2, PTAL |
|
@TomShawn PTAL |
TomShawn
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
* sql: introduce invisible index * address comment * address comment * refine format Co-authored-by: Arenatlx <ailinsilence4@gmail.com> Co-authored-by: TomShawn <41534398+TomShawn@users.noreply.github.com>
|
I'll add this document in TOC after this week. |
What is changed, added or deleted? (Required)
Now we implement new feature invisible index in TiDB, we introduce it in docs and update some docs related to it.
Which TiDB version(s) do your changes apply to? (Required)
What is the related PR or file link(s)?
OptimizerUseInvisibleIndexesfromSmtmCtxtoSessionVarstidb#17040