Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Set Filter performance in Browse versus Grid
Message
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Set Filter performance in Browse versus Grid
Miscellaneous
Thread ID:
00279680
Message ID:
00279680
Views:
58
I have a form that is comprised of a several text fields and a grid. The fields are used as query-by-example criteria fields. The basic logic of the form is to build a SET FILTER command using the contents of the fields. This method works fine on small tables, but on larger ones, the performance degrades incredibly. (Incidently, each of the table columns that corresponds to the matching criteria field is properly indexed with an expression that matches the one used in the filter statement.)

What I've found is that, if I open the table and set the very same filter condition in the main FoxPro window and simply browse, the retrieval of the records is virutally instantaneous. I can scroll through all of the records with no delays. However, if I create a simple form with a grid on it and set the identical filter condition, the retrieval of the records can take about 40 seconds to several minutes. (In fact, I actually cut and pasted the filter condition from the Fox window so I know that it's identical.)

Is there something that I'm missing? Why should the performance degrade so incredibly by simply viewing the results in a grid? Is there some extra processing going on? Better yet, is there a better strategy for populating the grid than a SET FILTER command? I thought that perhaps the SET FILTER method was not the best strategy, but yet it works very well with the BROWSE. Any insights would be appreciated.

John
John Groft
Consultant
Computer Task Group, Inc.
Next
Reply
Map
View

Click here to load this message in the networking platform