[TiDB v6.1] (101) Classroom Quiz Explanation and Q&A

Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: [TiDB v6.1](101)课堂小测验讲解问题咨询

| username: anlan

Here, the teacher explains that whether there is a primary key or not, a rowid is automatically generated by the system. However, the documentation states:

  • If a table has an integer primary key, TiDB will use the primary key value as the row ID for that row of data.
    TiDB 数据库的计算 | PingCAP 文档中心
    There is no doubt about the choice of answer for this question, but isn’t the explanation somewhat inconsistent with the documentation?
| username: 我是咖啡哥 | Original post link

It should be a slip of the tongue by the teacher, refer to the documentation. You can test it to find out. Clustered tables and non-clustered tables are still somewhat different.

| username: xfworld | Original post link

Slip of the tongue~ :rofl:

Refer to the documentation

| username: 海石花47 | Original post link

So, the reason why option C is incorrect is: If the primary key is an integer, it is directly used as the rowID, and if it is not the primary key, it is automatically assigned? Is that correct?

| username: ffeenn | Original post link

:rofl: So detailed.

| username: Running | Original post link

Clustering is the physical disk sorting.

| username: system | Original post link

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.