GBase 8a
其他
文章

在longblob存入超大数据(上限2G)

发表于2026-02-02 16:32:0984次浏览5个评论

0、准备(第一个参数默认4M,设置大一些。
set global max_allowed_packet= 1471088640
配置文件修改,无法show出来
_gbase_blob_max_length=100M #根据需要设置


1、建表
create database if not exists test;
use test;
create table t1(c1 int,c2 longblob);

2、准备数据1.tbl (1.zip 需要放入和1.tbl同目录下)
1,1.zip

3、数据导入
load data infile 'ftp://gbase:gbase@172.16.6.98//tmp/1.tbl'
into table test.t1
fields terminated by ',' 
table_fields 'c1,c2 type_url';

4、数据插入
insert into t1 (c1,c2) values(1,load_file('/tmp/1.zip'));

评论

登录后才可以发表评论
用户头像
mittens发表于 6个月前
感谢分享
用户头像
GBase用户28017发表于 6个月前
为什么要这么存呢?
milan发表于 6个月前
感谢分享
用户头像
郝老师发表于 5个月前
tupe_url 是什么意思?
曾浩轩发表于 2个月前
加油