Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Rushmore
Message
De
26/04/2005 05:48:30
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01008357
Message ID:
01008366
Vues:
20
>I have a query I want to optimize. But I get a strange (accoirding to me :o))) result. When I write the query that way:
>
>
>SELECT Rab.Egn,;
>       Rab.Ime AS Ime,;
>       2005        AS God;
>       FROM Rab;
>WHERE Rab.Egn NOT IN (SELECT Egn FROM Sl_Bel WHERE Sl_Bel.God == 2005);
>INTO CURSOR GodBel READWRITE NOFILTER
>
>
>I get following result of SYS(3054)
>
>---------------------------
>Microsoft Visual FoxPro
>---------------------------
>Rushmore optimization level for table rab: none
>Using index tag Sl_god to rushmore optimize table sl_bel
>Rushmore optimization level for table sl_bel: full
>Joining table rab and table sl_bel using index tag Sl_egn
>
>
>But when I split the query:
>
>SELECT Egn FROM Sl_Bel WHERE Sl_Bel.God == 2005 INTO ARRAY mmm
>
>SELECT Rab.Egn,;
>       Rab.Ime AS Ime,;
>       2005        AS God;
>       FROM Rab;
>WHERE Rab.Egn NOT IN (mmm);
>INTO CURSOR GodBel READWRITE NOFILTER
>
>
>The result is:
>
>---------------------------
>Microsoft Visual FoxPro
>---------------------------
>Using index tag Rabi to rushmore optimize table rab
>Rushmore optimization level for table rab: full
>
>
>Why? Where is the difference?

First, the two query are different.

1° Plan
>Rushmore optimization level for table rab: none
>Using index tag Sl_god to rushmore optimize table sl_bel
>Rushmore optimization level for table sl_bel: full
>Joining table rab and table sl_bel using index tag Sl_egn

- VFP SCAN the rab table
- for every record, it seek Rab.Egn IN (sl_bel,INDEXFILTER(Sl_Bel.God == 2005))


2° PLAN
>Using index tag Rabi to rushmore optimize table rab
>Rushmore optimization level for table rab: full

- vfp SEEK mmm[1] in rab Table
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform