Reduce memory usage on load by reopening database