• Nice easy Question, but again it makes me think...
    Which of these the the better performs better, and what factors determine that?
    SELECT DISTINCT *
    FROM (VALUES (1), (2), (3), (1)) AS t1(id)
    UNION ALL
    SELECT DISTINCT *
    FROM (VALUES (4), (5))    AS t2(i

    OR THIS

    SELECT *
    FROM (VALUES (1), (2), (3), (1)) AS t1(id)
    UNION
    SELECT *
    FROM (VALUES (4), (5))    AS t2(id)d)