The ultimate prize and final step to close the issue: do not group by the whole set of matched rows, way too slow on huge datasets!
The ultimate prize and final step to close the issue: do not group by the whole set of matched rows, way too slow on huge datasets!