GBase 8s
运维管理
问答
GBase8s 单表存储量以及单表分区方式
发表于2024-07-02 11:45:1481次浏览7个评论
为提高效率,提问时请提供以下信息,问题描述清晰可优先响应。
【GBase版本】:GBase8s V8.7
【操作系统】:Centos7
【CPU】:40C
【问题描述】*:
1:单表最大承载量,当前14亿数据已无法插入。
2:单表分区sql写法,以时间按月分区,是否有存储极限?
3:如何通过sql查询单表存储大小?
4:有没有单表定期清理函数,超过一定时间得数据自动删除。如何操作,以及写法。
评论
登录后才可以发表评论
liaosnet发表于 2年前
最佳回答
GBase用户17418发表于 2年前
@liaosnet:1:理论上限477102080 这个是数据页吗?
2:根据以下内容:
CREATE TABLE ocs.event (
id SERIAL8 NOT NULL,
event_state VARCHAR(255) NOT NULL,
time DATETIME YEAR TO FRACTION(5),
affirm_time DATETIME YEAR TO FRACTION(5),
PRIMARY KEY (id) CONSTRAINT ucc_99
)
写一下以time为分区得建表语句。
2:根据以下内容:
CREATE TABLE ocs.event (
id SERIAL8 NOT NULL,
event_state VARCHAR(255) NOT NULL,
time DATETIME YEAR TO FRACTION(5),
affirm_time DATETIME YEAR TO FRACTION(5),
PRIMARY KEY (id) CONSTRAINT ucc_99
)
写一下以time为分区得建表语句。
曾阿牛发表于 2年前
@GBase用户17418:CREATE TABLE ocs.event (
id SERIAL8 NOT NULL,
event_state VARCHAR(255) NOT NULL,
time DATETIME YEAR TO FRACTION(5),
affirm_time DATETIME YEAR TO FRACTION(5),
PRIMARY KEY (id) CONSTRAINT ucc_99
)fragment by expression
(time>='' and time<'') in dbs11,
(time>='' and time<'') in dbs12,
(time>='' and time<'') in dbs13,
(time>='' and time<'') in dbs14
extent size 102400 next size 10240;
id SERIAL8 NOT NULL,
event_state VARCHAR(255) NOT NULL,
time DATETIME YEAR TO FRACTION(5),
affirm_time DATETIME YEAR TO FRACTION(5),
PRIMARY KEY (id) CONSTRAINT ucc_99
)fragment by expression
(time>='' and time<'') in dbs11,
(time>='' and time<'') in dbs12,
(time>='' and time<'') in dbs13,
(time>='' and time<'') in dbs14
extent size 102400 next size 10240;
liaosnet发表于 2年前
@GBase用户17418:1,这个数值是一个库中可以建表的数量。
崔哥发表于 9个月前
评论是一种尊重
levvel发表于 4个月前
写得真好!
山佳发表于 2个月前
坐等大佬解析。
热门帖子
- 12025-12-01浏览数:182759
- 22023-05-09浏览数:25051
- 42023-09-25浏览数:18521
- 52020-05-11浏览数:17526
2,分区的的理论上限是477,102,080;
3,用oncheck -pt 库名:表名 吧,简单;
4,需要自己定存储过程,并加到定时任务或者sysadmin的task中。