Ver Mensaje Individual
  #10  
Antiguo 19-04-2007
hach hach is offline
Miembro
 
Registrado: mar 2007
Ubicación: Bariloche, Argentina
Posts: 44
Reputación: 0
hach Va por buen camino
Indices

los indices son indispensables!!!!
estas andando en auto con el freno de mano puesto!!! je

para esta consulta en particular necesitas tener los siguientes indices

SELECT M.NALBA,M.OBRA,M.FECHA,M.ORIGI,H.ALBA2
, MO.NOME,MO.CLIE,L.PARTE,L.TIPO,L.HORA1
FROM MAEALBA M, LINPRTS L, MAEOBRA MO, HSTMOVI H
WHERE M.FECHA > '9/30/2005'
AND L.NALBA=M.NALBA AND L.TIPO='E'
AND MO.OBRA=L.OBRA
AND H.OBRA=MO.OBRA

MAEALBA : fecha, nalba
LINPRTS : nalba, tipo, obra
MAEOBRA : obra
HSTMOVI : obra

esto es lo ideal, veras la diferencia de velocidad
Responder Con Cita