UnionAll extended with MTV optimization