Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Fastest way to check memo field for a string
Message
 
To
07/07/2009 14:32:25
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Desktop
Miscellaneous
Thread ID:
01410639
Message ID:
01410653
Views:
50
>>>Assuming a memo field in a cursor is HUGE, and I want to look for a string: 'my string' what would be the fastest and least memory hog way of doing that? I think for sure that $ is not it... is alines() better? It won't be an exact match, in other words, I need to see if 'my string' is in there, but it may be in there as 'this is my string.' etc...
>>>
>>>I don't need to know where in the memo field it is, just whether it is there or not.
>>
>>I really didn't do any testing which is faster:
>>[$], AT(), OCCURS(), ALINES() or LIKE (in SQL-SELECT)
>>How HUGE is that MEMO?
>>BTW if you want ONLY to check if that string is there I think [$] will be faster than ALINES, just because it only check if the string is there but ALINES() parse the string to array and after that you should LOOP through it and us [$] to see if there some line contains that string (not sure though :-))
>
>So far my tests show that OCCURS() is the fastest but I was interested in others' experiences. Thanks Boris.

So far this test I ran show me that the fastest way is [$] (it is always 1 or 2 milliseconds faster that AT()) :-)))

But again I am not sure if it is representative.
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Reply
Map
View

Click here to load this message in the networking platform