Hi,

I have a situation where, within a PHP loop, I am creating over one hundred SQL 
statement (INSERTS and UPDATES).

Would it cut any overhead to send 20 ";" seperated queries in one mysql_query() 
statement, and therefore only execute mysql_query() 5 times for 100 statements, as 
opposed to sending each statement individually?

So, 

mysql_query("INSERT 1", "UPDATE 1...", "INSERT 2...", "UPDATE 2..");

or:

mysql_query("INSERT 1");
mysql_query("UPDATE 1...");
mysql_query("INSERT 2...");
mysql_query("UPDATE 2..");

Do you save by not making as many connections?

Thanks

Andy.

Reply via email to