Databases Reference
In-Depth Information
How it works...
In step 2, we execute a query using the
UNION
operator, which retrieves the distinct rows
that are returned by one or both the queries. The execution plan for this query is as shown
in the following screenshot:
We can see that there is a full table access of both tables and a
UNION-ALL
operation
followed by a
SORT
UNIQUE
operation.