>>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.
Olaf,
I'm not on my second day of foxpro. It's up to you to underestimete m. in loop.
PS: It was 10 million records not 3 millions. Don't you think it might be more than 36 times as data gets larger.
You used VFP9 and you think m. is not important! Oh my, it;s your take. Good luck.
Cetin