I have a MySQL database with around 250GB of data running on Linux platform (12GB Ram). I am upgrading MySQL to 8.0.32 from 5.7.42-1 and to do so, altering one of the largest table with partitioning and MyISAM storage engine in my DB. Here is the table structure:
| devstats| CREATE TABLE `devstats` (
`time` datetime(6) NOT NULL DEFAULT '0000-00-00 00:00:00.000000',
`s_num` int(11) NOT NULL DEFAULT '0',
`devid` mediumint(9) NOT NULL DEFAULT '0',
`grpid` mediumint(9) NOT NULL DEFAULT '0',
`subid` mediumint(9) NOT NULL DEFAULT '0',
`value` double NOT NULL DEFAULT '0',
KEY `devid` (`devid`),
KEY `grpid` (`grpid`),
KEY `time` (`time`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
/*!50100 PARTITION BY RANGE (to_days(time))
(PARTITION p0000 VALUES LESS THAN (0) ENGINE = MyISAM,
PARTITION p20230522 VALUES LESS THAN (739028) ENGINE = MyISAM,
-----------------------
-----------------------
Following logical approach hence performing below operations:
- Alter table (change MyISAM to InnoDB)
- Backup the DB using mysqldump
- Upgrade mysql binaries
- Import back the DB data
configured innodb_buffer_pool_size = 8GB
With these all setup, the whole process takes almost couple of days. So, can someone please help me to speed up these all operations without loosing any data.
Thanks