Read from secondary database by streaming results

Following the work done in https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/15457. Use streaming results to read from the secondary database.

Assignee Loading
Time tracking Loading