Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
UDF's second rate citizen in Rushmore ?
Message
From
07/09/2006 08:54:26
 
 
To
06/09/2006 11:00:17
Mike Yearwood
Toronto, Ontario, Canada
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
01151219
Message ID:
01151715
Views:
43
Hi Mike,
>How does VFP update the index when a UDF is involved? Wouldn't that require the UDF to fire? If so, updating records will be faster using the snippet too.
Ran some tests to identify some of the factors adding to the time needed.

Base table with 5.3*10**7 recs, updating a .dbf field c(35), all tags deleted.
Reason to update .dbf instead of .cdx: for all runs the disk access writing
remains the same, which is probably not guaranteed for writing the cdx,
thereby increasing potential measurement errors

replace all with "" 40 secs, diskbound
replace all with retFuncEmpty() 50 secs, diskbound
replace all with retFuncEmpty(cFromMemo) 95 secs, diskbound
replace all with iif(len(workfunc_snippetlike(cFromMemo)>0, "", "") 406 secs, cpubound
replace all with workfunc1_03snippetlike(cFromMemo) 403 secs, cpubound
replace all with workfunc2_09snippetlike(cFromMemo) 403 secs, cpubound
replace all with workfunc1__12otherFuncs(cFromMemo) 455 secs, cpubound

all functions are in the same procedure file.
15% is definitely measurable, but not in the same league as adding another
field, filling it with the current setup and use the existing index again and again.

But I probably will build some primitive logic with compile-constants to
get me at least part of the 60 seconds in the upper functions called.

regards

thomas
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform