Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL optimization trouble
Message
De
07/04/2004 20:04:15
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00893077
Message ID:
00893145
Vues:
16
Sorry, my bad... DISTINCT

Aloha,

James
>James,
>
>Try JOIN
SELECT voter.* from voter ;
>    JOIN Code ON voter.kVoter = code.kVoter ;
>  WHERE code.kCodeType = "{09D0D53C-3F5A-48B0-8B87-BB740565DA0A}" ;
>         AND code.cValue="Y "
>
>>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 ")
>>***************
>>
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform