The difference is likely to be negligible in terms of performance. The difference is the compiling of executing of three queries rather than one. But — assuming you are returning a fair amount of data — the returning of the data will probably dominate the performance.
That said, be sure you use union all
rather than union
. The latter removes duplicates which adds significant overhead.
One exception would be if you ran the three queries asynchronously. In that case, running the three queries might be faster than running a single query.
solved Performance wise which is better – SQL union or C# datatable merge [closed]