Fix sql queries maximum limit
What does this MR do and why?
Fix failed pipeline: https://jihulab.com/gitlab-cn/gitlab/-/pipelines/821353
https://jihulab.com/gitlab-cn/gitlab/-/jobs/5707656
The immediate cause of failure is:
Job's log exceeded limit of 4194304 bytes.
The root cause of the failure is that the number of SQL queries exceeds the limit.
/cc EM @prajnamas