Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Replace In - is it slow?
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00496131
Message ID:
00496164
Views:
9
>>Hi George,
>>
>>I found the reason for slowness. You will laugh: I forgot to select WorkFile and therefore I scaned the main database table with 1,2 mln. records in it. No wonder, why it was so slow :)
>
>That might help to explain it.:-) However, I did have an experience with appending data into a table that had multiple index tags that was so slow that the solution was to first delete all the tags, then re-build the index. So that will factor in. If there's still a problem with performance, I would suggest at least trying selecting the workarea beforehand and using SEEK() with only the expression. I seem to recall that REPLACE...IN is slower, but I'm not 100% sure of that, so I could be wrong.

Thanks for the suggestions, George. Actually, I've also found, that this table has only 3 indexes (Primary, PropID, deleted). After I fixed the problem with alias and fixed few other problems, it seems to work with reasonable speed. I may improve it further, but let it run for now.
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform