Please, pretty please, make smart SQL queries. Multi row inserts, nested queries and such. Do not sacrifice speed just because it's easier to run a for loop and 100 SELECTs inside...