I wonder if there are any advantage or disadvantage using multiples values in a single query, or whether is better to insert those values into a separate queries?
For example, supposed that I have the table tester_tbl which has 2 columns of type int both, id1 and id2 respectively and I want insert the values 2, 3, 4 to the column id2 and the value 1 to the column id1, something like this :
+-----+-----+
| id1 | id2 |
+-----+-----+
| 1 | 2 |
| 1 | 3 |
| 1 | 4 |
+-----+-----+
To accomplish it, what do you recommends me?, use a single query that inserted those values, so INSERT INTO tester_tbl (id1, id2) VALUES (1, 2), (1,3), (1,4);, or do multiples queries to insert those values, so
`INSERT INTO tester_tbl (id1, id2) VALUES (1, 2);`,
`INSERT INTO tester_tbl (id1, id2) VALUES (1, 3);`,
`INSERT INTO tester_tbl (id1, id2) VALUES (1, 4);`
If anyone can tell me a better way to do this, I'd be grateful.
Best regards.