Not the answer you need?
Register and ask your own question!

add generated virtual column still copy data

baoxiaobaoxiao ContributorCurrent User Role Beginner
When run the below query it take long time
alter table record_log add column record_key varchar(255) AS (md5(concat(record_time,record_campId))) VIRTUAL ;
show processlist show it copy data to tmp table, suppose it will done in place with data copy

34 | root | localhost | record | Query | 26 | copy to tmp table | alter table record_log add column record_key varchar(32) AS (md5(concat(record_time,reco | 0 |

MySQL version is 5.7.13-6-log Percona Server (GPL), Release 6, Revision e3d58bb

Sign In or Register to comment.

MySQL, InnoDB, MariaDB and MongoDB are trademarks of their respective owners.
Copyright ©2005 - 2020 Percona LLC. All rights reserved.