|< < 36 > >|

Transactions

What is the difference between these two pieces of code?
insert into T values(1, 2, 3); insert into T values(4, 5, 6); insert into T values(7, 8, 9); insert into T values(10, 11, 12);



  • Four transactions.

  • Each has to be durable.

  • So: Four disk writes: 20 msec (hard disk)
begin; insert into T values(1, 2, 3); insert into T values(4, 5, 6); insert into T values(7, 8, 9); insert into T values(10, 11, 12); commit;

  • One transaction.

  • Which must be durable.

  • So: One disk write: 5 msec (hard disk)

|< < 36 > >|