I have a bunch of data that I want to insert, and I have decided to use bulk insert for MySQL.

Insert into friends (requestor, buddy) values (value1, value2), (value2, value1), (value3, value4), (value4, value3), ...

I would like to know the following:

  1. Can I use 'ignore'? For example,

    insert ignore into friends (requestor, buddy) values (value1, value2), (value2, value1), (value3, value4), (value4, value3), ...
    

    What happens if I have duplicate? Will it a) not insert everything? b) Insert the records before the duplicate record and stop processing the data after that? c) Ignore the duplicate and carry on with the rest?

  2. Is there a limit to the number of records I can use for a bulk insert like this?

Edit
Report