Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL not optimized
Message
De
08/08/2002 11:44:35
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
08/08/2002 11:37:11
Terrence Spencer
Municipal Advisory Council of Texas
Austin, Texas, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00687566
Message ID:
00687571
Vues:
11
>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)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform