Last active
November 6, 2019 08:19
-
-
Save dyipon/9dde4fdf18a9de67e4806a1dabdee95c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select stage,state,begin_time as start_time,end_time,round(data/1000/1000) as MB from performance_schema.clone_progress; | |
or more detailed: | |
select STAGE, STATE, CAST(BEGIN_TIME AS TIME) as "START TIME", | |
CASE WHEN END_TIME IS NULL THEN | |
LPAD(sys.format_time(POWER(10,12) * (UNIX_TIMESTAMP(now()) - UNIX_TIMESTAMP(BEGIN_TIME))), 10, ' ') | |
ELSE | |
LPAD(sys.format_time(POWER(10,12) * (UNIX_TIMESTAMP(END_TIME) - UNIX_TIMESTAMP(BEGIN_TIME))), 10, ' ') | |
END as DURATION, | |
LPAD(CONCAT(FORMAT(ROUND(ESTIMATE/1024/1024,0), 0), " MB"), 16, ' ') as "Estimate", | |
CASE WHEN BEGIN_TIME IS NULL THEN LPAD('0%', 7, ' ') | |
WHEN ESTIMATE > 0 THEN | |
LPAD(CONCAT(CAST(ROUND(DATA*100/ESTIMATE, 0) AS BINARY), "%"), 7, ' ') | |
WHEN END_TIME IS NULL THEN LPAD('0%', 7, ' ') | |
ELSE LPAD('100%', 7, ' ') END as "Done(%)" | |
from performance_schema.clone_progress; | |
via: https://mysqlserverteam.com/clone-create-mysql-instance-replica/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment