I know the union all questions gets asked a lot, but I have a slight variation. I will be doing a union all on three different queries/tablesets. The first 2, by definition of their queries, will never have duplicates, but the third will definitely have duplicates.
My question is, does the order I do my union/union alls matter. For instance, should I do a UNION ALL on my first 2 tables that won't have duplicates (and never ever will) and then do a UNION to the third table since it will have duplicates? Or is the order better if its reversed? Or does it not matter?
Not a real pressing matter, just wondering if there was a best practice in this type of scenario.