INSERT INTO ... SELECT ... vs dumping/loading a file in MySQL

Posted by Daniel Huckstep on Stack Overflow See other posts from Stack Overflow or by Daniel Huckstep
Published on 2010-05-07T17:15:49Z Indexed on 2010/05/07 17:18 UTC
Read the original article Hit count: 156

Filed under:
|

What are the implications of using a INSERT INTO foo ... SELECT FROM bar JOIN baz ... style insert statement versus using the same SELECT statement to dump (bar, baz) to a file, and then insert into foo by loading the file?

In my messing around, I haven't seen a huge difference. I would assume the former would use more memory, but the machine that this runs on has 8GB of RAM, and I never even see it go past half used.

Are there any huge (or long term) performance implications that I'm not seeing? Advantages/disadvantages of either?

© Stack Overflow or respective owner

Related posts about mysql

Related posts about database