How to optimize/fine tune DB transaction?

This article discusses why DB transactions are slow despite having less number of records in table.