Loading all the cursor to avoid database leak