Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
When does Rushmore Optimize?
Message
De
02/11/1998 11:57:24
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
When does Rushmore Optimize?
Divers
Thread ID:
00153608
Message ID:
00153608
Vues:
47
Hello, All.

We have got a query against 2 VFP6 tables, A_SYS.DBF and XX.DBF. A_SYS.DBF has got 1.3 Million records. XX.DBF has 1 record. The result set has 5 records which match. A_SYS is in a .DBC, XX is a free table.

First we run:

SELECT a_sys.* ;
FROM a_sys, xx;
WHERE a_sys.prodrid = xx.prodrid ;
AND a_sys.affid IN (SELECT affid FROM xx) ;
INTO CURSOR ctemp

The query take 0.04 seconds to run.

However, when we run:

SELECT a_sys.* ;
FROM a_sys, xx;
WHERE a_sys.prodrid = xx.prodrid ;
AND a_sys.affid = xx.affid ;
INTO CURSOR ctemp

the query takes approximately 80 seconds to run.

Both files are indexed on affid and prodrid. Both of these fields are of type "integer."

Why does it take so long to join on 2 fields as compared to running the first command? When we test using SYS(3054), it reports that it is not optimizing the 2nd query, and that it is partially optimizing the first.

- George [This makes no sense to me]
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform