Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Grid load large cursors fast but small groups very slow
Message
De
17/07/1997 23:12:40
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00040340
Message ID:
00040499
Vues:
64
>>I am trying to use a grid to display my results from a select. My WHERE is complex so I understand that it rules out using parameterized views. Currently, I am changing the grid recordsource to "", removing the cursor previously linked to the grid, selecting the records into to a new cursor (reusing the old cursor name), and then changing my recordsource back to the cursor name. The SELECT is executed very fast but when I attempt to repopulate the grid, the less records selected, the slower my results. ( Ex. 650 records < sec., 200 records > sec., 36 records several sec.s)
>William,
>
>Ok, what is happening to you here is that your SQL is NOT creating a temp table for you, it is filtering the original table. With filters the less records that meet the filter the longer it takes to populate the grid. If you are using VFP 5.0 you can add the NOFILTER clause to your SELECT command, if you are using VFP 3.0 add an other where option like this one;
>
> ... WHERE ... AND .T. = .T. ...
>
>This force VFP to create a temp table for the cursor and will speed up your grid display.

This was the problem. All I can say is THANKS. I have been embarsed by this little problem before having not tested my code well enough. It's amazing how such a seemingly small thing can change your quality of life. My wife thanks you. And thanks to all of you guys who responded.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform