Automatically slice queries for SQLite if necessary