in reply to Impact of module size

Are there any other ways of refactoring SQL-heavy code like this?

There are at least two other approaches to consider: