SELECT statements within a
UNION are optimized separately. Therefore,
for this query:
SELECT * FROM Table1 WHERE column1 = 'x' UNION ALL SELECT * FROM TABLE1 WHERE column2 = 'y'
column2 are indexed, then each
SELECT is done using an indexed search, and
the result sets are merged. Notice that this query might
produce the same results as the query used in the
OR example, which uses a sequential scan.