Prevent OutOfMemory when importing a large DB
Fix crash when importing a large DB: use an array for the batch result