Hmm, I see your database is much larger than what I had here
If you still have the installation alive, you can try to disable the sorting of results by ranking, just to see if it solves the issue. If yes, it could be a potential workaround (i.e. simplify the query for huge installations).
On the file lib/pkp/classes/submission/Collector.php
, you can comment the line 338 and the 341, basically replace this:
if (!$keywords->count()) {
$q->orderBy('s.date_submitted', $this->orderDirection);
break;
}
By this
//if (!$keywords->count()) {
$q->orderBy('s.date_submitted', $this->orderDirection);
break;
//}
If it solves, it would be a simple way for us to address this issue temporarily.
Best,
Jonas Raoni