Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Matching speed of browse for displaying all records
Message
De
04/08/1998 19:03:14
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00123816
Message ID:
00123939
Vues:
25
>I give the option of displaying all patient names (approx 1500) in our database as a last resort to users. I tell them that this is the slowest method of searching for a patient. It takes about 3 seconds to display the entire list of names in a list control.
>
>The select is very simple:
>SELECT unique_id, patname from demogrph into cursor cAllPats
>
>This query takes about 3 seconds even though I have indexed on the field "patname". Doing a query that returns the complete results from a table seems redundant. How can I display (into a grid or list control) the fields from the table directly and thus decrease the 3 second query time to almost instantaneous?
>
>A BROWSE is quite efficient, can I harness this? It can display the fields I want (ordered too) almost instaneously.

SELECT Demogrph
BROWSE TITLE "All Patients" FIELDS SELECT unique_id :H="Id", patname :H="Patient" ;
NOWAIT SAVE
* code will continue to execute...
RELEASE WINDOW ("All Patients") && or similar to close the browse programmatically
* should be no delay whatsoever on 1500 records. We regularly browse thousands of records.

HTH
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform