in reply to DBI placeholders less efficient?
Well, the first loop uses different variables than the second loop. Could it be that the query send is actually different? I'm quite surprised by the result, but it's just one test. A better test would be to use different values in the query. And repeat the test several times. You didn't by any chance run the first test, then the second test, and these two tests where the only times the query was actually run? If it took 1m and 59s to gather the data from disk to find the answer to the first time the query was run, and the rest of the time, the data was in the cache, it explains why the first one is slower.