Was this helpful?
[NO]UNION_FLATTENING
Turns union flattening on or off for the session.
Union flattening is an optimization technique used to increase the potential for compiling efficient query plans. If a query involves joining the result of a union view (or derived table or common table element) to other tables or views, the query optimizer will expand the union view to produce a query that is the union of each SELECT in the union view joined to the other tables. For example, if a view is defined as "create view uv as select * from u1 union all select * from u2", and a query is executed as "select * from uv, a, b where uv.x = a.y and a.p = b.q", the optimizer will transform it to "select * from u1, a, b where u1.x = a.y and a.p = b.q union all select * from u2, a, b where u2.x = a.y and a.p = b.q".
This statement overrides the default set on the CBF opf_union_flattening configuration parameter. The default is OFF.
Last modified date: 11/28/2023