Moving `where` statement to `join` speeds up latest revision lookups

Closes #3376971

Merge request reports

Loading