# mysqldump vs select into outfile

**URL:** <https://forums.percona.com/t/mysqldump-vs-select-into-outfile/1395>\
**Category:** Other MySQL® Questions\
**Created:** [April 30, 2010, 11:08am UTC](https://forums.percona.com/t/mysqldump-vs-select-into-outfile/1395 "2010-04-30T11:08:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![williamt](https://avatars.discourse-cdn.com/v4/letter/w/977dab/32.png) [@williamt](https://forums.percona.com/u/williamt)\
**Post date:** [April 30, 2010, 11:08am UTC](https://forums.percona.com/t/mysqldump-vs-select-into-outfile/1395/1 "2010-04-30T11:08:10Z")

</div>

Can someone explain the difference between mysqldump and select into outfile.  
If im trying to dump all databases and tables for restore into a new server is one going to be faster then the other?

Thanks,  
Will

---

<div class="post-metadata">

**Author:** ![sterin71](https://avatars.discourse-cdn.com/v4/letter/s/5e9695/32.png) [@sterin71](https://forums.percona.com/u/sterin71)\
**Post date:** [April 30, 2010, 1:30pm UTC](https://forums.percona.com/t/mysqldump-vs-select-into-outfile/1395/2 "2010-04-30T13:30:54Z")

</div>

mysqldump will give you entire SQL statements that can be piped into mysql. And with the correct arguments you will also get CREATE TABLE statements etc.  
So a mysqldump can give you a full backup of your database.

Outfile will just give you a text file with delimited data, so the tables must already exist on the new server when you import the records.

If your dump file was created with the mysqldump --opt I’m actually not sure of which of the two ways is the fastest so you will have to try it and find out.
