Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Help SET FILTER TO
Message
De
03/06/1997 11:05:57
 
 
À
03/06/1997 00:53:34
Arnold Lee
K&A International Co.,Ltd
Hong Kong, Hong Kong
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Divers
Thread ID:
00034621
Message ID:
00034738
Vues:
35
>I understand Nicolas's question.I also got the same problem about "SET FILTER" command in the performance between Browse and Grid control.I think "SET FILTER" still have its functional in hidden parts of data within a single table.
>In my case,I have a transaction records for different department such as "FD" for food and "HD" for household so far.Since they all share the same database structure so I only create one file to all departments for easier maintenance.When I search transaction record for specific department, "SET FILTER" give me following benefits...
>- Records being browsed are under specifice condition only,unnecessary records are hidden
>- Keep another index tag active,let's say when I search for QTY in this table,all qty is index in ascending order in specific
> dept only.
>- As it's not SQL,any data being modified is on-line
>- SET FILTER is optimizable when the field is indexed,it's pretty fast.even your number of records are 180000 !
>
>However,It just work fine with browse,NOT grid.Same SET FILTER condition applied on grid control is very slow.
>If you have any further idea to figure out "SET FILTER" with grid control,pls let me know.

Again I will say: avoid SET FILTER TO at all costs. SET FILTER TO works by paging one record at a time, but only displaying the records that meet the criteria. It is equivalent to reading every record in the system - selecting 20 records out of 180000 implies a lot of skips.

Everything you want to do can be done better with a parameterized view:
(a) only displaying records matching a criteria
(b) searches by tags
(c) (this is important) data can be modified in real-time
(d) more efficient than even an optimized SET FILTER TO.

SET FILTER TO is a holdover from when dBase couldn't cope with idea of groups of data. We have an SQL implementation to do that now. Let's use the tools available.
David M. Stowell
Ravenslake Consulting
Chicago, Illinois

e-mail: davidstowell@ravenslakeconsulting.com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform