Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: INSERT INTO tbl SELECT, the table takes up a lot of disk space than INNODB #1079

Closed
2 of 3 tasks
davidshiz opened this issue Dec 6, 2022 · 0 comments · Fixed by #1497
Closed
2 of 3 tasks

bug: INSERT INTO tbl SELECT, the table takes up a lot of disk space than INNODB #1079

davidshiz opened this issue Dec 6, 2022 · 0 comments · Fixed by #1497
Assignees
Labels
A-bug Something isn't working B-storage data type, data storage, insert,update,delete, transactions prio: high High priority

Comments

@davidshiz
Copy link
Collaborator

davidshiz commented Dec 6, 2022

Have you read the Contributing Guidelines on issues?

Please confirm if bug report does NOT exists already ?

  • I confirm there is no existing issue for this

Describe the problem

When using this statement ( INSERT INTO tbl SELECT ) ,the table takes up a lot of disk space than innodb

innodb : 15MB in disk space
Tianmu: 162GB in disk space

set the tianmu_insert_delayed = OFF

mysql>  show variables like 'tianmu_insert_delayed';
+-----------------------+-------+
| Variable_name         | Value |
+-----------------------+-------+
| tianmu_insert_delayed | OFF    |
+-----------------------+-------+
1 row in set (0.00 sec)
drop table if exists t;
create table t(fi int, fv varchar(30), fdt datetime);

insert into t values(1,'VAR-1',current_timestamp);
insert into t values(2,'VAR-2',current_timestamp);
insert into t values(3,'VAR-3',current_timestamp);
insert into t values(4,'VAR-4',current_timestamp);
insert into t values(5,'VAR-5',current_timestamp);
insert into t values(6,'VAR-6',current_timestamp);
insert into t values(7,'VAR-7',current_timestamp);
insert into t values(8,'VAR-8',current_timestamp);
insert into t values(9,'VAR-9',current_timestamp);
insert into t values(10,'VAR-10',current_timestamp);
select * from t;

insert into t select fi+10,concat('VAR-',fi+10),current_timestamp from t;
insert into t select fi+20,concat('VAR-',fi+20),current_timestamp from t;
insert into t select fi+40,concat('VAR-',fi+40),current_timestamp from t;
insert into t select fi+80,concat('VAR-',fi+80),current_timestamp from t;
select count(*) c from t;

insert into t select fi+160,concat('VAR-',fi+160),current_timestamp from t;
insert into t select fi+320,concat('VAR-',fi+320),current_timestamp from t;
insert into t select fi+640,concat('VAR-',fi+640),current_timestamp from t;
select count(*) c from t;

insert into t select fi+1280,concat('VAR-',fi+1280),current_timestamp from t;
insert into t select fi+2560,concat('VAR-',fi+2560),current_timestamp from t;
insert into t select fi+5120,concat('VAR-',fi+5120),current_timestamp from t;
select count(*) c from t;

insert into t select fi+10240,concat('VAR-',fi+10240),current_timestamp from t;
insert into t select fi+20480,concat('VAR-',fi+20480),current_timestamp from t;
insert into t select fi+40960,concat('VAR-',fi+40960),current_timestamp from t;
insert into t select fi+81920,concat('VAR-',fi+81920),current_timestamp from t;
insert into t select fi+163840,concat('VAR-',fi+163840),current_timestamp from t;
select count(*) c from t;

image

drop table t;

image

Expected behavior

No response

How To Reproduce

No response

Environment

[root@HAST04 ~]# /stonedb57/install/bin/mysqld --version
/stonedb57/install/bin/mysqld  Ver 5.7.36-StoneDB for Linux on x86_64 (build-)
build information as follow:
        Repository address: https://github.com/stoneatom/stonedb.git:stonedb-5.7-dev
        Branch name: stonedb-5.7-dev
        Last commit ID: 7f69d33
        Last commit time: Date:   Tue Nov 22 06:31:04 2022 +0000
        Build time: Date: Tue Nov 22 16:53:27 CST 2022

Are you interested in submitting a PR to solve the problem?

  • Yes, I will!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment