Although I love the batch process for loading data into the database within a symfony project, sometimes it can be a bit slow if the dataset is large. I find myself reinitializing the database often while I test, not because I change the schema or add new data, but because I want to reset the data back to its initial state. For this, I run the batch process once loading the data from the yaml fixtures, and then do an SQL dump that will run much, much faster from here on out.
mysqldump -e --add-drop-table -u root -p db_name > ./data/sql/latestdump.sql
To repopulate the database with this dump file:
mysql -u root -p dbname < data/sql/latestdump.sql


