Jump to content


Photo

batch insert from external file


  • Please log in to reply
2 replies to this topic

#1 shai1

shai1
  • Members
  • PipPip
  • Member
  • 24 posts

Posted 09 October 2006 - 10:42 PM

A while back I thought I read of a way to insert records from an external file without having to "loop" through them. I've been looking for how to do this and of course now I can't find it again. If anyone could show me an example of how to do this I would really appreciate it.

Thanks,
Dave
You always get to choose your own lunch!
http://studio55salononline.com

#2 shai1

shai1
  • Members
  • PipPip
  • Member
  • 24 posts

Posted 10 October 2006 - 03:30 AM

I found what I was looking for...

Load data infile. I thought I would post it for others to learn from. When searching I was looking for insert from file and that is why I couldn't find any information on it. I have not tried it yet, but I've read that it is very fast.

Thanks,
Dave
You always get to choose your own lunch!
http://studio55salononline.com

#3 fenway

fenway
  • Staff Alumni
  • MySQL Si-Fu / PHP Resident Alien
  • 16,199 posts
  • LocationToronto, ON

Posted 10 October 2006 - 03:31 PM

It is incredibly fast... in fact, it's probably the best way to import data into a MySQL table.
Seriously... if people don't start reading this before posting, I'm going to consider not answering at all.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users