Tag Archives: UNION ALL instead of UNION

Use UNION ALL instead of UNION:

CPU consumption are more when there is any SORT operation, so they are very expensive. The UNOIN operation sorts the result which eliminate the rows within the sub-query or removes the duplicates from the result set. Unless it is required to eliminate duplicate rows from the result set then it is preferred to use UNION […]
Read More »