Possible Duplicate:
Which is faster: multiple single INSERTs or one multiple-row INSERT?
While going through a book on mysql, I found out two ways to insert a row in a database.
Method 1
INSERT INTO tableName (col1, col2, col3) VALUES('a', 'b', 'c');
INSERT INTO tableName (col1, col2, col3) VALUES('d', 'b', 'c');
INSERT INTO tableName (col1, col2, col3) VALUES('e', 'b', 'c');
Method 2
INSERT INTO tableName (col1, col2, col3) VALUES('a', 'b', 'c'), ('d', 'b', 'c'), ('e', 'b', 'c');
Is the second method more efficient than the first one ? Or does it simply calls the Method 1
multiple times ?