Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Slow Running Query
Message
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:
00531194
Vues:
11
The problem I beleive is that the temporary table is not indexed and therefore the indexes needed for rushmore optimization are not used. You may want to consider building indexes on the temporary table on partno and suppid as well. These behave like the cursor tables and are only temporary so cleanup should not be an issue. I have also noticed performance benifits by using the == operator in place of the = for field joins that are structurely identical.

Troy



>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform