Since UNION ALL
with n subqueries could be executed as n selects, a smart DBMS should be able do at most the same work as n separate selects.
That leaves round trip time, which is n * rtt
for n queries and rtt
for the UNION ALL
.
In theory, a smart DBMS should always be answer a single UNION ALL
faster than n separate queries.
In practice, as usual, all bets are off without testing.