Hi, sorry for jumping in
Yes, the assignment in SCATTER MEMVAR is expensive
I've made some tests on a table with 60k rows
Simple SCAN : 0.015 seconds
With SCATTER MEMVAR : 0.313 seconds
Table has 20 columns
>Sorin
>
>I agree that at least some of the performance difference may be in the SCATTER loop rather than the SQL itself. That innocent-looking loop may require hundreds, thousands or even hundreds of thousands of extra variable assignments in the VFP version compared to the dotNET version.
>
>We have found that using
>
>
select ResultCursor
>append from dbf('SQLQueryCursor')
>
>can be an order of magnitude quicker than SCATTER MEMVAR loops.
>
>Like you I am looking forward to hearing whether the above explains the difference and am keeping an open mind till then.
>
>Regards
>
>j.R