Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL optimization trouble
Message
From
07/04/2004 16:08:16
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
SQL optimization trouble
Miscellaneous
Thread ID:
00893077
Message ID:
00893077
Views:
54
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
Next
Reply
Map
View

Click here to load this message in the networking platform