问题描述
我遇到了这个 Teradata 失败 7545 标识列超出了它的限制,但我只插入了几百条记录,而且我已经将数据类型从 INT 更改为 BIGINT.
I got this Teradata failure 7545 Identity Column is over its limit, but I am only insert a few hundreds records and i have already change data type from INT to BIGINT.
这是我的创建表语法,我真的很困惑为什么 Teradata 不高兴?
Here is my create table syntax, I am really puzzled why Teradata was not happy?
CREATE TABLE LOCATION
( LOCATION_ID BIGINT GENERATED BY DEFAULT AS IDENTITY (START WITH 1 INCREMENT BY 1 MAXVALUE 1000000) ,
....
任何见解将不胜感激
推荐答案
您的定义默认为 NO CYCLE
并且 MAXVALUE
设置为 1000000
,因此无论您使用 INT
还是 BIGINT
,最大数量为 1,000,000.
Your definition defaults to NO CYCLE
and MAXVALUE
is set to 1000000
, so it doesn't matter if you use an INT
or BIGINT
, the maximum number is 1,000,000.
Teradata 并行分配一个 IDENTITY,即每个 AMP/PE 根据 dbscontrol
参数 IdCol Batch Size
请求一系列数字,因此将达到 1,000,000在您实际插入一百万行之前.
Teradata assigns an IDENTITY in parallel, i.e. it's each AMP/PE requests a range of numbers based on the dbscontrol
parameter IdCol Batch Size
, so 1,000,000 will be reached way before you actually insert a million rows.
删除MAXVALUE
,但保留BIGINT,仅在需要存储几百万行时才使用INT...
Remove the MAXVALUE
, but keep the BIGINT, use INT only if need to store up to a few million rows...
这篇关于Teradata 15:失败 7545 标识列超出其限制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!