Optimization

jda jda at his.com
Sat Feb 12 10:27:52 CST 2005


Hi Ruslan,

I maintain my own long field that holds the arbitrary order of 
records in a table. The following loop runs very, very quickly in 
V1.x. It is *very* slow in V2 (about 10 seconds for 4200 records).

Any idea why? Or better yet, ways to speed it up?

       i = 1
       result = myCursor.firstRecord
       while result = true
         myCursor.LongField("hit").value = i
         myCursor.UpdateRecord
         i = i + 1
         result = myCursor.NextRecord
       wend
       myCursor = nil


Thanks,

Jon

P.S. If it matters, the cursor was made with kNoLocks:

myCursor = myDatabase.SQLSelect(query, EVCursorLocation.kServerSide, 
EVLockType.kNoLocks)


More information about the Valentina-beta mailing list