Recently we help client to upgrade the program modules on an uniforms e-commerce website. The most interesting part was this site have been launched almost 4 years, its database over 2G along with 450,000 color and size combination records, sales records, visitor records. The visitor logs have been cleanup regularly in configuration though, but the database still like a giant monster because of numbers of daily visitors. That would take more than 1 hour to export the database and transfer to the developer server.
I used to select those necessary data tables on MySQL panel and run the export to Developer Server. Now, thanks to Tsvetan Stoychev of Inchoo team, really appreciate his help on the script to export all those necessary data tables without getting hands on MySQL panel.
Following script credit to Tsvetan, his script reduces the SQL database and makes it import to developer server within few minutes.
In some cases, this script may fail due to your Hosting Company might restrict the PHP script execution time or the MySQL timeout. So you have do it with the old-school way to export those necessary data tables on SQL panel.