GBase 8s
其他
问答
insert into testonly select id, name from testonly执行卡住,空间不够导致?
发表于2025-11-19 16:02:3480次浏览10个评论
为提高效率,提问时请提供以下信息,问题描述清晰可优先响应。
【GBase版本】:
【操作系统】:
【CPU】:
【问题描述】*:
数据空间大小为500M
create table testonly (id int not null, name character varying(20) not null);
insert into testonly values (1, 'a');
insert into testonly values (2, 'b');
insert into testonly values (3, 'c');
insert into testonly select id, name from testonly;

这次执行后卡住了。。。
1、执行为啥会卡住,跟什么有关?
2、有sql执行超时配置吗?参数是哪个?
3、跟要写入的数据太大,剩余空间不足有关?
有懂的大佬,帮忙解答一下!
空间信息:

sql信息:



评论
登录后才可以发表评论
路路路发表于 8个月前
稍等
飞影发表于 8个月前
onstat -g BTH
Your evaluation license will expire on 2026-11-05 00:00:00
On-Line (CKPT REQ) -- Up 01:57:19 -- 2430280 Kbytes
Blocked:CKPT
Your evaluation license will expire on 2026-11-05 00:00:00
On-Line (CKPT REQ) -- Up 01:57:19 -- 2430280 Kbytes
Blocked:CKPT
小鱼不吐泡泡发表于 8个月前
这个库是不是带日志的库,如果是的话,可以onstat -l看看是不是逻辑日志满了,而且没开启逻辑日志备份
飞影发表于 8个月前
@小鱼不吐泡泡:Physical Logging
Buffer bufused bufsize numpages numwrits pages/io
P-1 47 1024 336 12 28.00
phybegin physize phypos phyused %used
1:263 25000 682 59 0.24
Logical Logging
Buffer bufused bufsize numrecs numpages numwrits recs/pages pages/io
L-3 495 512 2771786 110277 2582 25.1 42.7
Subsystem numrecs Log Space used
OLDRSAM 2771576 220751636
HA 9 396
DDL 201 69948
Buffer Waiting
Buffer ioproc flags
L-3 0 0x21 0
address number flags uniqid begin size used %used
46e6afa8 1 U------ 1 1:25263 32768 32768 100.00
494f1550 2 U------ 2 1:58031 32768 32768 100.00
494f15b8 3 U------ 3 1:90799 32768 32768 100.00
494f1620 4 U---C-L 4 1:123567 32768 32272 98.49
4 active, 4 total
看起来是的,逻辑日志备份是哪个参数?还有这种卡住会一直?期望是能报错退出
Buffer bufused bufsize numpages numwrits pages/io
P-1 47 1024 336 12 28.00
phybegin physize phypos phyused %used
1:263 25000 682 59 0.24
Logical Logging
Buffer bufused bufsize numrecs numpages numwrits recs/pages pages/io
L-3 495 512 2771786 110277 2582 25.1 42.7
Subsystem numrecs Log Space used
OLDRSAM 2771576 220751636
HA 9 396
DDL 201 69948
Buffer Waiting
Buffer ioproc flags
L-3 0 0x21 0
address number flags uniqid begin size used %used
46e6afa8 1 U------ 1 1:25263 32768 32768 100.00
494f1550 2 U------ 2 1:58031 32768 32768 100.00
494f15b8 3 U------ 3 1:90799 32768 32768 100.00
494f1620 4 U---C-L 4 1:123567 32768 32272 98.49
4 active, 4 total
看起来是的,逻辑日志备份是哪个参数?还有这种卡住会一直?期望是能报错退出
小鱼不吐泡泡发表于 8个月前
@飞影:https://www.gbase.cn/community/post/1175,参考这个帖子
小鱼不吐泡泡发表于 8个月前
@飞影:要是想直接用的话,还是建议直接用脚本初始化一个新实例吧,这些问题都是一开始数据库参数没配置好导致的,逻辑日志和物理日志的空间也都没从rootdbs里移出来,后头估计还会有各种各样的问题
GBase用户28017发表于 8个月前
学习。
飞影发表于 8个月前
查了下文档,好像有几种方式
1、增加逻辑日志
onspaces -c -d llogdbs -p /opt/gbase8s/data/llogchk -o 0 -s 512000
2、开启动态添加逻辑日志
DYNAMIC_LOGS=2
3、定时备份
ontape -a
但是命令会卡住,这个好像不太友好。。。
1、增加逻辑日志
onspaces -c -d llogdbs -p /opt/gbase8s/data/llogchk -o 0 -s 512000
2、开启动态添加逻辑日志
DYNAMIC_LOGS=2
3、定时备份
ontape -a
但是命令会卡住,这个好像不太友好。。。
GBase用户28017发表于 8个月前
不能吧。
爱笑的眼睛发表于 2个月前
好问题啊。
热门帖子
- 12025-12-01浏览数:182762
- 22023-05-09浏览数:25056
- 42023-09-25浏览数:18525
- 52020-05-11浏览数:17528