Ahsan,
Well, without knowing exactly what you have, I would "assume" that you have some record "Set" that you want to search, not the whole table. So, what I would reccommend (and I have done this with great success on tables with over 6million records...) is the following:
Locate the "Key" value you want. Again, I assume you are searching for some child record against some parent table, so try the following strategy:
lcValue = <PARENT.KEY>
*
SELECT <Child>
SET ORDER TO TAG <some key to parent>
SEEK <ParentValue>
IF FOUND()
DO WHILE <CHILD.VALUE> = <PARENT.KEY>
IF FindStr $ MemoFieldName
? Recn(),Code
ENDIF
SKIP
ENDDO
ENDIF
Where Child is the CHILD table, Parent is the Parent table, and Key (which may be a compound expression on both sides) is the value you are "Searching" for, and "Comparing" to to ensure you have limited your Set. (You can just as easily use a SCAN... ENDSCAN in place of my DO loop, but I like the readability of DO WHILE... some may disagree with me on this...)
Then, as soon as your "CHILD CRITERIA" is exhausted, the loop stops. Assuming you will probably not have more than even a few thousand child matches, this will go VERY fast.
Hope this helps....
Best Regards,
Scott
Please let me know if this has helped
![[hammer] [hammer] [hammer]](/data/assets/smilies/hammer.gif)