Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL not optimized
Message
From
08/08/2002 11:44:35
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
08/08/2002 11:37:11
Terrence Spencer
Municipal Advisory Council of Texas
Austin, Texas, United States
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00687566
Message ID:
00687571
Views:
12
>I am having trouble getting this sql to speed up.
>
>This sql works fine. I have an index tag on CIREGNUMB.
>
>Sele * from mytable;
> WHERE mytable.ciregnumb = lcVar
>
>Because of the tag, the query is instant.
>
>But if I want to add a sub query it bogs down.
>
>Sele * from mytable;
> WHERE mytable.ciregnumb in ;
> (sele ciregnumb from mysmalltable)
>
>Ideas on why this slows down to a crawl? I use subqueries all the time and I can't figure this one out.
>
>Thanks.
>Terrence

How about changing this to a two-table-join? You don't need to include fields from table MySmallTable.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform