Timeline for How can I monitor the progress of an import of a large .sql file?
Current License: CC BY-SA 3.0
19 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Aug 10, 2020 at 23:06 | comment | added | pgee70 | great solution, now i know there are 40 minutes to go! | |
Mar 13, 2020 at 11:55 | comment | added | Florian Eck | i love it! that really saves my day when importing 50+GB sql dumps.... | |
Feb 23, 2020 at 8:19 | comment | added | FullStack Alex |
never used pipes before in bash so it was difficult to understand to me what the line of code does. But this tutorial made it very easy to understand the concept: youtube.com/watch?v=mTwBlPqRZO8 Also on ubuntu it's just apt install pv to get pipeviewer installed.
|
|
Oct 28, 2019 at 14:49 | comment | added | jruzafa | Work perfect and useful | |
Oct 2, 2019 at 20:04 | comment | added | tdaget | @josue-alexander-ibarra You may find a solution to your request in this StackOverflow article | |
Jul 15, 2018 at 9:06 | comment | added | forthrin |
How do you get this to work with mysqlimport , which requires the table name as the file name?
|
|
Feb 10, 2017 at 14:40 | comment | added | Pierre de LESPINAY | Very nice solution ! If the password is manual, pv does not wait for it to display its progression though | |
S Feb 1, 2017 at 13:21 | history | suggested | mahemoff | CC BY-SA 3.0 |
add pipe viewer link and screenshot
|
Feb 1, 2017 at 12:15 | review | Suggested edits | |||
S Feb 1, 2017 at 13:21 | |||||
May 26, 2016 at 18:03 | comment | added | Josue Alexander Ibarra |
@rob This is awesome dude, could you also provide an example with mysqldump ?
|
|
Jan 20, 2016 at 15:19 | comment | added | snapfractalpop | @DavidSpillett indeed. Your comment mirrors my sentiment. Basically, pv is crude, but effective. What I like most about it is how general it is. Such is the beauty of unix pipes (thank you McIlroy). | |
Jan 20, 2016 at 14:38 | comment | added | David Spillett |
@snapfractalpop pv won't be overly accurate in many cases because some chunks of SQL will take more time to process than others. A line that constitutes a simple insert will run a lot faster than one that creates on index on a table that already has many rows, for instance. But a a rough idea of progress the output should be helpful unless the read buffer used by mysql is particularly large (for a 7Gb input the buffer would need to be very large to render pv 's output not useful at all.
|
|
Jan 20, 2016 at 14:30 | history | edited | Paul White♦ | CC BY-SA 3.0 |
Incorporated comments
|
Aug 21, 2015 at 15:34 | comment | added | snapfractalpop |
I would guess that mysql might have a buffer, in which some data can be piped in, without being fully "processed" (i.e. if it errors out, pv may have slightly over-reported what actually gets in). But in general, this is how pipes work. It's the same reason you can do sudo hd /dev/sda1 | less and not have your entire system partition in memory.
|
|
Nov 16, 2012 at 0:46 | vote | accept | qazwsx | ||
Nov 14, 2012 at 6:31 | history | edited | Nick Chammas | CC BY-SA 3.0 |
added 31 characters in body
|
S Nov 14, 2012 at 5:56 | review | Late answers | |||
Nov 14, 2012 at 9:39 | |||||
S Nov 14, 2012 at 5:56 | review | First posts | |||
Nov 14, 2012 at 10:21 | |||||
Nov 14, 2012 at 5:37 | history | answered | Rob | CC BY-SA 3.0 |