Michael Gale <[EMAIL PROTECTED]> wrote:

> 
>        I have a question about data loading using mysql 4.0.20. If you need to load 
> let's say 50,000 items into a database.
> Now 50,000 is not a lot for a DB. 
> 
> So my question is would it be fast to load the file using the local infile which is 
> a security concern or should I be
> using a loop with INSERTS ?

LOAD DATA is alot faster than INSERTing data row by row because it uses bulk
insert methodic. See http://dev.mysql.com/doc/mysql/en/INSERT.html and note that 
you can INSERT more than one row at once. 

Indexes are updated only a single time per each INSERT statement so inserting
data in bulk will give you a great performance. 





-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.net http://www.ensita.net/
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /    Egor Egorov
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.net
       <___/   www.mysql.com




-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to