Repository navigation
Closed
Labels
kind/bugSomething isn't workingphase/testingseverity/s0Active / top priority for current sprint. Owner has committed to working on it now.
Milestone
Description
Is there an existing issue for the same bug?
- I have checked the existing issues.
Branch Name
main
Commit ID
Other Environment Information
- Hardware parameters:
- OS type:
- Others:Actual Behavior
10亿数据量 insert into select花了大约80分钟才成功:

job url(Load and insert test -> insert into select):
https://github.com/matrixorigin/mo-nightly-regression/actions/runs/8029862130/job/21936797207
Expected Behavior
No response
Steps to Reproduce
create table if not exists big_data_test.table_basic_for_load_1B(
col1 tinyint,
col2 smallint,
col3 int,
col4 bigint,
col5 tinyint unsigned,
col6 smallint unsigned,
col7 int unsigned,
col8 bigint unsigned,
col9 float,
col10 double,
col11 varchar(255),
col12 Date,
col13 DateTime,
col14 timestamp,
col15 bool,
col16 decimal(16,6),
col17 text,
col18 json,
col19 blob,
col20 binary(255),
col21 varbinary(255),
col22 vecf32(3),
col23 vecf32(3),
col24 vecf64(3),
col25 vecf64(3)
);
load data url s3option {'endpoint'='http://cos.ap-guangzhou.myqcloud.com','access_key_id'='***','secret_access_key'='***','bucket'='mo-load-guangzhou-1308875761', 'filepath'='mo-big-data/1000000000_20_columns_load_data_pk.csv'} into table big_data_test.table_with_pk_for_load_1B fields terminated by '|' lines terminated by '\n' ignore 1 lines parallel 'true';
create table if not exists big_data_test.table_with_pk_for_insert_1B(
id bigint primary key,
col1 tinyint,
col2 smallint,
col3 int,
col4 bigint,
col5 tinyint unsigned,
col6 smallint unsigned,
col7 int unsigned,
col8 bigint unsigned,
col9 float,
col10 double,
col11 varchar(255),
col12 Date,
col13 DateTime,
col14 timestamp,
col15 bool,
col16 decimal(16,6),
col17 text,
col18 json,
col19 blob,
col20 binary(255),
col21 varbinary(255),
col22 vecf32(3),
col23 vecf32(3),
col24 vecf64(3),
col25 vecf64(3)
);
insert into big_data_test.table_with_pk_for_insert_1B(id,col1,col2,col3,col4,col5,col6,col7,col8,col9,col10,col11,col12,col13,col14,col15,col16,col17,col18,col19,col20,col21,col22,col23,col24,col25) select * from big_data_test.table_with_pk_for_load_1B;Additional information
No response
Metadata
Metadata
Assignees
Labels
kind/bugSomething isn't workingphase/testingseverity/s0Active / top priority for current sprint. Owner has committed to working on it now.
Activity
jensenojs commentedon Mar 27, 2024
load的SQL因为权限的问题本地还是没跑成功, 在本地的ubuntu上使用下面的SQL进行模拟, 并没有复现成功, 一亿规模的
insert into select耗时也是一分钟多一些. 算符合预期. 现在big_data_test是一周跑一次, 可以等后续看看有没有复现, 如果还有复现的话, 可能需要进一步测试一下特定数据类型比如说vecf的插入性能.jensenojs commentedon Apr 1, 2024
测个十亿规模的看看耗时
without pk : 15 min 38.60s

with pk : 22.10.85

jensenojs commentedon Apr 8, 2024
休假中
jensenojs commentedon Apr 12, 2024
无进展
jensenojs commentedon Apr 17, 2024
not working on it
jensenojs commentedon Apr 22, 2024
处理其他s-1
9 remaining items
jensenojs commentedon Jun 26, 2024
最新的结果看似乎快了三十分钟
jensenojs commentedon Jul 1, 2024
等1.2-dev上的pr在合并之后看一下
jensenojs commentedon Jul 4, 2024
处理中移物联的insert pprof
jensenojs commentedon Jul 9, 2024
not working on it
jensenojs commentedon Jul 12, 2024
等
Ariznawlll commentedon Jul 17, 2024
1.2-dev

commit-id: 74f04eb
main

commit-id: c1751aa
main与1.2-dev性能已经同步,性能从大约80min提升到45min左右。
allengaoo commentedon Jul 17, 2024
这个问题主要用于解决CTAS 性能慢的问题,针对这方面的问题,看起来已经优化到原有时间的一半左右。
另外,针对1.3.0 版本 OLTP 负载的性能指标也有和insert 相关的内容, 建议把这个场景放到1.3.0 版本的测试计划中,之后关闭这个issue, 并在1.3.0 版本中对该场景进行测试,需要达到的目标为:
jensenojs commentedon Jul 17, 2024
@allengaoo 斌哥, 这里的第二个目标可能需要再看一下, 现在mo在大数据量下的insert into select不见得比mysql慢的.
allengaoo commentedon Jul 17, 2024
ok. 如果说MO 在这种场景下的性能会比mysql 高的话, 那这个地方建议对于测试的标准改为以下的内容:
1.3.0 版本的性能相较于1.2.2 版本不回退。
1.3.0 版本的性能,至少达到 mysql性能的120% ,MySQL 的 CTAS时间 / mo 的CTAS时间 >= 1.2