UNION ALL

This option appears in the SHOWPLAN output for a query that includes a UNION ALL. When a query references a view or a derived table that contains a UNION ALL operator, the UNION ALL step separates the plan for the left side of the UNION ALL from the plan for right side of the UNION ALL. The plan for the right side is also indented to further isolate it from the plan for the left side.

Assume the following view:

CREATE VIEW v2 AS
SELECT *
FROM mytable
UNION ALL
SELECT *
FROM mytable2
  

The following example demonstrates the SHOWPLAN output for a query that involves view v2 containing a UNION ALL operator.

Query:    SELECT * FROM v2
  
SHOWPLAN: STEP 1
          The type of query is SELECT
          FROM TABLE
          mytable
          Nested iteration
          Table Scan
          UNION ALL
              FROM TABLE
              mytable2
              Nested iteration
              Table Scan