At my company we occasionally import large customer MySQL databases (40GB+) which can take over a day to load on our developer machines. While we accept this load time since it’s done in the background, we lack any solid ability to estimate when the imports will finish. This blocks us from scheduling an appropriate time to act on it. It’s like waiting for the cable guy to show up.
Right now my best strategy is a quick show tables command to see what percentage of the tables have been loaded. However, as table sizes vary greatly both with each other and with each customer, this isn’t even close to reliable.
Does anyone have a good technique or tool that can be used to get a reliable percentage of how far along a MySQL import is?
You can do it with the
pvcommand by piping the dump tomysql.It will show you a progress bar during the import progress based on the IO throughput. (As seen here.)