Details
-
Bug
-
Status: Closed (View Workflow)
-
Critical
-
Resolution: Fixed
-
10.2(EOL), 10.3(EOL), 10.4(EOL), 10.5, 10.6
-
None
Description
After inplace alter table, InnoDB increases the file size. InnoDB does the normal insert
and file size is 32 mb after flushing all the pages. Inplace Alter table rebuilds the
table and increases the file size(36MB) by 4MB.
--source include/have_innodb.inc
|
--source include/have_sequence.inc
|
create table t1(f1 int not null primary key, b char(255) CHARACTER SET utf8)engine=innodb;
|
INSERT INTO t1(f1) SELECT * FROM seq_1_to_1000000;
|
--source include/restart_mysqld.inc # Here t1 size is 32 MB
|
alter table t1 force, algorithm=inplace;
|
--source include/restart_mysqld.inc# Here t1 size is 36 MB
|
drop table t1;
|
Attachments
Issue Links
- blocks
-
MDEV-33087 ALTER TABLE...ALGORITHM=COPY should build indexes more efficiently
-
- Closed
-
- relates to
-
MDEV-24621 In bulk insert, pre-sort and build indexes one page at a time
-
- Closed
-
-
MDEV-16281 Implement parallel CREATE INDEX, ALTER TABLE, or bulk load
-
- Open
-
-
MDEV-29035 review InnoDB page fill factor
-
- Open
-
-
MDEV-34096 REPAIR sometimes de-optimizes an InnoDB table
-
- Open
-
I believe that the size difference must be related to the B-tree index page fill factor, or to the way how pages are allocated (
MDEV-13013,MDEV-20094).I remember that there was some discussion of page fill factor during the implementation of the MySQL 5.7 bulk insert. I cannot remember if it was about intentional or accidental changes to the fill factor. Based on my findings in
MDEV-19747, I would expect that the performance impact was not thoroughly tested.The page fill factor can affect the performance of subsequent operations, for the better or worse.