A quick run of that code on my laptop (RH 7.3, Athlon 1.something GHz, Sybase ASE 12.5.0.3) shows that I was wrong, and that batched commits almost certainly improve the performance for large inserts:
ac: 129 wallclock secs ( 2.77 usr + 0.40 sys = 3.17 CPU) @ 3.15/s (
+n=10)
mc: 14 wallclock secs ( 2.05 usr + 0.40 sys = 2.45 CPU) @ 4.08/s (n
+=10)
This is with no indexes on the tables.
Still, it's an interesting problem - I'll have to try this on some more serious iron, and with more data, and, ideally, with raw devices rather than disk devices that have O_DSYNC turned on.
Michael