GBase 8s
适配迁移
问答

创建索引报错

发表于2026-01-05 14:36:08136次浏览10个评论

为提高效率,提问时请提供以下信息,问题描述清晰可优先响应。

【GBase版本】:GBase8s8.8

【操作系统】:windows11

【CPU】:

【问题描述】*:执行SQL报错

CREATE TABLE IF NOT EXISTS testdbdb:DSF (  
 StationNumber VARCHAR(255) NOT NULL, 
 Id SERIAL8, 
 SoftDelete BOOLEAN NOT NULL, 
 DeviceNumber VARCHAR(255) NOT NULL, 
 ChannelName VARCHAR(255) NOT NULL, 
 SPCId INTEGER NOT NULL, 
 DPCId INTEGER NOT NULL, 
 YCId INTEGER NOT NULL, 
 YKId INTEGER NOT NULL, 
 IsIgnore BOOLEAN NOT NULL, 
 PRIMARY KEY (Id)
);
CREATE UNIQUE INDEX IF NOT EXISTS uk_dsf_index ON testdbdb:DSF(StationNumber, DeviceNumber, ChannelName, SoftDelete);

ERROR [HY000] [GBasedbt][GBasedbt ODBC Driver][GBasedbt]The total size of the index is too large or too many parts in index.

评论

登录后才可以发表评论
ZEalot发表于 7个月前
uk_dsf_index = 255+255+255+1 请老师帮忙指点一下index有限制吗?
用户头像
liaosnet发表于 7个月前
估计你这个库在2K页的dbspace空间了。以下是索引长度限制:
2K page size = 387
4K page size = 796
8K page size = 1615
12K page size = 2435
16K page size = 3254
GBase大圣发表于 7个月前
@liaosnet:请问呢 哪个表控件是4K页的
用户头像
liaosnet发表于 7个月前
@GBase大圣:所在dbspace
select * from sysmaster:sysdbspaces; 中对应的pagesize
用户头像
GBase用户28017发表于 6个月前
解决没
用户头像
GBase用户28017发表于 6个月前
修补好没。
GBase大圣发表于 6个月前
@GBase用户28017:修好了 在建实例的时候指定表空间 默认是在系统表下
用户头像
levvel发表于 4个月前
看完收获很大!
GBase用户47954发表于 3个月前
感谢作者的精彩分享!
GBase用户51884发表于 2个月前
等待有缘人解答。