Issues with TiDB Schema Development Standards

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

Original topic: TiDB开发schema规范问题

| username: TiDBer_CkS2lbTx

Will specifying innodb when creating a table or database have any impact, considering that TiDB’s underlying storage engine layer uses RocksDB?

| username: 小于同学 | Original post link

Why do we need to specify InnoDB?

| username: TiDBer_CkS2lbTx | Original post link

If the tables inherited from historical MySQL are migrated over, and the schema was previously specified as InnoDB when created.

| username: TiDBer_5cwU0ltE | Original post link

I feel that specifying it won’t be of much use, because the official documentation explains it like this:

  • The SHOW ENGINES statement always returns InnoDB as its supported engine. However, TiDB internally usually uses TiKV as the storage engine.

Reference link: * The SHOW ENGINES statement always returns InnoDB as its supported engine. However, TiDB internally usually uses TiKV as the storage engine.

| username: onlyacat | Original post link

It is only used for compatibility and will not affect actual behavior.

| username: RenlySir | Original post link

No impact at all. It’s just syntax compatibility.

| username: 魔人逗逗 | Original post link

Looking at this code example, it should have no impact, 事务限制 | PingCAP 文档中心

Also, the explanation here for SHOW ENGINE

| username: 连连看db | Original post link

It doesn’t matter, it’s fully compatible. Everything is converted to KV format at the underlying level.

| username: dba远航 | Original post link

This can be completely disregarded; ultimately, the underlying layer is the same.

| username: zhaokede | Original post link

There is no impact. However, the previous MySQL tables were all specified as InnoDB.

| username: DBAER | Original post link

Made it compatible, it doesn’t matter whether you write it or not.

| username: 小于同学 | Original post link

It won’t be affected.

| username: TiDBer_rvITcue9 | Original post link

Give it a try and see.

| username: FutureDB | Original post link

Learned.

| username: Kongdom | Original post link

  1. According to the official documentation, this attribute is currently always InnoDB.
  2. Referring to the description of temporary tables in the official documentation, this value should be ignored.
| username: system | Original post link

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