Mike Yearwood
Toronto, Ontario, Canada
General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only