Otto,
If there is no stored index, what is the best way to create one that you can use scope.
Well, creating an index and using a filter (once) will take about the same amount of time because you have to read the entire database either way. Actually, when creating an index you have to not only read the entire database, you also have to write the field to the index for each record too.
Are you using a temporary dbf? Or, explain more about what you need to do. Is there a reason you can't have an existing index?
Below are the results of a speed test I did some time back.
- 1,000,000 record database
- 20,543 records match criteria (state="CA")
- Time for filter 23.13 seconds
- Time for scope 0.32 seconds
Thus filtering took 23.13 / 0.32 = 72 times longer than a scope.
And the winner is, scopes!