Hello,
Using IQ 15.4 ESD#6 .
I'm looking for any tips or recommendations regarding the use of views that include select left/right outer joins, which afterwards they are referenced by a select statement that uses select union, i.e:
create or replace view1..
select left outer join... from <tables>
..
go
create or replace view2..
select left outer join..from <tables>
..
go
select <cols>
from view1 union select <cols> from view2...
go
We can have <N> views with <N> UNION statements which could be used in the SELECT that references them.
So the question is if this is a good way or is it preferable to replace the views with Temporary tables..?
Basically these queries are performing slowly and spending a lot o time in the "fetch process". I'm attaching just a sample query plan as HTML.
Also we activated sp_indexadvisor and some HG recommendations appeared
Thank you
Regards
Jose Miguel