Apply to INNER JOIN to gain performance - refs BT#8296