Translations:Manual:Database access/133/en

So you can reduce lock time by doing as much processing as possible before you do your write queries.