One open sqlite database, as the sqlite cache needs it.
Close the database.
Run the statements in one transaction.
Run one statement and resolve its rows as objects.
One open sqlite database, as the sqlite cache needs it.