I am looping through a number of values (1 to 100 for example) and executing a prepared statement inside the loop.
Is there and advantage to using a transaction - co
For a faster time you could do all the inserts in one shot, or group them together, perhaps 5 or 10 at a time, as if one insert fails the entire batch will.
http://www.desilva.biz/mysql/insert.html
A transaction will slow you down, so if you don't need it then don't use it.
A prepared statement would be a good choice though even if you did batch inserts, as you don't have to keep building up the query each time.