mysql - Performing Alter Table on Large Innodb table -


i've been thrust position of db admin our server i'm having learn go. found 1 of our tables had maxed out id column , needs migrated bigint. innodb table roughly 301gb of data. running mysql version 5.5.38. command i'm running migrate table

alter table tb_name change id id bigint not null;

i kicked off migration , 18 hours migration, i'm not seeing our disk space on server change @ makes me think nothing happening. have plenty of memory no concern there, still shows following message state when run "show processlist;"

copy tmp table

does have ideas or know i'm doing incorrectly? please ask if need more information.

yes, take looooong time. disks spinning fast can. (ssds employ faster hamsters.)

you can kill alter, since doing is, says, "copying tmp table", after rename tmp table real table , drop old copy.

i hope had innodb_file_per_table = on when started alter. else expanding ibdata1, won't shrink afterwards.

pt-online-schema-change alternative. still take loooooong time (with 1 'o' because slower). job without blocking other activity.

this might have been time check columns , indexes in table:

  • could ints turned mediumint or smaller?
  • are of indexes unused?
  • how normalizing of varchars?
  • maybe partitioning (but not without reason)? time-series typical use data warehousing.
  • summarize data, , toss @ least older data?

if further guidance, please provide show create table.


Comments

Popular posts from this blog

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -