General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
>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.
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only