I am doing:
type db.sql | mysql
and the console output is nothing. I see the ibdata1 file growing, but I don't know how many GB it will grow to.
I would like to see a % progress indicator of some kind. Any ideas?
|
I am doing:
and the console output is nothing. I see the ibdata1 file growing, but I don't know how many GB it will grow to. I would like to see a % progress indicator of some kind. Any ideas? |
|||
|
|
Under unix-a-like systems like Linux there are a number of options. Pipe Viewer (pv, available here) is the one I tend to use, and it is conveniently present in most distro's standard package repositories ( But your use of Be aware that this is metering the amount of the file sent to mysql, not the amount of work mysql has actually done, and the amount of the file sent to mysql may not accurately map to the amount of work mysql has done and is yet to do. A huge multi-row INSERT (like As another suggestion, you could add output statements around each part of the script like:
and break bit INSERTs up with messages every now and then as well as messages at before and/or after:
the result of these extra SELECT statements should be written to stdout (i.e. your console) as the script is processed so you will have a clue how far it has gone. |
||||
|
|
|
Have I got a crazy query for you !!! This will report on the size of every InnoDB table.
Just run this periodically during the loading of the SQL script. If the SQL script table locks the table during the load, then you will not see numbers until the table is fully loaded. Give it a Try !!! |
|||||
|
|
I believe you should be able to do this with command line progress bar, e.g.:
Or alternatively catentate with progress, e.g.:
|
|||
|
|