Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Fast select becomes slow in form
Message
De
29/10/2003 03:16:33
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Fast select becomes slow in form
Divers
Thread ID:
00843940
Message ID:
00843940
Vues:
45
I have two tables, PERSON (21000 records, index on Person_Id), PERSON_SOURCE (22500 records, index on Person_id, Source_id), on which I do the following SELECT:

SELECT DISTINCT Person.*;
FROM cavr!person_source INNER JOIN cavr!person ;
ON Person_source.person_id = Person.person_id;
WHERE Person_source.source_id = '00031' INTO CURSOR XXXX


I run this SELECT in the command window and it takes about 0.3 seconds.

When I run this in the INIT of a form:

lnStartTime = SECONDS()*1000

SELECT DISTINCT Person.*;
FROM cavr!person_source INNER JOIN cavr!person ;
ON Person_source.person_id = Person.person_id;
WHERE Person_source.source_id = '00031' INTO CURSOR XXXX

WAIT WINDOW 'done loading all people' +STR(SECONDS()*1000-lnStartTime)



it takes almost 5 seconds. Any reason why this could happen?

TIA,

Ken
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform