Mensaje
 
a
25/09/2006 15:29:17
General information
Foro:
Visual FoxPro
Category:
Bases de datos, tablas, vistas, índices y SQL
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP
Database:
Visual FoxPro
Miscellaneous
ID de la conversación:
01156530
ID del mensaje:
01157073
Views:
20
>>>I have trust in this
>>>
>>>SELECT TI.cTrans_fk, TI.cInsurances_fk;
>>>    FROM (select curTemp.cTrans_pk , max(T.iSequence_Number) iSequence_Number;
>>>	    	from curTemp JOIN Trans_Insurances T ON curTemp.cTrans_pk = T.cTrans_fk ;
>>>		    GROUP BY 1) X ;
>>>		    JOIN Trans_Insurances TI ;
>>>                 ON TI.cTrans_fk = X.cTrans_pk AND TI.iSequence_Number = X.iSequence_Number;
>>> into cursor curTemp1
>>>
>>
>>Seems to be a little bit faster, but still quite slow...
>
>post sys(3054) and current exec time
Time: 3.804
SELECT TI.cTrans_fk as cTrans_pk, ;
TI.cInsurances_fk ;
FROM (select curTemp.cTrans_pk, max(T.iSequence_Number) iSequence_Number ;
from curTemp JOIN Trans_Insurances T ;
ON curTemp.cTrans_pk = T.cTrans_fk GROUP BY 1) X ;
JOIN Trans_Insurances TI ;
ON TI.cTrans_fk = X.cTrans_pk AND ;
TI.iSequence_Number = X.iSequence_Number into cursor curTemp1

Rushmore optimization level for intermediate result: none
Rushmore optimization level for table t: none
Joining intermediate result and table t using index tag Ctrans_fk
Rushmore optimization level for intermediate result: none
Rushmore optimization level for table ti: none
Joining intermediate result and table ti using temp index
I'm running everything locally with SET DELETED ON.
If it's not broken, fix it until it is.


My Blog
Previous
Next
Responder
Mapa
Ver