Information générale
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
>I don't know how you could find a faster result with xBase one. There was an error in >your code + a PITA (not using m. in loop for memvars). I fixed them and tried. Still >xbase code was slower (namely around 36 times slower. It took 588 seconds on my >computer, SQL version were taking 15-16 seconds).
As I already said with further runs I found SQL mostly wins, but if I compare the best SQL result (2 secs on 3 mio. cMovs) with the badest xCase running time (50 secs) I get a factor of 25, not 36. And It would be fairer to make up this factor from the average times needed by both variants. Okay, I also wasn't very thoroughly testing before proudly announcing to have bet SQL.
Hmm, have you SET TALK OFF / SET MESSAGE TO?
That's much more essential than not using m. for memvar access.
SET RELATION TO iAgentID*120000+lnFilterYear*12+lnFilterMonth-1 ...
or
SET RELATION TO iAgentID*120000+22060 ...
also speed's it up a bit compared to
SET RELATION TO iAgentID*120000+nYear*12+nMonth-1
As I that makes less access of the cAgent cursor
and because of SET KEY TO these fields must contain
the values 2005 and 1 repectively.
What VFP version did you use? I used VFP9.
Bye, Olaf.
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement