Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Slow Running Query
Message
De
17/07/2001 08:21:10
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00531175
Message ID:
00531454
Vues:
14
>Hi Everybody,
>
>I am trying to speed up a query that I use because it takes around 33 seconds to pull out 8 records from a table that has 24,504 records. Below is the query that I am using:
>SELECT table1.*;
> FROM (tmp_name) table1 ;
> inner JOIN (Alias_Name) table2 ON table1.partno = table2.partno .AND.
> table1.Suppid = table2.Suppid;
> INTO CURSOR tmp_cursor
>
>The structure of table1 is Date D, Suppid C(10), Partno C(17), e_0199 C(10), q_0199 I, etc.
>The structure of table2 is Primekey I, Suppid C(10), Partno C(17), etc.
>I have an index on partno, suppid and partno + suppid on the table1 table.
>
>Please note that table1 is in a FoxPro 2.x data structure and table2 is a free table created on the run.
>
>Thanks,
>Joseph Schaff

Either you are missing and index, or you have an index too many. For instance, how many records match for partno? How many for suppid? Perhaps too many records are fetched (from the index) for one of these expressions.

Hilmar.
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
Répondre
Fil
Voir

Click here to load this message in the networking platform