Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Xbase commands Vrs Sql commands
Message
From
10/05/2005 13:26:27
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
10/05/2005 07:58:36
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 6 SP5
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01011885
Message ID:
01012504
Views:
25
>>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
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform