基于湖库一体架构,统一管理结构化、半结构化与非结构化等多模态数据,一个系统承载事务处理、实时分析与 AI 工作负载。
OceanBase 数据库支持的 table_id 个数
更新时间:2026-05-21 01:56
本文讲解 OceanBase 数据库支持多少个 table_id。
Table_id 用于标识唯一的一个 table 对象,table 删除重建后不会复用以前的 table_id。V4.0 版本之前,Truncate 操作本质上 drop+create,如果系统中存在大量的 truncate 操作,可能会因为 table_id 消耗过快而导致 table_id 用尽的问题。 Table_id 是一个 64 bit 位的数字,其具体含义如下。
在 OceanBase 数据库 V4.0 版本之前,其前 24 位为 tenant_id,后 40 位为真实的 table_id。40 位 table_id 中,前 50000 保留给内部表使用,所以table_id 的范围 (50000, 2^39 -1],最大能有(2^39 -1 - 50000)个 table_id。
在 OceanBase 数据库 V4.0 版本及之后,table_id 不再包含 tenant_id。理论上最大可以达到(200000,2^63 - 1]。
适用版本
OceanBase 数据库 V2.x 和 V3.x 版本。