Reverts #6784 that was a guilty commit of CORE-19531 that causing performance regression. JIRA issue: CORE-19531