Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL optimization trouble
Message
De
07/04/2004 16:08:16
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
SQL optimization trouble
Divers
Thread ID:
00893077
Message ID:
00893077
Vues:
58
Hi All,

If I execute the following line, the result (a single recod in this case but now always) comes up quickly (<1 second):
***************
SELECT * FROM Code WHERE kCodeType="{09D0D53C-3F5A-48B0-8B87-BB740565DA0A}" AND cValue="Y "
***************

If I execute the following line, the result comes up fairly quickly (1.2 second). Note the GUID is the result of the above query.:
***************
SELECT * from voter WHERE kVoter="{C9B43423-4248-4E55-8A05-6F81939FBD50}"
***************

If I execute the following line, the query runs EXTREMELY slow and all but locks up the computer:
***************
SELECT * from Voter WHERE kVoter in (Select kVoter FROM Code WHERE kCodeType="{09D0D53C-3F5A-48B0-8B87-BB740565DA0A}" AND cValue="Y ")
***************

What am I doing wrong?

Aloha,

James
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform