MySQL command line implementation

We are trying to parse a file and save it in a MySQL database. Teams will import a large trace file, the size can be several gigabytes, so it may be interesting for the user to track the progress of the command. We use the following command:

String commandText = "SET AUTOCOMMIT = 0; "
                   + "START TRANSACTION; "
                   + "LOAD DATA LOCAL INFILE \'" + filePath + "\' "
                   + "INTO TABLE testdatabase.metadata "
                   + @"FIELDS TERMINATED BY '\t' "
                   + @"LINES TERMINATED BY '\n' "
                   + "(Position,"
                   + "Timespace,"
                   + "Duration,"
                   + "Disk,"
                   + "Request,"
                   + "Sector,"
                   + "Length); "
                   + "COMMIT;";

Is there a way to track progress during the execution of a command to implement a progress bar?

+3
source share
1 answer

, , . GUID - , SHOW FULL PROCESSLIST , . . InnoDB SHOW INNODB STATUS, .

+1

Source: https://habr.com/ru/post/1792959/


All Articles