The Limits of Efficiency for Open- and Closed-World Query Evaluation Under Guarded TGDs