Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Xbase commands Vrs Sql commands
Message
From
09/05/2005 09:28:28
 
 
To
08/05/2005 15:49:15
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:
01012144
Views:
25
>>I would imagine this:
>>
>>SELECT * FROM mytable INTO CURSOR mycursor
>>
>>would be faster than:
>>
>>create cursor mycursor (field definitions)
>>select mytable
>>scan
>>scatter memvar memo
>>insert into myCursor from memvar
>>endscan
>
>That's an unfair comparison, as SELECT * FROM mytable without
>any WHERE clause will surely cause a FILTER cursor,
>which would compare to USE mytable. That again is
>xbase code and faster than the sql select.
>
>Bye, Olaf.

To make it a fairer comparison you can easily add the NOFILTER clause to ensure you don't get a filtered (USE AGAIN) result set to compare the time, or add in a where clause.

Besides the speed comparison, you should also take into consideration the maintainability/readability of the code. One line of SQL is less likely to have errors than 10 of xBase code, it is also possibly more self documenting.
Frank.

Frank Cazabon
Samaan Systems Ltd.
www.samaansystems.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform