tengo el select:
select da1.campo4,da1.campo5,a1.campo1,c.campo2,d.campo2
from da1,a1,c,d
where da1.campo1=a1.campo1 and da1.campo2='555' and c.campo1=a1.campo2 and
d.campo1=a1.campo3
union all
select df1.campo4,df1.campo5,f1.campo1,c.campo2,d.campo2
from df1,f1,c,d
where df1.campo1=f1.campo1 and df1.campo2='555' and c.campo1=f1.campo2 and
d.campo1=f1.campo3
union all
select do1.campo4,do1.campo5,o1.campo1,c.campo2,d.campo2
from do1,o1,c,d
where da1.campo1=o1.campo1 and do1.campo2='555' and c.campo1=o1.campo2 and
d.campo1=o1.campo3
union all
select dt1.campo4,dt1.campo5,t1.campo1,c.campo2,d.campo2
from dt1,t1,c,d
where dt1.campo1=t1.campo1 and dt1.campo2='555' and c.campo1=t1.campo2 and
d.campo1=t1.campo3
esto me tarda 15 segundos desde el analizador de consultas.
Lo he metido cada select en una tabla temporal sin hacer uniones y tarda
igual.
hay alguna manera de que tarde menos.
muchas gracias
Leer las respuestas