Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Grid load large cursors fast but small groups very slow
Message
 
À
16/07/1997 21:24:47
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00040340
Message ID:
00040460
Vues:
35
>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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform