Remove wasteful database open/close, close all rows